【问题标题】:WebSphere cannot start webapp instrumented by coberturaWebSphere 无法启动由 cobertura 检测的 webapp
【发布时间】:2013-03-03 18:34:50
【问题描述】:

我为几个课程设置了仪表,将它们打包在战争和耳朵中。在 WebSphere 中安装这个耳朵。 现在此应用程序状态已停止。 我应该放置 cobertura.jar 吗?我的错在哪里?

【问题讨论】:

  • 如果您可以提供有关您的问题的更多详细信息(可能是不起作用的代码),您更有可能获得富有成效的响应。如果没有更多细节,潜在的回答者很难提供帮助。

标签: websphere code-coverage cobertura


【解决方案1】:
  1. Websphere 应用程序服务器允许部署/安装 ear,因此请使用 cobertura 检测类构建您的应用程序 ear。
  2. 将默认生成的 cobertura.ser 文件复制到系统中的 target/cobertura/cobertura.ser 位置,同时 maven 构建,到 WAS 的 ../AppServer/profiles/AppSrv01/ 位置。
  3. 启动服务器
  4. 运行一些睾丸。
  5. 停止服务器。 cobertura.ser 将得到更新。

运行 cobertura 报告。

【讨论】:

    【解决方案2】:

    阅读此文档时我解决了很多问题:http://mojo.codehaus.org/cobertura-maven-plugin/instrumentingDeploymentArtifact.html

    在 /ibm/was/profiles/profile/

    中找到了我的 cobertura.ser

    【讨论】:

      【解决方案3】:

      Cobertura 乐器类能够to identify which parts of your Java program are lacking test coverage

      我认为它添加了自己的类,以便它们收集信息并在测试覆盖阶段结束时将其写入数据存储。话虽如此,我希望 cobertura.jar 和其他一些 jar 应该包含在 webapp 的 WEB-INF/lib 目录中。

      要获得有关此问题的更多见解,请查看服务器实例的 SystemOut.log。它在[WEBSPHERE_HOME]/profiles/[PROFILE_NAME]/logs/server1 目录中。

      【讨论】:

        猜你喜欢
        • 2014-06-16
        • 1970-01-01
        • 1970-01-01
        • 2023-03-22
        • 1970-01-01
        • 2015-08-15
        • 1970-01-01
        • 1970-01-01
        • 2012-11-21
        相关资源
        最近更新 更多