fix(uncovered-scenarios): tries to find related tests#18
fix(uncovered-scenarios): tries to find related tests#18nunomaduro wants to merge 1 commit into3.xfrom
Conversation
gehrisandro
left a comment
There was a problem hiding this comment.
I am not sure if this is the right approach. This will work in some scenarios, but not in all.
For example, there will be cases where the code under mutation is hit by a test which does not hit any other lines in the same class.
What we should do instead is to check if the line under mutation is considered as executable in the coverage report. I think these lines can be found in the report under executableLinesIn.
If this is not the case, we should run all tests from files having covers() or mutates() for the mutated class and ignore the coverage report for this mutation, as it will always be empty.
I gave this already a try, but didn't find the time to finish yet. Looks like it requires a change on the covers() function itself, to make the list of test files, covering a class, accessible for the mutation plugin.
Tomorrow I am very busy, but I could give it a try on Tuesday.
Due to how coverage works, mutations on properties like these will always be marked as uncovered, as they do not appear in the code coverage report, even if methods like
->getHidden()are tested.This pull request aims to identify which tests might cover these properties by fetching all tests that include one or more covered lines in the same file.