code覆盖在AngularJS量角器测试 [英] Code coverage for Protractor tests in AngularJS

查看:210
本文介绍了code覆盖在AngularJS量角器测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的angularJS用量角器应用程序运行某些端到端的测试(如angularJS文档中推荐)。
我周围的一派,找不到如何衡量覆盖我的量角器测试的任何信息。

I am running some e2e tests in my angularJS app with protractor (as recommended in the angularJS documentation). I've googled around and cannot find any information on how to measure coverage for my protractor tests.

我想我失去了一些东西......有没有什么办法来获取量角器端到端测试一个code覆盖报告?还是纯粹的单元测试的功能?

I think I'm missing something here... is there any way to get a code coverage report for protractor e2e tests? Or is it simply a feature for unit tests?

推荐答案

如果您使用的是咕噜 - 您可以使用的咕噜-量角器覆盖的插件,它会为你做的工作。你将不得不仪器code,然后再使用该插件提到为您创建覆盖报告。

if you are using grunt - you can use grunt-protractor-coverage plugin, it will do the job for you. You will have to instrument the code first and then use the mentioned plugin to create coverage reports for you.

这篇关于code覆盖在AngularJS量角器测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆