Hi Jakub,
thanks for the proposal and the detailed description! Some remarks your
possible solution:
* JaCoCo is a code coverage tool with low overhead and scales even for
very large test sets. Collecting additional information like call
traces and execution times are clearly out of scope.
* To clearly manage expectations: Of course you can implement this
based on the free JaCoCo. But unless you come up with a solution
with very little additional complexity and overhead it is very
unlikely that we will incorporate this into the JaCoCo main
development line.
* JaCoCo simply sees Java classes, it has no notion of e.g. JUnit test
cases.
But I think there is a slightly different solution which should solve
your problem (this solution is already implemented in SonarQube to some
extend):
* Implement a JUnitExecutionListener which uses the public JaCoCo
runtime API
<http://www.jacoco.org/jacoco/trunk/doc/api/org/jacoco/agent/rt/package-summary.html>.
* The execution listener creates a separate session id and dump for
every test case.
* Implement a new Analyzer based on the JaCoCo analysis APIs which
combines multiple sessions into a single report. Note that the exec
files already contains dump timestamps.
Cheers,
-marc
On 26.06.17 09:04, Jakub Schwan wrote:
With increasing number of tests, their execution time increases as
well. Currently, various tools provide metrics of test code coverage.
These metrics however do not help identify duplicate test coverage,
that leads only to unnecessary increase of test execution time without
any benefit to effective code coverage. Information about duplicate
coverage and execution time of duplicate tests would be a valuable
help for subsequent refactoring of test code base.
JaCoCo is very useful tool and with this new functionality we can
provide more helpful information about the test coverage.
_Possible solution:_
1.
Extend the data file format to include data about
*
Caller (test invoking the piece of code e.g.: line, branch,
method, class,…)
*
Time spent in the piece of code
2.
Enhance the code coverage tool to store information described in
point 1
3.
Enhance the tool’s reporting capabilities to present information about
*
Duplicate code coverage
*
Time spent in running tests
I have no problem to discuss about better solutions.
_What I want to do:_
I want to implement solution and write a bachelor thesis at my
university (Faculty of Informatics, Masaryk University, Brno, Czech
Republic) about this.
_Expected result:_
Functional solution and report capability to present information.
How do you like this idea? Best regard,
Jakub Schwan
--
You received this message because you are subscribed to the Google
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/cdd5ecf2-a2b8-4488-8e13-4b3928fb0a6f%40googlegroups.com
<https://groups.google.com/d/msgid/jacoco/cdd5ecf2-a2b8-4488-8e13-4b3928fb0a6f%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "JaCoCo
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/bedef632-11dd-4d68-bd25-3f0ded9ab112%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.