STAMP-project / test-runner

test driver to run JUnit tests isolated in a new JVM
GNU General Public License v3.0
16 stars 15 forks source link

CoveredTestResultPerTestMethod API #95

Closed andre15silva closed 3 years ago

andre15silva commented 3 years ago

This PR introduces a new API in test-runner's EntryPoint.

It's purpose is to return a CoveredTestResultPerTestMethod object, which contains the information relative to the coverage per test method, as well as the test execution results.

andre15silva commented 3 years ago

If you want to review the current state of the PR, the content shouldn't change much.

I'm working on a few more test cases to cover everything new, cleaning and documenting the code.

monperrus commented 3 years ago

Cool, thanks @andre15silva. @danglotb would you be available for a code review?

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 968000076

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/main/java/eu/stamp_project/testrunner/listener/CoveredTestResultPerTestMethod.java 0 1 0.0%
src/main/java/eu/stamp_project/testrunner/runner/coverage/JUnit4JacocoRunnerCoveredResultPerTestMethod.java 18 20 90.0%
src/main/java/eu/stamp_project/testrunner/runner/coverage/JUnit5JacocoRunnerCoveredResultPerTestMethod.java 18 20 90.0%
src/main/java/eu/stamp_project/testrunner/EntryPoint.java 17 23 73.91%
src/main/java/eu/stamp_project/testrunner/listener/junit5/CoveredTestResultsPerJUnit5TestMethod.java 24 34 70.59%
src/main/java/eu/stamp_project/testrunner/runner/coverage/JacocoRunnerCoveredResultPerTestMethod.java 15 27 55.56%
src/main/java/eu/stamp_project/testrunner/listener/impl/CoveredTestResultPerTestMethodImpl.java 52 71 73.24%
src/main/java/eu/stamp_project/testrunner/listener/junit4/CoveredTestResultsPerJUnit4TestMethod.java 28 110 25.45%
<!-- Total: 173 307 56.35% -->
Totals Coverage Status
Change from base Build 956488870: 2.1%
Covered Lines: 1006
Relevant Lines: 2298

💛 - Coveralls
andre15silva commented 3 years ago

PR ready for review.

I have a pending issue with test-runner's usage in https://github.com/SpoonLabs/flacoco/pull/35#issuecomment-867634527, but since this API works in the test-runner's test suite, I'm not sure what is causing it. Any tip appreciated!

danglotb commented 3 years ago

You increased the coverage! https://coveralls.io/jobs/82527638 Thank you