We are using Katalon Studio 5.9.1 to automate about 100 tests for our AngularJS applications. We did not find much on the Internet about TeamCity Continuous Integration, so I am posting this here for feedback.
There are three parts: creating the TC job, configuring the Junit results, and adding the Katalon HTML report.
1. Creating Katalon Job in TeamCity
Created one project with a separate build configuraiton for each Katalon test suite.
When setting up checkout rules, we had to check out to a subdirectory of the work folder. E.g., /Katalon
Next, create a Command-line Build Step to run the Katalon command. You can find the command on the Internet or generate it from Katalon studio.
D:\\Katalon\_Studio\_Windows\_64\\katalon.exe -runMode=console -projectPath="%system.teamcity.build.checkoutDir%\\Katalon\\My-Katalon-Project.prj" -testSuitePath="Test Suites/My\_Test_Suite" -reportFolder "Reports/%system.teamcity.buildType.id%/%build.number%" -browserType="Chrome"
Note that we used the -reportFolder option to specify the output. This was to ensure that each report was unique by build type and number. Notice the project ID and build number in the report path.
2. Configuring JUnit Results
This configuration is to display the test counts in the job run status, as well as to see the Tests tab. The test tab shows each test that passed or failed. Without this step, you have to comb the build log for failures.
Create a Build Feature of type XML Report Processing, report type of Ant Junit.
Set the path to:
Note the path matches that specified about in the report folder. The JUnit_Report.xml file is generated by Katalon.
3. Add Katalon HTML Report
Edit on 12/13/2018, fix artifact path and report path.
From General Settings, Build Configuration, set the artifact path
From project, Report tabs, Create new build report tab.
We named it “HTML Report”. Enter the path: report.html
The reports.html file is a nice report that Katalon generates which includes screenshots of failed tests.