在Jenkins中发布业力单元测试

在Jenkins中发布业力单元测试

本文介绍了在Jenkins中发布业力单元测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Jenkins 已经建立了我的Maven Java项目.我希望在Jenkins中显示 karma 单元测试的结果,但是很遗憾,我无法进行任何配置更改在詹金斯.应如何配置业力以实现这一目标?

Jenkins already builds my Maven Java project. I want the results of karma unit tests to show up in Jenkins, but unfortunately I cannot introduce any configuration changes in Jenkins. How karma should be configured to acomplish that?

推荐答案

  • 为了让Jenkins能够解析业力测试结果,它们必须以Junit XML格式发布,该插件是 karma-junit-reporter
  • junit测试结果(因果配置文件中的outputFile)必须存储在target/surefire-reports/TESTS-TestSuite.xml
    • in order for Jenkins to be able to parse karma test results they must be published in the Junit XML format, the plugin that does that is karma-junit-reporter
    • junit test results (outputFile in the karma configuration file) must be stored in target/surefire-reports/TESTS-TestSuite.xml
    • 这篇关于在Jenkins中发布业力单元测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-03 20:15