I’m executing my Test Suite in console mode.
What I want is to be able to see an Exit Code returned upon completion. I’m currently not integrating with CI or anything at the moment.
Can I still get an Exit Code returned after running the test suite?
I’d also love to get a simple pass-or-fail return when running a suite. Especially since that could then be used to trigger a message or alert through other channels.
If you execute a Test Suite, there will be an exit code for it already, please refer to this guide:
http://docs.katalon.com/pages/viewpage.action?pageId=786527#CI/CDIntegrations-ExitCodes
Katalons Documentation http://docs.katalon.com/pages/viewpage.action?pageId=786527#CI/CDIntegrations-ExitCodes has a description as follows:
Exit Codes
When you execute Katalon Studio command from CI , exit code will be generated as the output of your execution. You can use this exit code to know whether your execution is successful, passed or failed.
I find this explanation is poor. We need to write a .bat or .sh script to pass the Exit Code from Katalon to Jenkins. The document should present example script (.bat and .sh). You can find my example here
I have made a demo project and pushed in GitHub:
GitHub - kazurayam/ReturningExitCodeFromKatalonToJenkins
-----
Problem to solve
I made a simple Katalon Studio project, which has a test suite named TS0. It invokes 2 test cases named TC1 and TC2. The TC1 always gets success while the TC2 always fails. Consequently the TS0 always finishes with 1 failure.
I wanted to execute the test suite in console. I read the documentation of Console Mode Execution . I made a Windows batch file named run_co…
1 Like
The article mentioned in the comments is no longer available at the documentation. Is it replaced by another article or what happened to it?
http://docs.katalon.com/pages/viewpage.action?pageId=786527#CI/CDIntegrations-ExitCodes
1 Like
From the docs here:
https://docs.katalon.com/katalon-studio/docs/jenkins-integration.html#configuration-steps
You open the ‘Deprecated’ section and down near the bottom it says:
Blockquote
Below is the list of exit codes after console mode execution:
0: the execution passed with no failed or error test case.
1: the execution has failed test cases.
2: the execution has error test cases.
3: the execution has failed test cases and error test cases.
4: the execution cannot start because of invalid arguments.
2 Likes
Jass
August 9, 2019, 6:53am
9
Hi @cpjohnson ,
Thank you so much for your contribution. We have already modified the document based on your feedback.
Happy Testing.
Jass
1 Like