[英]Jenkins test coverage report for JavaScript tests
We run a CI environment with Jenkins and the Project is in ExtJS 3.2. 我们使用Jenkins运行CI环境,并且该项目在ExtJS 3.2中。 I am not able to find a clear line on how to setup the test coverage for JS code in Jenkins.
我无法找到关于如何在Jenkins中设置JS代码的测试范围的明确方法。 We write UI tests using selenium and Cucumber.
我们使用硒和黄瓜编写UI测试。 The build file has a UI tests target which is run every time the CI machine runs a build.
构建文件具有UI测试目标,每次CI机器运行构建时都会运行该目标。 I am not able to find a plugin that will give me or publish the coverage report of these tests that have been run as a resulting atrifact in Jenkins.
我找不到能给我提供或发布这些测试的覆盖率报告的插件,这些测试是在詹金斯(Jenkins)中导致不合时宜的结果。 Or please help me out if there is some other way to achieve the same thing.
或者,如果还有其他方法可以实现同一目标,请帮助我。
I think you can use JSCover to generate code coverage when using Selenium: 我认为您可以在使用Selenium时使用JSCover生成代码覆盖率:
If you start a new browser for each Cucumber scenario/feature, then you need to save the coverage data between each scenario/feature, combine them after all features are done and then process them into a nice report. 如果为每个Cucumber场景/功能启动一个新的浏览器,则需要保存每个场景/功能之间的coverage数据,在完成所有功能后将它们合并,然后将它们处理成一个不错的报告。 JSCover supports merging of multiple data sources and creating LCOV reports.
JSCover支持合并多个数据源并创建LCOV报告。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.