Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6962405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:39:22+00:00 2026-05-27T15:39:22+00:00

i followed the steps that are given for cobertura report and i generated report

  • 0

i followed the steps that are given for cobertura report and i generated report with following steps given in the URL Cobertura on Tomcat

but now my problem is to generate cobertura report without stopping tomcat

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:39:23+00:00Added an answer on May 27, 2026 at 3:39 pm

    There are only 2 Ways to create a coverage data file.

    1. Stop Tomcat
    2. Execute a piece of code, that tells cobertura to write the file

    Regarding the Second approach: You have to call this function yourself, after your tests run. You could (for example) put this code in a servlet (which you call at the end of your tests).

    If you don’t stop Tomcat or execute the function, you will not get a coverage data file.

    This is from the cobertura FAQ

    Cobertura only writes the coverage data file when the application server shuts down. We do not want to stop our application server after running our tests.
    It is possible to instruct Cobertura to write the data file. One of
    your classes should call the static method
    net.sourceforge.cobertura.coveragedata.ProjectData.saveGlobalProjectData().
    For example, you could add something like this to a “logout” method in
    your web application:

    try {
        String className = "net.sourceforge.cobertura.coveragedata.ProjectData";
        String methodName = "saveGlobalProjectData";
        Class saveClass = Class.forName(className);
        java.lang.reflect.Method saveMethod = saveClass.getDeclaredMethod(methodName, new Class[0]);
        saveMethod.invoke(null,new Object[0]);
    } catch (Throwable t) {}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The steps that I followed to instrument the Cobertura instrumenting the sources with cobertura
I've followed the steps given in the Android Developer Blog to generate a build.xml
I followed steps for package deployment on SQL given in MSDN and it was
I'm developing simple CUDA app. I followed steps given on http://www.ademiller.com/blogs/tech/2010/10/visual-studio-2010-adding-intellisense-support-for-cuda-c/ but still there
I followed the steps using this site : http://wiki.apache.org/nutch/RunNutchInEclipse I encountered a problem while
I followed the following steps to create a ActiveX control: - Create a new
Im trying to use the sdk without a canvas application, so have followed steps
i originally followed these steps to get a RoR environmentgoing: https://help.ubuntu.com/community/RubyOnRails that worked. then
I am using SQL Server 2008 r2. Did the following steps. But it does
These are the incomplete steps that i have followed to call a native function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.