org.eclipse.emf.emfstore.fuzzy.emf.internal.diff
Class HudsonTestRunProvider

java.lang.Object
  extended by org.eclipse.emf.emfstore.fuzzy.emf.diff.spi.TestRunProvider
      extended by org.eclipse.emf.emfstore.fuzzy.emf.internal.diff.HudsonTestRunProvider

public class HudsonTestRunProvider
extends TestRunProvider

An implementation of TestRunProvider to provide TestRuns created by the CI-Server Hudson.

Author:
Julian Sommerfeldt

Field Summary
static String PROP_ARTIFACT_FOLDER
          The hudson artifact folder property.
static String PROP_DIFF_JOB
          The property of the hudson diff job.
static String PROP_HUDSON
          The prefix for hudson properties.
static String PROP_JOB
          The name of the hudson job property.
static String PROP_PORT
          The hudson port property.
static String PROP_URL
          The hudson url property.
static String[] VALID_STATES
          An array containing all valid states of a hudson build.
 
Constructor Summary
HudsonTestRunProvider()
          Standard constructor using the last build and the build before the last build for reading testruns.
HudsonTestRunProvider(int firstBuildNumber, int secondBuildNumber)
          Constructor using tow special numbers for testruns.
 
Method Summary
 List<TestConfig> getAllConfigs()
           
static org.eclipse.emf.ecore.resource.Resource getDiffResource()
           
 TestRun[] getTestRuns()
           
 
Methods inherited from class org.eclipse.emf.emfstore.fuzzy.emf.diff.spi.TestRunProvider
setConfig
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_HUDSON

public static final String PROP_HUDSON
The prefix for hudson properties.

See Also:
Constant Field Values

PROP_URL

public static final String PROP_URL
The hudson url property.

See Also:
Constant Field Values

PROP_ARTIFACT_FOLDER

public static final String PROP_ARTIFACT_FOLDER
The hudson artifact folder property.

See Also:
Constant Field Values

PROP_PORT

public static final String PROP_PORT
The hudson port property.

See Also:
Constant Field Values

PROP_JOB

public static final String PROP_JOB
The name of the hudson job property.

See Also:
Constant Field Values

PROP_DIFF_JOB

public static final String PROP_DIFF_JOB
The property of the hudson diff job.

See Also:
Constant Field Values

VALID_STATES

public static final String[] VALID_STATES
An array containing all valid states of a hudson build. Valid means it can be used for creating diffs.

Constructor Detail

HudsonTestRunProvider

public HudsonTestRunProvider()
                      throws org.dom4j.DocumentException,
                             IOException
Standard constructor using the last build and the build before the last build for reading testruns.

Throws:
org.dom4j.DocumentException - If it cannot read the buildnumbers correctly from hudson.
IOException - If it cannot read the buildnumbers correctly from hudson.

HudsonTestRunProvider

public HudsonTestRunProvider(int firstBuildNumber,
                             int secondBuildNumber)
Constructor using tow special numbers for testruns.

Parameters:
firstBuildNumber - The number of the first build (first from the last one backwards, so it is later than the second one).
secondBuildNumber - The number of the second build.
Method Detail

getTestRuns

public TestRun[] getTestRuns()
                      throws IOException
Specified by:
getTestRuns in class TestRunProvider
Returns:
The two TestRuns specified by the config and this provider.
Throws:
IOException - If there is an error reading the TestRuns.

getAllConfigs

public List<TestConfig> getAllConfigs()
Returns:
All TestConfig which are loadable via this HudsonTestRunProvider.

getDiffResource

public static org.eclipse.emf.ecore.resource.Resource getDiffResource()
                                                               throws MalformedURLException,
                                                                      org.dom4j.DocumentException
Returns:
The diff resource created by hudson.
Throws:
org.dom4j.DocumentException - in case an error occurs during obtainment of the resource.
MalformedURLException - in case an error occurs during obtainment of the resource.


Copyright © 2015. All Rights Reserved.