-
Notifications
You must be signed in to change notification settings - Fork 14
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
Test inclusion patterns are derived from application code #19
Comments
Is the problem probably caused by |
See pull request #26 |
Thanks for the test case and the PR @nrainer |
@CaelInria You are welcome :) |
@CaelInria I fear that this problem was reintroduced with 1.3.5. :-/ The point is that we need to explicitly set the patterns for the test cases because otherwise PIT will derive them from the application code (src/main/java) (see [1]). As a consequence, the patterns created by PIT will only match tests in packages that also exist in the application code. Hence, tests in packages that do not exist in the application code will not be considered. A special case are modules without application code, in which PIT will include no test (because no packages in the application code exist). [1] org.pitest.mutationtest.config.ReportOptions.getTargetTestsFilter():300 |
@nrainer Is it the result your are expecting ? |
I fear that it is possible to answer the question based on the HTML report. From what I understand, this report lists the code under test (i. e., application code) but provides no direct information about the executed tests. However, from what I remember when I was debugging PIT to analyze this ticket, I am quite sure that the change is necessary... Can you please check if the tests located in Let me know if you need further information. :) |
Probably easier:
|
I checked the values... this issue is corrected in v1.3.6 :-) |
Cool, thanks for testing and adjusting! 👍 |
Characteristics
The problem is that test inclusion patterns are derived from the application code. (As a consequence, no tests from projects without application code are executed.)
Old ticket: Tests from modules without application code are skipped
Description
Modules that contain exclusively tests (and no source code) are skipped from the analysis. For example, some projects have a dedicated module for integration tests, which is skipped in this case. (Actually, the tests of this project get skipped, but the mutations analysis is conducted. A result file is created.) Hence, not all tests of a project will get executed.
Steps to reproduce
core
,extension
, andtests
. All modules contain tests, all modules excepttests
contain application code. The moduletests
does not contain application code and has nosrc/main/java
folder.mvn clean install
, run pit-mp usingmvn eu.stamp-project:pitmp-maven-plugin:run
MyTest
from the moduletests
covers a class from the moduleextension
but does not get executed. See the attached mutation matrix.Files
The text was updated successfully, but these errors were encountered: