I have some scripts made for regression testing. I created the pipeline and put the isolated test's has a freestyle job.
In the jobs whit the MicroFocus plugin we can set the configuration, trow the wizzard, so we can select the device, the app and app version, etc, that prevails over the UFT script configuration saved on the script.
At pipeline, we do not have that option, so automatically reads the configuration that are at the script and executed the test.
The point its to enable DEV team to run the scripts whit out the need to me reconfigure the scripts, saved and push to GIT whit the new build's they wanna test.
Basically this is my code:
pipeline{
agent{
label 'NODE' // Put node
}
options {
timeout(time: 30, unit: 'MINUTES')
}
stages{
stage('Checkout') {
steps {
checkout scm: [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'LocalBranch', localBranch: '**']], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/xxx']]]
}
}
stage('Delete Report TC1'){
steps{
bat 'del /S /Q "P:\\TA\\Mobile\\ANDROID\\PAGAMENTOS\\001. Recargas Telefonicas\\Report"'
}
}
stage('MOB-AND-PAGAMENTO-001'){ // Name of the test
steps {
uftScenarioLoad archiveTestResultsMode: 'ONLY_ARCHIVE_FAILED_TESTS_REPORT', fsUftRunMode: 'Normal', testPaths: "${env.WORKSPACE}" + '''\\Mobile\\ANDROID\\PAGAMENTOS\\001. Recargas Telefonicas'''
}
}
}
}
The workaround for this that I'm trying is to call for the build, not the uftcenario. Something like this:
pipeline{
agent{
label 'NODE'
}
options {
timeout(time: 30, unit: 'MINUTES')
}
stages{
stage('Checkout') {
steps {
checkout scm: [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'LocalBranch', localBranch: '**']], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/xxx']]]
}
}
stage('MOB-DCS-AND-CHEQUES-001'){ // The stage name
steps {
build 'MOB-DCS-AND-CHEQUES-001'
}
}
stage('MOB-DCS-AND-CHEQUES-002'){ // The stage name
steps {
build 'MOB-DCS-AND-CHEQUES-002'
}
}
stage('MOB-DCS-AND-CHEQUES-003'){ // The stage name
steps {
build 'MOB-DCS-AND-CHEQUES-003'
}
}
}
}
Don't know if this is the best way to do this.
Thank you Best Regards