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| Constructor and Description |
|---|
TotalTestCTBuilder(String environmentId,
String folderPath,
String serverUrl,
String credentialsId) |
| 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
|
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()
Environment accessor
|
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 |
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 |
getSelectPrograms()
Returns the selected selectPrograms radio button.
|
boolean |
getSelectProgramsOption()
Sets the selectProgramsOption radio button.
|
String |
getselectProgramsRadioValue()
Returns the command line parameter for the selected "Select Programs" radio button
|
String |
getselectProgramsText()
Return the associated text for the selected "Select Programs" radio button
|
String |
getServerUrl()
Server URL accessor
|
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 |
getUseScenarios()
Returns if using .scenario files instead of .context files
|
boolean |
isLocalConfig()
Is local configuration.
|
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 |
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 |
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 |
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 |
setSelectPrograms(String selectPrograms)
Sets the selected selectPrograms radio button.
|
void |
setSelectProgramsOption(boolean selectProgramsOption)
Sets the selectProgramsOption radio button.
|
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 |
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 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 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 setSelectPrograms(String selectPrograms)
selectPrograms - Selected programs option to set.public String getSelectPrograms()
String value of the selectPrograms 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.public final String getselectProgramsRadioValue()
public final String getselectProgramsText()
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–2020. All rights reserved.