com.javaclimber.jenkins.testswarmplugin
Class TestSwarmBuilder

java.lang.Object
  extended by hudson.tasks.BuildStepCompatibilityLayer
      extended by hudson.tasks.Builder
          extended by com.javaclimber.jenkins.testswarmplugin.TestSwarmBuilder
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.Builder>, hudson.tasks.BuildStep

public class TestSwarmBuilder
extends hudson.tasks.Builder

This is plugin is responsible for integrating TestSwarm into jenkins. It will take all test case urls and post it to TestSwarm server

Author:
kevinnilson

Nested Class Summary
static class TestSwarmBuilder.DescriptorImpl
          Descriptor for HelloWorldBuilder.
static class TestSwarmBuilder.TestSuiteData
           
 
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
hudson.tasks.BuildStep.PublisherList
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static int ALL_PASSING
           
protected  String CHAR_ENCODING
           
static int FAILURE_DONE
           
static int FAILURE_IN_PROGRESS
           
static int IN_PROGRESS_ENOUGH_PASSING_NO_ERRORS
           
static int IN_PROGRESS_NOT_ENOUGH_PASSING_NO_ERRORS
           
static int TIMEOUT_NOT_ENOUGH_PASSING_NO_ERRORS
           
static int UNKNOWN
           
 
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
 
Constructor Summary
TestSwarmBuilder(String testswarmServerUrl, String jobName, String userName, String authToken, String maxRuns, String chooseBrowsers, String pollingIntervalInSecs, String timeOutPeriodInMins, String minimumPassing, List<TestSwarmBuilder.TestSuiteData> testSuiteList)
           
 
Method Summary
 String getAuthToken()
           
 String getChooseBrowsers()
           
 TestSwarmBuilder.DescriptorImpl getDescriptor()
           
 String getJobName()
           
 String getMaxRuns()
           
 String getPollingIntervalInSecs()
           
 TestSwarmBuilder.TestSuiteData[] getTestSuiteList()
           
 String getTestswarmServerUrl()
          We'll use this from the config.jelly.
 String getTimeOutPeriodInMins()
           
 String getUserName()
           
 boolean isValidUrl(String urlStr)
          Check if config file loc is a url
 boolean perform(hudson.model.AbstractBuild build, hudson.Launcher launcher, hudson.model.BuildListener listener)
           
 
Methods inherited from class hudson.tasks.Builder
all, getRequiredMonitorService, prebuild
 
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, prebuild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, prebuild
 

Field Detail

CHAR_ENCODING

protected final String CHAR_ENCODING
See Also:
Constant Field Values

UNKNOWN

public static final int UNKNOWN
See Also:
Constant Field Values

ALL_PASSING

public static final int ALL_PASSING
See Also:
Constant Field Values

IN_PROGRESS_ENOUGH_PASSING_NO_ERRORS

public static final int IN_PROGRESS_ENOUGH_PASSING_NO_ERRORS
See Also:
Constant Field Values

IN_PROGRESS_NOT_ENOUGH_PASSING_NO_ERRORS

public static final int IN_PROGRESS_NOT_ENOUGH_PASSING_NO_ERRORS
See Also:
Constant Field Values

TIMEOUT_NOT_ENOUGH_PASSING_NO_ERRORS

public static final int TIMEOUT_NOT_ENOUGH_PASSING_NO_ERRORS
See Also:
Constant Field Values

FAILURE_IN_PROGRESS

public static final int FAILURE_IN_PROGRESS
See Also:
Constant Field Values

FAILURE_DONE

public static final int FAILURE_DONE
See Also:
Constant Field Values
Constructor Detail

TestSwarmBuilder

@DataBoundConstructor
public TestSwarmBuilder(String testswarmServerUrl,
                                             String jobName,
                                             String userName,
                                             String authToken,
                                             String maxRuns,
                                             String chooseBrowsers,
                                             String pollingIntervalInSecs,
                                             String timeOutPeriodInMins,
                                             String minimumPassing,
                                             List<TestSwarmBuilder.TestSuiteData> testSuiteList)
Method Detail

getTestSuiteList

@Exported
public TestSwarmBuilder.TestSuiteData[] getTestSuiteList()

getTestswarmServerUrl

public String getTestswarmServerUrl()
We'll use this from the config.jelly.


getChooseBrowsers

public String getChooseBrowsers()

getJobName

public String getJobName()

getUserName

public String getUserName()

getAuthToken

public String getAuthToken()

getMaxRuns

public String getMaxRuns()

getPollingIntervalInSecs

public String getPollingIntervalInSecs()

getTimeOutPeriodInMins

public String getTimeOutPeriodInMins()

isValidUrl

public boolean isValidUrl(String urlStr)
Check if config file loc is a url

Returns:
true if the configFileLoc is a valid url else return false

getDescriptor

public TestSwarmBuilder.DescriptorImpl getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<hudson.tasks.Builder>
Overrides:
getDescriptor in class hudson.tasks.Builder

perform

public boolean perform(hudson.model.AbstractBuild build,
                       hudson.Launcher launcher,
                       hudson.model.BuildListener listener)
                throws InterruptedException,
                       IOException
Specified by:
perform in interface hudson.tasks.BuildStep
Overrides:
perform in class hudson.tasks.BuildStepCompatibilityLayer
Throws:
InterruptedException
IOException


Copyright © 2004-2012. All Rights Reserved.