昨天,我编写并运行了 Katalon 测试套件,今天,我尝试将 Katalon 与 Jenkins 集成。我成功设置了 Jenkins,为 Katalon 测试创建了一个新作业,as per these instructions ,但是当我去构建它时,我的构建失败了。
特别是,这是我不断收到的错误消息:
Recording test results
ERROR: Step ‘Publish JUnit test result report’ failed: No test report files were found. Configuration error?
Finished: FAILURE
我继续将 Reports
文件夹结构从我指定的项目目录复制到 Jenkins 工作区。经过后来的检查,我发现,当 Jenkins 运行 Katalon 测试时,JUnit_Report.xml
文件实际上是在项目的 Reports
文件夹中创建的,而不是在 >%JENKINS_HOME%\workspace\[项目名称]\Reports
。我明确告诉它生成测试报告:Reports/LoginSuite/*/JUnit_Report.xml
。
注意:我使用的是 Windows 计算机。
如何修复此问题以便可以显示 Jenkins 的测试结果?!
更新:我已将 Windows shell 代码修改为以下内容
C:
cd C:\Katalon
katalon -runMode=console -projectPath="C:\Users\mwarren\Katalon Studio\TestProject" -reportFolder="../../.jenkins/workspace/Katalon Studio Tests/Reports" -reportFileName="report" -retry=0 -testSuitePath="Test Suites/LoginSuite" -browserType="Chrome"
尽管现在正在那里创建测试,但它仍然给我同样的错误。
最佳答案
关于Jenkins 未从 Workspace 中的 Katalon 测试创建 JUnit 测试报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50725750/