public class TotalTestBuilder
extends hudson.tasks.Builder
implements jenkins.tasks.SimpleBuildStep
Builder.
When the user configures the project and enables this builder,
Descriptor.newInstance(StaplerRequest) is invoked
and a new TotalTestRunner is created. The created
instance is persisted to the project configuration XML by using
XStream, so this allows you to use instance fields to remember
remember the configuration.
When a build is performed, the perform(hudson.model.Run<?, ?>, hudson.FilePath, hudson.Launcher, hudson.model.TaskListener) method will be invoked.
| Modifier and Type | Class and Description |
|---|---|
static class |
TotalTestBuilder.DescriptorImpl
Descriptor for
TotalTestRunner. |
jenkins.tasks.SimpleBuildStep.LastBuildAction, jenkins.tasks.SimpleBuildStep.LastBuildActionFactory| Constructor and Description |
|---|
TotalTestBuilder(String hostPort,
String credentialsId,
String projectFolder,
String testSuite,
String jcl)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getCcDB2()
Returns whether Code Coverage is for a DB2 program.
|
String |
getCcRepo()
Returns the name of the Code Coverage repository.
|
String |
getCcSystem()
Returns the Code Coverage system.
|
String |
getCcTestId()
Returns the Code Coverage test id.
|
String |
getCredentialsId()
Returns the credential id of the user.
|
TotalTestBuilder.DescriptorImpl |
getDescriptor() |
String |
getHlq()
Returns the dataset high level qualifier
|
String |
getHostPort()
Returns the host and port for running Total Test.
|
String |
getJcl()
Returns the name of the JCL file to use.
|
String |
getProjectFolder()
Returns the folder name containing the Total Test project.
|
String |
getTestSuite()
Returns the name of the test scenario or test suite to
run.
|
boolean |
isDeleteTemp()
Returns whether temporary file should be deleted.
|
boolean |
isUseStubs()
Returns whether stubs are to be used.
|
void |
perform(hudson.model.Run<?,?> build,
hudson.FilePath workspaceFilePath,
hudson.Launcher launcher,
hudson.model.TaskListener listener) |
void |
setCcDB2(boolean ccDB2)
Set if the main program is DB2.
|
void |
setCcRepo(String ccRepo)
Sets the Code Coverage repository dataset name.
|
void |
setCcSystem(String ccSystem)
Sets the Code Coverage system.
|
void |
setCcTestId(String ccTestId)
Sets the Code Coverage test id.
|
void |
setDeleteTemp(boolean deleteTemp)
Sets whether temporary file should be deleted.
|
void |
setHlq(String hlq)
Sets the dataset high level qualifier,
|
void |
setUseStubs(boolean useStubs)
Sets if stubs are being used.
|
void |
validateParameters(hudson.Launcher launcher,
hudson.model.TaskListener listener,
hudson.model.Item project)
Validates the configuration parameters.
|
getProjectAction, getProjectAction, getProjectActions, perform, perform, prebuild@DataBoundConstructor public TotalTestBuilder(String hostPort, String credentialsId, String projectFolder, String testSuite, String jcl)
hostPort - The host and port for running Total Test.credentialsId - The user's credential id.projectFolder - The name of the folder containing the Total Test project.testSuite - The name of the test scenario or test suite to run.jcl - The name of the JCL file to use.public String getHostPort()
The host and port must be specified as "host:port"
public String getCredentialsId()
public String getProjectFolder()
public String getTestSuite()
The test scenario or test suite must be in the specified project.
public String getJcl()
The JCL file must be in the specified project.
@DataBoundSetter public void setCcRepo(String ccRepo)
ccRepo - The Code Coverage repository name.public String getCcRepo()
@DataBoundSetter public void setCcSystem(String ccSystem)
ccSystem - The Code Coverage system.public String getCcSystem()
@DataBoundSetter public void setCcTestId(String ccTestId)
ccTestId - The Code Coverage test id.public String getCcTestId()
@DataBoundSetter public void setCcDB2(boolean ccDB2)
ccDB2 - true if Code Coverage is for a DB2 program, otherwise falsepublic boolean getCcDB2()
true indicates program is a DB2 program, otherwise false@DataBoundSetter public void setUseStubs(boolean useStubs)
useStubs - true if stubs are to be used, otherwise falsepublic boolean isUseStubs()
true indicates stubs should be used, otherwise false@DataBoundSetter public void setDeleteTemp(boolean deleteTemp)
deleteTemp - true if temporary files should be deleted, otherwise falsepublic boolean isDeleteTemp()
true indicates temporary files should be deleted.@DataBoundSetter public void setHlq(String hlq)
hlq - High level qualifier for allocating datasets. Can be nullpublic String getHlq()
null will be
returned if no high level qualifier was specified.public void perform(hudson.model.Run<?,?> build,
hudson.FilePath workspaceFilePath,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
throws hudson.AbortException
perform in interface jenkins.tasks.SimpleBuildStephudson.AbortExceptionpublic TotalTestBuilder.DescriptorImpl getDescriptor()
getDescriptor in interface hudson.model.Describable<hudson.tasks.Builder>getDescriptor in class hudson.tasks.Builderpublic void validateParameters(hudson.Launcher launcher,
hudson.model.TaskListener listener,
hudson.model.Item project)
launcher - An instance of Launcher for launching the plugin.listener - An instance of TaskListener for the build listener.project - An instance of Item for the Jenkins project.Copyright © 2016–2017. All rights reserved.