Continuous integration with Gitlab

This is a companion discussion topic for the original entry at

how do I perform the Continuous integration with Gitlab for API Automation.
I have the WebAPI project in Katalon studio

Chrome browser is not opening run through gitlab CI/CD in windows Os

I am using following command in .gitlab-ci.yml

katalon -runMode=“console” -projectPath=“C:\Users\rshankar\Katalon Studio\DEMO\DEMO.prj” -retry=0 -testSuitePath=“Test Suites/demo” -executionProfile=“default” -browserType=“Chrome”

chrome browser is not opening in windows OS

Hi Mehran,

CI/CD feature shouldn’t be used that way. Actually, if you need to watch the browser while executing the test cases, then you probably should run the automated test by yourself (not through the CI/CD feature).
Also, although the browser is not opening in Windows, you will find screenshots and test results in your Katalon test case folder after running them. Is it OK for you?

Sorry for my late reply, but if you need any further help, don’t hesitate to contact me via:
Skype: my ID is ahkaram2p

I think you should be able to do it in the same explained in my article. Are you facing some error? Are you stuck at some step?
If you really need my help, you can contact me via:
Skype: my ID is ahkaram2p

Again sorry for my late reply. Don’t hesitate to reach me at any time, and I will be glad to help :slight_smile:

Is this manual still valid?
Should “Requirements” be updated with Runtime Engine?
Starting from v7 Katalon needs Runtime Engine to execute tests from the command line.
Right now CI pipeline logs return

katalon : The term 'katalon' is not recognized as the name of a cmdlet, function, script file, or operable program.

[20]Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

[21]At C:\WINDOWS\TEMP\build_script472540737\script.ps1:165 char:1

[22]+ katalon -noSplash -runMode=console -consoleLog -projectPath= "C:\Use ...

[23]+ ~~~~~~~

[24] + CategoryInfo : ObjectNotFound: (katalon:String) [], CommandNotFoundException

[25] + FullyQualifiedErrorId : CommandNotFoundException


[29]9) ERROR: Job failed: exit status 1

Did I miss something?

Most probably, you didn’t add Katalon path to your environment variables… could you please check this section in the article?

I did! Environment variables were updated with Katalon path. And this did not work even when I cd to my working directory via cmd and run the test after. And it will not work without a license. I have found the temporary solution - downgrade my Katalon version to 6.3.3 and now it works with the same steps, since 6.3.3 doesn’t require a license! So should this manual be updated or 7.2.4 version require some extra settings I have missed and this is not about the license?

And one more question.
GitLab pipeline result is always “passed”, even if a few test cases failed. As I understand the “passed” result means “job was run and finished”, this is about the job itself, but not about the test cases. How to validate test cases? Is there a way to get “failed” pipeline status if 7 test cases were run and 2 test cases were failed?

A job is considered as failed when its return code is not equal to zero. You can print exit code like this example (at the bottom of the below figure):

So, make sure that your job doesn’t return 0.

I have some questions about Gitlab CI,
Please check it my steps is right or not?
1)After configured gitlab-ci.yaml , when a new code comit , gitlab-Runner will be triggered to run test
2) gitlab-Runner invoke Katalon Runtime Engine to run case.
That is to say, gitlab-runner and Katalon Runtime Engine should in same server ?
3) And the command has one item -projectPath= to specify the case location,
That is to say, we should copy the cases, which is written in Katalon Studio (in another server), to projectPath location (in Katalon Runtime Engine server) ?