简体   繁体   English

测量驻留在单独项目中的硒测试的代码覆盖率

[英]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.

相关问题 带有单独测试模块的 Maven 多模块项目 - 代码覆盖率? - Maven multi module project with separate tests module - Code Coverage? 使用Java中的单独测试项目的Scala的代码覆盖率 - Code coverage for scala with separate test project in java SonarQube无法使用Java 8测量代码覆盖率 - SonarQube not measuring code coverage with Java 8 如何计算关于Web应用程序代码的selenium测试的代码覆盖率 - How to calculate code coverage of selenium tests with respect to web application code NetBeans单独模块中集成测试的jacoco代码覆盖率 - jacoco code coverage of integration tests in a separate module in Netbeans 运行UI selenium功能测试后的应用程序代码覆盖率 - application code coverage after running UI selenium functional tests 获得Integration测试使用TestNG构建的Java项目的代码覆盖率 - Getting Integration tests code coverage of java project built using TestNG 功能测试的代码覆盖率 - Code coverage for functional tests Manuel在Sonarqube上测试代码覆盖率 - Manuel Tests Code coverage on Sonarqube 是否可以使用 JSCover 或任何其他工具来获得在浏览器中运行 Java Selenium WebDriver 测试的 JavaScript 代码覆盖率? - Is it possible to use JSCover or any other tool to get JavaScript code coverage running Java Selenium WebDriver tests in Browser?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM