One more time i come here for help. I will try to explain the best way i can.
When we run one pipeline if some test Failed the Stage View do not show the specific stage had failed. Only puts the Build has unstable.
So i check some post about it here like this one [https://stackoverflow.com/questions/36852310/show-a-jenkins-pipeline-stage-as-failed-without-failing-the-whole-job]
I try the solution: catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE'). But still keep's showing like this:
If i force the "sh "exit 1", just to check if it works, it present the fail:
So it´s seems that we have to pass the result from the UFT Test and so the Stage presents the same result.
This is the pipeline from build 7 that i run, "TESTE 2 QUE FALHA" is the test that i know that will fail from UFT, and teste 3 it's to make sure that the Pipeline dont stop and keep running stages to the end even if one or two stage fail.
Im probaly missing something or im not understanding the dinamic of this stage view.
Regards and Thx for any support.
agent{
label 'S-EA311601'
}
options {
timeout(time: 60, unit: 'MINUTES')
}
stages{
stage('1'){
steps{
bat 'del /S /Q "P:\\TA\\eBankaPlus\\R3G\\TRANSFERENCIAS\\001.Transferencia Interbancaria\\Report"'
}
}
stage('TEST 1'){
steps{
uftScenarioLoad archiveTestResultsMode: 'ONLY_ARCHIVE_FAILED_TESTS_REPORT', fsUftRunMode: 'Normal', testPaths: '''P:\\TA\\eBankaPlus\\R3G\\TRANSFERENCIAS\\001.Transferencia Interbancaria'''
}
}
stage('2'){
steps{
bat 'del /S /Q "P:\\TA\\eBankaPlus\\R3G\\TRANSFERENCIAS\\004.Transferencia Conversao Divisas\\Report"'
}
}
stage('TESTE 2 QUE FALHA'){
steps{
uftScenarioLoad archiveTestResultsMode: 'ONLY_ARCHIVE_FAILED_TESTS_REPORT', fsUftRunMode: 'Normal', testPaths: '''P:\\TA\\eBankaPlus\\R3G\\TRANSFERENCIAS\\004.Transferencia Conversao Divisas'''
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE'){
}
}
}
stage('3'){
steps{
bat 'del /S /Q "P:\\TA\\eBankaPlus\\R3G\\TRANSFERENCIAS\\002.Transferencia Interbancaria Outra Conta\\Report"'
}
}
stage('TESTE 3'){
steps{
uftScenarioLoad archiveTestResultsMode: 'ONLY_ARCHIVE_FAILED_TESTS_REPORT', fsUftRunMode: 'Normal', testPaths: '''P:\\TA\\eBankaPlus\\R3G\\TRANSFERENCIAS\\002.Transferencia Interbancaria Outra Conta'''
}
}
}
}