简体   繁体   English

没有单元测试的javascript覆盖率

[英]javascript coverage without unit tests

In a legacy webapp, we haven't any unit test on the javascript part. 在传统的webapp中,我们没有对javascript部分进行任何单元测试。
We want to increase the code quality and delete dead code. 我们希望提高代码质量并删除死代码。
Is there any way to have line-by-line Javascript code coverage statistics in the browser during human test ? 在人体测试期间,有没有办法在浏览器中提供逐行的Javascript代码覆盖率统计? Is it possible to do that with istanbul for example ? 例如,伊斯坦布尔是否可以这样做?

Executing every use case in a single human testing session could be painful, I don't recommend this approach. 在单个人体测试会话中执行每个用例可能会很痛苦,我不推荐这种方法。 There is a lot of automated integration test framework like http://casperjs.org or http://nightwatchjs.org with which you can code your test scenario in a close to human semantic. 有许多自动化集成测试框架,如http://casperjs.orghttp://nightwatchjs.org ,您可以使用它来编写接近人类语义的测试场景。

Imo, automation is not a waist of time ;) Imo,自动化不是时间的腰;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM