Emma 运行时控制器未启动

发布于 2024-11-17 03:47:01 字数 1954 浏览 5 评论 0原文

我的主要目标是使用 CTLcoverage.get 在正在运行的 Web 应用程序上使用 EMMA 来获取代码覆盖率。 我使用 emma maven 插件。

因此,我使用经过检测的代码部署我的 Web 应用程序。
在 tomcat 日志中看到:

EMMA: collecting runtime coverage data ...

但没有:

EMMA: runtime controller started on port [47653]

这意味着我无法使用 ctl,因为没有人在监听它。
运行时控制器未启动的原因可能是什么?

我的父母 pom.xml:

<project>
        ...
         <build>
            <plugins>
                ...
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                        <artifactId>emma-maven-plugin</artifactId>
                        <inherited>true</inherited>   
                        <executions>
                            <execution>
                                <id>instrument</id>
                                <phase>process-test-classes</phase>
                                <goals>
                                    <goal>instrument</goal>
                                </goals>
                            </execution>                            
                        </executions>
                </plugin>
                ...
            </plugins>
        </build>
        ... 
        <reporting>
            <plugins>        
                ...
                <plugin>      
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>emma-maven-plugin</artifactId>
                    <version>1.0-alpha-3</version>
                    <inherited>true</inherited>      
                </plugin>
                ...
            </plugins>
        </reporting>
        ...
    </project>

提前致谢。任何提示都将受到高度赞赏。

My primary goal is to get code coverage using EMMA on a running web application using CTL coverage.get.
I use emma maven plugin.

So, I deploy my web application with instrumented code.
In tomcat log is see:

EMMA: collecting runtime coverage data ...

but there is no:

EMMA: runtime controller started on port [47653]

Which means that Im not able to use ctl as nobody is listening for it.
What could be the reason of runtime controller not starting?

My parent pom.xml:

<project>
        ...
         <build>
            <plugins>
                ...
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                        <artifactId>emma-maven-plugin</artifactId>
                        <inherited>true</inherited>   
                        <executions>
                            <execution>
                                <id>instrument</id>
                                <phase>process-test-classes</phase>
                                <goals>
                                    <goal>instrument</goal>
                                </goals>
                            </execution>                            
                        </executions>
                </plugin>
                ...
            </plugins>
        </build>
        ... 
        <reporting>
            <plugins>        
                ...
                <plugin>      
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>emma-maven-plugin</artifactId>
                    <version>1.0-alpha-3</version>
                    <inherited>true</inherited>      
                </plugin>
                ...
            </plugins>
        </reporting>
        ...
    </project>

Thanks in advance. Any hint is highly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

陌路黄昏 2024-11-24 03:47:01

试试这个:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.10</version>
    <configuration>
         <systemPropertyVariables combine.children="append">
             <emma.rt.control>true|false</emma.rt.control>
         </systemPropertyVariables>
    </configuration>
</plugin>

Try this:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.10</version>
    <configuration>
         <systemPropertyVariables combine.children="append">
             <emma.rt.control>true|false</emma.rt.control>
         </systemPropertyVariables>
    </configuration>
</plugin>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文