- Jenkins’ Publish JUnit test result report uses as basedir of the fileset: the workspace root.
- Katalon’s example using simply Reports as foldername however uses Katalon project’s root folder.
- Due to a bug when running a Test Collection where reports are getting overwritten due to having the same filename, (Works fine for generating the Katalon’s files because they are placed under different subfolders, but when running Katalon in console mode with the Report options results in the end that the reports are copied all under one folder however),
Im now using the following way in Jenkins as a workaround.
I) Under Build Execute Windows batch command I’m using:
katalon -noSplash -runMode=console -projectPath="C:\Katalon_Studio_Projects\ESB API\ESB API.prj" -retry=0 -testSuiteCollectionPath="Test Suites/TSC-Regression"
SET LEVEL = %ERRORLEVEL%
robocopy "C:\Katalon_Studio_Projects\ESB API\Reports" "C:\Jenkins\workspace\Katalon Studio - ESB API\Reports" /E /COPYALL /V /NP /R:0
ofcourse this is just an example replace values as needed
Im not using the Report output options on the Katalon console mode command but just let all output be generated under their standard folders only and then uses robocopy to copy all new files (or just the needed JUnit xml files if you prefer) to the Jenkins project’s workspace
II) Under the Post-build Actions - Publish JUnit test result report:
I used following for “Test report XMLs” : Reports\\\*\JUnit_Report.xml
I now only have one issue still though with the JUnit_Report.xmls that are generated (I need to make a BUG report for that today): Info in xml is inconvenient/incomplete:
- There is NO subdivision for Test Suite names (TestCase name is re-used instead)
- Timings are not in milliseconds and Timings are missing on several levels.