Qunit + JSCoverage + Jenkins [英] Qunit + JSCoverage + Jenkins
问题描述
我已经开始使用Qunit测试我的JS代码.我正在研究JSCoverage,以便稍后生成覆盖率报告.我们有一个CI服务器(Jenkins),已经在用我们的PHP代码做一些事情,我想知道是否有人可以评论如何将我的Qunit和JSCoverage的报告集成到Jenkins中.
I have started using Qunit to test my JS code. I am looking into JSCoverage to generate the coverage reports later. We have a CI server (Jenkins) which already do a few things with our PHP code and I was wondering if anyone can comment on how I can integrate the report from my Qunit and JSCoverage into Jenkins
谢谢 稀疏
推荐答案
QUnit:使用 QUnit API 生成 junit XML 文件. 这里是一个示例.
QUnit: use QUnit API to generate junit XML files. Here's a sample.
在您的工作的构建后操作中,然后选中 Publish JUnit测试结果报告,并指定您的junit XML文件(或其文件模式).然后,詹金斯(Jenkins)将测试失败的构建标记为不稳定,并生成成功/失败测试的良好趋势图.
In Post-build Actions for your job you then check Publish JUnit test result report and specify your junit XML files (or their file pattern). Jenkins will then mark builds that have failed tests as unstable and produce a nice trend graph of successful/failing tests.
这篇关于Qunit + JSCoverage + Jenkins的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!