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

Handle multimodule projects #20

Closed
2 tasks done
oscarlvp opened this issue Sep 29, 2017 · 2 comments
Closed
2 tasks done

Handle multimodule projects #20

oscarlvp opened this issue Sep 29, 2017 · 2 comments

Comments

@oscarlvp
Copy link
Member

oscarlvp commented Sep 29, 2017

Given a multimodule project PIT will work with each submodule independently. There are projects in which test cases covering the code of a submodule are placed outside of it. In such cases, mutants that survive the tests placed in the same submodule could be killed by test cases of other submodules. This is an issue that has been around for a while and spotted by the PIT's community several times (See hcoles/pitest#41 hcoles/pitest#224 hcoles/pitest#307 hcoles/pitest#323) Right now we have a workaround in which we treat the entire project as one by merging all classpaths but this has more issues. For one thing, there could be dependency issues when merging the classpaths, on the other hand, the correct working directory for each tests is lost, as PIT assumes the same for every test case.
A possible solution for this problem could address two specific tasks:

  • Create a Maven aggregator plugin that gather the dependency information among submodules. With this information, identify for each submodule groups of test cases with their classpath and working directory.
  • Complement the Maven plugin by making the tests run in their corresponding working directory. Changing PIT's code for would mean change parts of its design in deep components. A better solution could be to use PIT by running the analysis on each of the groups of test cases identified for each submodule and then aggregate the results. This second approach should be easier but could impact the execution time.
@vmassol
Copy link
Contributor

vmassol commented Nov 17, 2017

Note that this issue was raised as a result of the workshop I did with Oscar on XWiki, see my blog post at http://massol.myxwiki.org/xwiki/bin/view/Blog/MutationTestingDescartes

@oscarlvp
Copy link
Member Author

This issue is being tackled in a new Maven plugin developed in context of the STAMP project here

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

No branches or pull requests

3 participants