-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option for covering tests #98
Conversation
Signed-off-by: André Silva <[email protected]>
Pull Request Test Coverage Report for Build 986463211Warning: 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
💛 - Coveralls |
...u/stamp_project/testrunner/runner/coverage/JUnit4JacocoRunnerCoveredResultPerTestMethod.java
Outdated
Show resolved
Hide resolved
...u/stamp_project/testrunner/runner/coverage/JUnit4JacocoRunnerCoveredResultPerTestMethod.java
Outdated
Show resolved
Hide resolved
Signed-off-by: André Silva <[email protected]>
Btw, when using this in
Any idea? It happens when instrumenting the class files for normal source code classes, which come from the same place as the normal tests. |
I'm sorry, but I have no clue what is happening here.
Could you explain a bit more? I'm sorry, I did not fully understand |
Signed-off-by: André Silva <[email protected]>
The last commit fixes the issue. The classloader in Don't merge just yet tho, the coverage is including the tests but then doesn't register which instructions are ran. I'm trying to fix it, and will add new test cases to check that. |
Signed-off-by: André Silva <[email protected]>
So, I think there is an issue with the way I have added two test cases that showcase the difference between the old way [1] The old way of The corresponding function in test-runner/src/main/java/eu/stamp_project/testrunner/runner/coverage/JacocoRunner.java Lines 233 to 285 in d7dd726
[2] The new way of using Lines 63 to 92 in d7dd726
So, after debugging, my current hypothesis is that the issue is related to this difference, with the test statements somehow not being recorded until the whole execution finishes? @danglotb @martinezmatias do any of you have any idea what could be causing this? |
I did not completely understand the issue but one thing is certain: You should not use directly the |
Yes, definitely. That's why we already moved to using
So, one feature that was broken when we started using For example:
My hypothesis is that this occurs due to the data collection having moved from the |
I'm sorry I cannot see it through right now but I remember having such troubles by the time I was developing I fetch your branch and ran java.lang.AssertionError:
Expected :Optional[2]
Actual :3 I'm sorry but I would like to have a complete scenario that allows me to reproduce. Could you provide me this or help me to find it? |
Signed-off-by: André Silva <[email protected]>
I'm so sorry, I seem to have reverted a change before committing 🤦 . Assertions are working now. The two tests in question are The first one shows the buggy behavior, since the expected result is the one the second one returns. I added some prints in the test cases to show the two versions that should be equal. This means that the coverage of class I think these two tests provide the complete scenario, with the expected behavior from the previous version, and the buggy behavior from the new version, but let me know if you need anything else! Thank you for your time :) |
Is this still a work in progress or should we close it? |
Hi @danglotb. I'd say we close it, I'm no longer working on it. |
This PR presents a new option for test-runner, covering test classes.
Closes #96
Related to ASSERT-KTH/flacoco#41