Menu

way to get coverage value from java code

2013-11-08
2013-12-11
  • ivan dell'oro

    ivan dell'oro - 2013-11-08

    Hi all,
    i'm new to Emma, and in my project i need to get coverage value at runtime. I've used (i know is deprecated but i need it) dumpCoverageData (File outFile, final boolean merge, final boolean stopDataCollection) but i need to read the dumped file to get coverage values. There is a way to get that number? I really need it...
    Thank's all

     
  • ivan dell'oro

    ivan dell'oro - 2013-12-10

    Found a solution using
    CtlProcessor ctl=CtlProcessor.create();
    ControlRequest[] cr=new ControlRequest[2];
    cr[0]=ControlRequest.create(ControlRequest.COMMAND_DUMP_COVERAGE, null);
    cr[1]=ControlRequest.create(ControlRequest.COMMAND_RESET_COVERAGE, null);
    ctl.setCommandSequence(cr);
    ctl.run();
    but i'm not sure of these commands usage and no docs found about them.
    Any ideas?

     
    • Alexandre Locci Martins

      Hi Ivan

      Maybe you can help me with a problem little more simple.
      I need to make some changes at emma source code, but I do not know how
      compile the emma code with my changes.
      I fallow the instructions in the site but it does not work.
      Indeed, what I intend to do is loaded emma source code on the eclipse and
      make may changes there.
      Do you have any idea to solve my problem?
      Tu

       
  • ivan dell'oro

    ivan dell'oro - 2013-12-11
     

    Last edit: ivan dell'oro 2013-12-11

Log in to post a comment.