[英]Measuring code coverage for selenium tests that reside in separate project
I have two separate java maven projects: one is my web app itself and other one is tellurium+selenium automation tests for my web(I moved these tests to separate projects as their code doesn't really belong to the web app project code and doesn't use java classes of my web app, also I want to reuse some parts of those tests for testing my other web apps). 我有两个独立的java maven项目:一个是我的web应用程序本身,另一个是我的web的碲+硒自动化测试(我将这些测试移动到单独的项目,因为他们的代码并不真正属于Web应用程序项目代码而且没有不使用我的网络应用程序的java类,我也想重用这些测试的某些部分来测试我的其他网络应用程序)。 Therefore, project where my tests reside doesn't know anything about my web app, except tellurium/selenium conf files(host name, credentials, browser).
因此,我的测试所在的项目对我的Web应用程序一无所知,除了碲/ selenium conf文件(主机名,凭据,浏览器)。
So the question: is there any way to measure code coverage of my web app backend that is invoked by my tellurium/selenium tests that reside in separate project? 所以问题是:有没有办法测量我的web应用程序后端的代码覆盖率,这是由我的碲/硒测试调用的,这些测试位于单独的项目中?
Thanks in advance. 提前致谢。 Any help is highly appreciated.
任何帮助都非常感谢。
EMMA or cobetura can instrument your classes so that after the test run they create a coverage report. EMMA或cobetura可以检测您的课程,以便在测试运行后创建一个覆盖率报告。
http://emma.sourceforge.net/reference/ch02s03.html http://emma.sourceforge.net/reference/ch02s03.html
<instr>/instr is EMMA's offline class instrumentor. It adds bytecode
instrumentation to all classes found in an instrumentation path that
also pass through user-provided coverage filters. Additionally, it
produces the class metadata file necessary for associating runtime
coverage data with the original class definitions during coverage
report generation.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.