public class TotalTestCTBuilder
extends hudson.tasks.Builder
implements jenkins.tasks.SimpleBuildStep
| Modifier and Type | Class and Description |
|---|---|
static class |
TotalTestCTBuilder.DescriptorImpl |
jenkins.tasks.SimpleBuildStep.LastBuildAction, jenkins.tasks.SimpleBuildStep.LastBuildActionFactory| Modifier and Type | Field and Description |
|---|---|
static String |
defaultLocalConfigLocation |
| Constructor and Description |
|---|
TotalTestCTBuilder(String environmentId,
String folderPath,
String serverUrl,
String serverCredentialsId,
String connectionId,
String credentialsId,
String sonarVersion,
String logLevel)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAccountInfo()
Return the accounting information to be used durring execution of the Functional Test
|
int |
getCcThreshold()
Code Coverage accessor
|
boolean |
getClearCodeCoverage()
Set if Code Coverage results should be cleared at start of execution.
|
String |
getCollectCCRepository()
Returns the Code Coverage Repository Server.
|
String |
getCollectCCSystem()
Returns the Code Coverage System.
|
String |
getCollectCCTestID()
Returns the Code Coverage Test ID.
|
boolean |
getCollectCodeCoverage()
Should Code Coverage should be executed.
|
boolean |
getCompareJUnits()
Returns if comparing JUnits
|
String |
getConnectionId()
Gets the unique identifier of the 'Host connection'.
|
String |
getContextVariables()
Gets the context variables.
|
boolean |
getCreateJUnitReport()
Returns if the JUnit report file should be created.
|
boolean |
getCreateReport()
Returns if the report file should be created.
|
boolean |
getCreateResult()
Returns if the result file should be created.
|
boolean |
getCreateSonarReport()
Returns if the Sonar report file should be created.
|
String |
getCredentialsId()
Host credentials accessor
|
String |
getCustomerId()
Gets the Customer ID.
|
String |
getEnterpriseDataHostPort()
Gets the Enterprise Data Communication Manager host and port.
|
String |
getEnterpriseDataWorkspace()
Gets the Enterprise Data Communication Manager workspace.
|
String |
getEnvironmentId()
environment where test is executed
|
String |
getFolderPath()
environment where test is executed
|
boolean |
getHaltAtFailure()
Should Functional Test scenarios execution stop when an error occurs.
|
boolean |
getHaltPipelineOnFailure()
Should the pipeline execution continues when an error occurs.
|
String |
getHaltPipelineTitle()
Return the associated text for the "Halt pipeline if errors occur" field's title
|
String |
getJclPath()
Gets the JCL path.
|
String |
getJsonFile()
Returns the JSON file
|
boolean |
getLocalConfig()
Return if using local configuration.
|
String |
getLocalConfigLocation()
Return the local configuration location.
|
String |
getLogLevel()
Returns the logging level.
|
String |
getProgramList()
Returns the list of tests to execute.
|
boolean |
getRecursive()
Recursive search for Functional Test scenarios
|
String |
getReportFolder()
Returns the location of the report folder
|
String |
getSelectEnvironmentRadio()
Returns the selected selectProgramsRadio radio button.
|
boolean |
getSelectProgramsOption()
Sets the selectProgramsOption radio button.
|
String |
getSelectProgramsRadio()
Returns the selected selectProgramsRadio radio button.
|
String |
getselectProgramsRadioText()
Return the associated text for the selected "Select Programs" radio button
|
String |
getselectProgramsRadioValue()
Returns the command line parameter for the selected "Select Programs" radio button
|
String |
getServerCredentialsId()
Server credentials accessor
|
String |
getServerUrl()
Server URL accessor
|
String |
getSiteId()
Gets the Site ID.
|
String |
getSonarVersion()
Returns the Sonar version
|
String |
getSourceFolder()
The location of ths Source Folder
|
boolean |
getStopIfTestFailsOrThresholdReached()
When to stop Functional Test suite or scenario.
|
boolean |
getUploadToServer()
Upload results to the server
|
boolean |
getUseEnterpriseData() |
boolean |
getUseScenarios()
Returns if using .scenario files instead of .context files
|
boolean |
isLocalConfig()
Is local configuration.
|
boolean |
isSelectEnvironmentId()
Returns if the Select Environment option is selected.
|
boolean |
isSelectHostConnection()
Returns if the select host connection option is selected.
|
boolean |
isSelectHostPort()
Returns if the select host/port option is selected.
|
boolean |
isSelectProgramsJSON()
Returns if the Select JSON option is selected.
|
boolean |
isSelectProgramsList()
Returns if the Select Programs option is selected.
|
void |
perform(hudson.model.Run<?,?> build,
hudson.FilePath workspace,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
(non-Javadoc)
|
void |
setAccountInfo(String accountInfo)
Set the accounting information for the job execution.
|
void |
setCcThreshold(int ccThreshold)
Set the Code Coverage threshold
|
void |
setClearCodeCoverage(boolean clearCodeCoverage)
Set if Code Coverage results should be cleared at start of execution.
|
void |
setCollectCCRepository(String collectCCRepository)
Set the Code Coverage Repository Server.
|
void |
setCollectCCSystem(String collectCCSystem)
Set the Code Coverage System.
|
void |
setCollectCCTestID(String collectCCTestID)
Set the Code Coverage Test ID.
|
void |
setCollectCodeCoverage(boolean collectCodeCoverage)
Set if Code Coverage should be executed.
|
void |
setCompareJUnits(boolean compareJUnits)
Set the if comparing JUnits.
|
void |
setContextVariables(String contextVariables)
Sets the context variables
|
void |
setCreateJUnitReport(boolean createJUnitReport)
Sets if the JUnit report file should be created.
|
void |
setCreateReport(boolean createReport)
Sets if the report file should be created.
|
void |
setCreateResult(boolean createResult)
Set if the result file should be created.
|
void |
setCreateSonarReport(boolean createSonarReport)
Sets if the Sonar report file should be created.
|
void |
setCustomerId(String customerId)
Sets the Customer ID.
|
void |
setEnterpriseDataHostPort(String enterproseDataHostPort)
Sets the Enterprise Data Communication Manager host and port.
|
void |
setEnterpriseDataWorkspace(String enterpriseDataWorkspace)
Sets the Enterprise Data Communication Manager workspace.
|
void |
setHaltAtFailure(boolean haltAtFailure)
Set the flag to halt when a failure has been detected.
|
void |
setHaltPipelineOnFailure(boolean haltPipelineOnFailure)
Set if the pipeline execution continues when an error occurs.
|
void |
setJclPath(String jclPath)
Sets the JCL path when executing '.testscenarios' files.
|
void |
setJsonFile(String jsonFile)
Set the JSON file of tests to execute.
|
void |
setLocalConfig(boolean localConfig)
Set if using local configuration
|
void |
setLocalConfigLocation(String localConfigLocation)
Set local configuration location.
|
void |
setLogLevel(String logLevel)
Sets the logging level.
|
void |
setProgramList(String testList)
Set the list of tests to execute.
|
void |
setRecursive(boolean recursive)
Set the flag to look for test scenarios recursively from the sourceFolder.
|
void |
setReportFolder(String reportFolder)
Set the Report Folder location
|
void |
setSelectEnvironmentRadio(String selectEnvironmenRadio)
Sets the selected environment radio button.
|
void |
setSelectProgramsOption(boolean selectProgramsOption)
Sets the selectProgramsOption radio button.
|
void |
setSelectProgramsRadio(String selectProgramsRadio)
Sets the selected selectProgramsRadio radio button.
|
void |
setSiteId(String siteId)
Sets the Site ID.
|
void |
setSonarVersion(String sonarVersion)
Set the Sonar Version
|
void |
setSourceFolder(String sourceFolder)
Set the Source Folder location
|
void |
setStopIfTestFailsOrThresholdReached(boolean stopIfTestFailsOrThresholdReached)
Set the flag to stop execution of the test if a failure or threshold has been reached.
|
void |
setUploadToServer(boolean uploadToServer)
Set the flag to upload the results to the server.
|
void |
setUseEnterpriseData(boolean collectEnterpriseData) |
void |
setUseScenarios(boolean useScenarios)
Set the if comparing using .scenario files instead of .context files.
|
void |
validateParameters(hudson.Launcher launcher,
hudson.model.TaskListener listener,
hudson.model.Item project)
Validates the configuration parameters.
|
all, getDescriptor, getRequiredMonitorService, prebuildgetProjectAction, getProjectAction, getProjectActions, perform, perform, prebuildpublic static final String defaultLocalConfigLocation
@DataBoundConstructor public TotalTestCTBuilder(String environmentId, String folderPath, String serverUrl, String serverCredentialsId, String connectionId, String credentialsId, String sonarVersion, String logLevel)
environmentId - The environment id for the selected connectionfolderPath - The folder location for the test execution.serverUrl - URL for the TTT Server.serverCredentialsId - The server credentialsconnectionId - The Host connection id.credentialsId - Host credentials.sonarVersion - The Sonar version.logLevel - The debug log level.public String getEnvironmentId()
String value of environmentIdpublic String getFolderPath()
String value of folder pathpublic String getServerUrl()
String value of server URLpublic String getCredentialsId()
String value of user Idpublic String getServerCredentialsId()
String value of user Idpublic int getCcThreshold()
int Code Coverage thresholdpublic boolean getRecursive()
true if recursive is selected, otherwise false.public boolean getUploadToServer()
true if uploading results to the server is selected, otherwise false.public boolean getHaltAtFailure()
true if stop at first error is selected, otherwise false.public String getSonarVersion()
String Sonar version.public String getSourceFolder()
String The value set for the Source folder.public String getReportFolder()
String The folder to put the Reports.public boolean getStopIfTestFailsOrThresholdReached()
true if the test has failed or the threshold has been reached, otherwise false.public String getAccountInfo()
@DataBoundSetter public void setSourceFolder(String sourceFolder)
sourceFolder - The Source Folder location.@DataBoundSetter public void setSonarVersion(String sonarVersion)
sonarVersion - The version of Sonar.@DataBoundSetter public void setReportFolder(String reportFolder)
reportFolder - The report folder location.@DataBoundSetter public void setCcThreshold(int ccThreshold)
ccThreshold - The vale to be set as the Code Coverage threshold.@DataBoundSetter public void setHaltAtFailure(boolean haltAtFailure)
haltAtFailure - true if the test should stop at failure, otherwise false.@DataBoundSetter public void setRecursive(boolean recursive)
recursive - true if files should be searched recursively, otherwise false.@DataBoundSetter public void setUploadToServer(boolean uploadToServer)
uploadToServer - true if results should be uploaded to the server, otherwise false.@DataBoundSetter public void setStopIfTestFailsOrThresholdReached(boolean stopIfTestFailsOrThresholdReached)
stopIfTestFailsOrThresholdReached - true if if the test should be stopped with failures, otherwise false.@DataBoundSetter public void setAccountInfo(String accountInfo)
accountInfo - The accounting information to be used when this test is executed.@DataBoundSetter public void setCompareJUnits(boolean compareJUnits)
compareJUnits - true if JUnits should be compare, otherwise false.public boolean getCompareJUnits()
true indicates comparing JUnits. false
indicates not comparing JUnits.public boolean getCreateReport()
true indicates a report file should be created.
false indicates no report file will be created.@DataBoundSetter public void setCreateReport(boolean createReport)
createReport - true indicates a report file should be created.
false indicates no report file will be created.public boolean getCreateResult()
true indicates a result file should be created.
false indicates no result file will be created.@DataBoundSetter public void setCreateResult(boolean createResult)
createResult - true indicates a result file should be created.
false indicates no report file will be created.public boolean getCreateSonarReport()
true indicates a Sonar report file should be created.
false indicates no Sonar report file will be created.@DataBoundSetter public void setCreateSonarReport(boolean createSonarReport)
createSonarReport - true indicates a Sonar report file should be created.
false indicates no Sonar report file will be created.public boolean getCreateJUnitReport()
true indicates a JUnit result file should be created.
falseindicates no JUnit result file will be created.@DataBoundSetter public void setCreateJUnitReport(boolean createJUnitReport)
createJUnitReport - true indicates a JUnit report file should be created.
false indicates no JUnit report file will be created.public String getLogLevel()
String The logging level@DataBoundSetter public void setLogLevel(String logLevel)
logLevel - the log level. Should be 'ALL', 'TRACE", 'DEBUG', 'INFO', 'WARNING' or 'ERROR'.@DataBoundSetter public void setUseScenarios(boolean useScenarios)
useScenarios - true if .scenario files should be used, otherwise
false indicates .context files will be used.public boolean getUseScenarios()
true indicates using .scenario files.
false indicates using .context files.@DataBoundSetter public void setSelectProgramsOption(boolean selectProgramsOption)
selectProgramsOption - Should the selectedOption check box be selected.public boolean getSelectProgramsOption()
true if selectedOption check box is selected, otherwise false.@DataBoundSetter public void setSelectProgramsRadio(String selectProgramsRadio)
selectProgramsRadio - Selected programs option to set.public String getSelectProgramsRadio()
String value of the selectProgramsRadio option.public boolean isSelectProgramsJSON()
true if Select JSON option is selected, otherwise false.public boolean isSelectProgramsList()
true if Select Programs option is selected, otherwise false.@DataBoundSetter public void setJsonFile(String jsonFile)
jsonFile - The JSON to be used when this test is executed.public String getJsonFile()
String The JSON file.@DataBoundSetter public void setProgramList(String testList)
testList - The comma separated list of tests to be executed.public String getProgramList()
String The list of tests to execute.@DataBoundSetter public void setHaltPipelineOnFailure(boolean haltPipelineOnFailure)
haltPipelineOnFailure - true indicates pipeline should stop error is detected.
false indicates pipeline should not stop error is detected.public boolean getHaltPipelineOnFailure()
true indicates pipeline should stop error is detected.
false indicates pipeline should not stop error is detected.@DataBoundSetter public void setLocalConfig(boolean localConfig)
localConfig - Using local configuration.public boolean getLocalConfig()
true If using local configuration, otherwise falsepublic boolean isLocalConfig()
true if the local configuration button is selected, otherwise false.@DataBoundSetter public void setLocalConfigLocation(String localConfigLocation)
localConfigLocation - The local configuration location.public String getLocalConfigLocation()
String the local configuration location.@DataBoundSetter public void setCollectCodeCoverage(boolean collectCodeCoverage)
collectCodeCoverage - true indicates code coverage is to be executed.
false indicates code coverage is not to be executed.public boolean getCollectCodeCoverage()
true indicates code coverage is to be executed.
false indicates code coverage is not to be executed.@DataBoundSetter public void setCollectCCRepository(String collectCCRepository)
collectCCRepository - The Code Coverage Repository Server.public String getCollectCCRepository()
@DataBoundSetter public void setCollectCCSystem(String collectCCSystem)
collectCCSystem - The Code Coverage System.public String getCollectCCSystem()
@DataBoundSetter public void setCollectCCTestID(String collectCCTestID)
collectCCTestID - The Code Coverage Test ID.public String getCollectCCTestID()
@DataBoundSetter public void setClearCodeCoverage(boolean clearCodeCoverage)
clearCodeCoverage - true indicates code coverage should be cleared at the start of execution.
false indicates code coverage should not be cleared at the start of execution.public boolean getClearCodeCoverage()
true indicates code coverage is to be executed.
false indicates code coverage is not to be executed.@DataBoundSetter public void setUseEnterpriseData(boolean collectEnterpriseData)
public boolean getUseEnterpriseData()
@DataBoundSetter public void setEnterpriseDataHostPort(String enterproseDataHostPort)
enterproseDataHostPort - The Enterprise Data Communication Manager host and port.public String getEnterpriseDataHostPort()
@DataBoundSetter public void setEnterpriseDataWorkspace(String enterpriseDataWorkspace)
enterpriseDataWorkspace - The Enterprise Data Communication Manager workspace.public String getEnterpriseDataWorkspace()
@DataBoundSetter public void setCustomerId(String customerId)
customerId - The customer's ID.public String getCustomerId()
@DataBoundSetter public void setSiteId(String siteId)
siteId - The site id.public String getSiteId()
@DataBoundSetter public void setJclPath(String jclPath)
jclPath - The JCL path.public String getJclPath()
public String getConnectionId()
String value of connectionId@DataBoundSetter public void setContextVariables(String contextVariables)
contextVariables - The context variablespublic String getContextVariables()
@DataBoundSetter public void setSelectEnvironmentRadio(String selectEnvironmenRadio)
selectEnvironmenRadio - The selected environment radio button.public String getSelectEnvironmentRadio()
String value of the selectProgramsRadio option.public boolean isSelectEnvironmentId()
true if Select JSON option is selected, otherwise false.public boolean isSelectHostConnection()
true if Select Programs option is selected, otherwise false.public boolean isSelectHostPort()
true if Select Programs option is selected, otherwise false.public final String getselectProgramsRadioValue()
public final String getselectProgramsRadioText()
public final String getHaltPipelineTitle()
String The "Halt pipeline if errors occur" field titlepublic void perform(hudson.model.Run<?,?> build,
hudson.FilePath workspace,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
throws InterruptedException,
IOException
perform in interface jenkins.tasks.SimpleBuildStepInterruptedExceptionIOExceptionSimpleBuildStep.perform(hudson.model.Run, hudson.FilePath, hudson.Launcher, hudson.model.TaskListener)public 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–2025. All rights reserved.