jeudi 8 mars 2018

When pitest cannot find the test classes

It seems that this is a quite common issue and I personally stumbled on it at least a couple of times.

Some of the main causes being:

However, today I stumbled upon a new case of 0 tests found, which I struggle to solve. Let us consider this project: https://github.com/bonnyfone/vectalign.
It is a small project and includes one only test class:

src
 |
 +- main
 |   |
 |   ...
 |
 +- test
     |
     +- java
          |
          +- VectAlignTest.java

I added pitest to the pom.xml:

<plugin>
    <groupId>org.pitest</groupId>
    <artifactId>pitest-maven</artifactId>
    <version>1.3.2</version>
</plugin>

I run the command mvn clean test org.pitest:pitest-maven:mutationCoverage. While the test run just fine, for some reason pitest cannot locate them:

12:23:16 PM PIT >> INFO : MINION : 12:23:16 PM PIT >> INFO : Found  0 tests
...
================================================================================
- Statistics
================================================================================
>> Generated 910 mutations Killed 0 (0%)
>> Ran 0 tests (0 tests per mutation)

You can find the complete pom.xml here: https://pastebin.com/F28ZpcMk
And here is the complete output for mvn clean test org.pitest:pitest-maven:mutationCoverage: https://pastebin.com/tWHgq43a

Now my question is, what is going wrong in this particular case? How does pitest determine which are the test classes?

Your help would be much appreciated :)

Aucun commentaire:

Enregistrer un commentaire