Skip to content
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

Mutation testing (and reporting) across Maven modules #376

Open
NicoleRauch opened this issue Jul 18, 2017 · 6 comments
Open

Mutation testing (and reporting) across Maven modules #376

NicoleRauch opened this issue Jul 18, 2017 · 6 comments

Comments

@NicoleRauch
Copy link

In my the test code for some part of the production code is spread across several modules. PITest only mutation tests the code in each module by using the tests in that same module, not in the others. This way, the Mutation coverage (and also the line coverage) is useless because some tests are not considered.

To give you an example: We have modules

  • customer
    • src (<- production code)
    • test (<- JUnit tests)
  • customer-fit
    • src (<- FitNesse fixtures, exclude These)
    • test (<- FitNesse JUnit tests, run these on customer/src together with the other tests when mutation testing)

Is there a way to configure PIT to run the additional tests as well?

@szpak
Copy link
Contributor

szpak commented Jul 18, 2017

@NicoleRauch I don't know about Maven, but having your project migrated to Gradle it should be achievable in PIT plugin for Gradle.

@NicoleRauch
Copy link
Author

@szpak Thanks for the pointer! Unfortunately I cannot migrate to Gradle for various reasons, but good to see others have the same needs.

Does anybody know whether it would somehow be possible to make the same mechanism work in Maven?

@oscarlvp
Copy link
Contributor

oscarlvp commented Apr 9, 2018

@NicoleRauch please take a look at pitmp a plugin to target similar situations.

@AssafKatz3
Copy link

AssafKatz3 commented Apr 22, 2018

@oscarlvp I tried to use it in order to solve my tree:

  • persistent:
    • src/java
  • service:
    • src/java
  • tests:
    • src/test (JUnit)

But pitmp didn't help (NullPointerException on PmpMojo.updateTargetClasses).

Other ideas will be welcome.

@szpak
Copy link
Contributor

szpak commented Apr 22, 2018

@AssafKatz3 Out of the main question, have you reported that issue in their issue tracker? Without that they definitely will not fix it (unless someone else report the same problem).

@AssafKatz3
Copy link

@szpak Good idea, done, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants