how to get the testcomplete actiononerror status in jenkins pipeline
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how to get the testcomplete actiononerror status in jenkins pipeline
Hello,
I have tests running in jenkins pipeline and I have the following script to run the test and send the email at the end of the test. But I want to make the email sent with condition where if the actionOnError = Make_Failed then send the email
node("windows") {
git credentialsId: 'GitHub-clientid', url: 'https://github.xxx.com/ea-e2e-test.git', branch: 'master'
withVault(configuration: [timeout: 60, vaultCredentialId: 'credensid', vaultUrl: 'https://vault.xxx.com'],
vaultSecrets: [[engineVersion: 1, path: 'secret/cloudbees/platforms/testing',
secretValues: [[envVar: 'USERNAME', vaultKey: 'username'], [envVar: 'PASSWORD', vaultKey: 'password']]]]) {
testcompletetest commandLineArguments: "/run /psv:env=pro /psv:username=${USERNAME} /psv:password=${PASSWORD}", generateMHT: true, launchType: 'lcProject', actionOnErrors: 'MAKE_FAILED', project: 'TestProject_EAProd', suite: 'TestProject_EA.pjs'
}
// here I need to check that actionOnErrors value and if its only when failed then send the email.
if (actionOnErrors=='MAKE_FAILED'){
emailext (
subject: 'EA Smoke test results in Prod',
body: 'Please click below to access the test results \n' + env.BUILD_URL+'/TestComplete/',
to: 'abc@gmail.com',
from: 'donotreply@cloudbees.xxx.com')
}
}
TIA
Solved! Go to Solution.
- Labels:
-
Command Line
-
Test Results
-
Web Testing
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry I had some problems myself fixing this haha,
But this should work I did some testing with this script.
node("windows") {
git credentialsId: 'GitHub-clientid', url: 'https://github.xxx.com/ea-e2e-test.git', branch: 'master'
withVault(configuration: [timeout: 60, vaultCredentialId: 'credensid', vaultUrl: 'https://vault.xxx.com'],
vaultSecrets: [[engineVersion: 1, path: 'secret/cloudbees/platforms/testing',
secretValues: [[envVar: 'USERNAME', vaultKey: 'username'], [envVar: 'PASSWORD', vaultKey: 'password']]]]) {
testcompletetest commandLineArguments: "/run /psv:env=pro /psv:username=${USERNAME} /psv:password=${PASSWORD}", generateMHT: true, launchType: 'lcProject', actionOnErrors: 'MAKE_FAILED', project: 'TestProject_EAProd', suite: 'TestProject_EA.pjs'
}
// Use the error step to check if the previous stage has failed
error message: 'Test failed. Sending email notification.',
emailext (
subject: 'EA Smoke test results in Prod',
body: 'Please click below to access the test results \n' + env.BUILD_URL+'/TestComplete/',
to: 'abc@gmail.com',
from: 'donotreply@cloudbees.xxx.com')
}
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply. I looked at some forums online and as mentioned in the cloudbees documentation, I changed my pipeline script similar to this one in this URL and it is working fine.

- « Previous
-
- 1
- 2
- Next »
- « Previous
-
- 1
- 2
- Next »