Is it possible to use the pitest tool with the jqwik tool (property-based test tool)?

40 views
Skip to first unread message

Ricardo M

unread,
Mar 29, 2021, 6:03:37 PM3/29/21
to PIT Users

Can I use the jqwik tool (property-based test tool) with the pitest?

My goal is to automatically generate the values (inputs) for my test cases and evaluate the strength of these values against the mutants generated by Pitest.

The problem is that running Pitest 1.6.4 with jqwik 1.5.0 the Pitest tool did not recognize the properties (@Property) in my PropertiesTest classes.

In the attached image there is an example (useless example).

...

Below is the result of the Pitest execution (the pitest tool does not find the @Property test case):

pit:
[pitest] 22:11:13 PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue.
[pitest] 22:11:13 PIT >> INFO : Sending 2 test classes to minion
[pitest] 22:11:13 PIT >> INFO : Sent tests to minion
[pitest] 22:11:13 PIT >> INFO : MINION : 22:11:13 PIT >> INFO : Checking environment
[pitest] 22:11:13 PIT >> INFO : MINION : 22:11:13 PIT >> INFO : Found 0 tests
[pitest] 22:11:13 PIT >> INFO : MINION : 22:11:13 PIT >> INFO : Dependency analysis reduced number of potential tests by 0
[pitest] 22:11:13 PIT >> INFO : MINION : 22:11:13 PIT >> INFO : 0 tests received
[pitest] 22:11:13 PIT >> INFO : Calculated coverage in 0 seconds.
[pitest] 22:11:13 PIT >> INFO : Incremental analysis reduced number of mutations by 0
[pitest] 22:11:13 PIT >> INFO : Created 1 mutation test units
[pitest] 22:11:13 PIT >> INFO : Completed in 0 seconds
[pitest]/================================================================================
[pitest] - Mutators
[pitest] ================================================================================
[pitest] > org.pitest.mutationtest.engine.gregor.mutators.experimental.MemberVariableMutator
[pitest] >> Generated 1 Killed 0 (0%)
[pitest] > KILLED 0 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0
[pitest] > MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0
[pitest] > NO_COVERAGE 1
[pitest] --------------------------------------------------------------------------------
[pitest] > org.pitest.mutationtest.engine.gregor.mutators.ReturnValsMutator
[pitest] >> Generated 1 Killed 0 (0%)
[pitest] > KILLED 0 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0
[pitest] > MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0
[pitest] > NO_COVERAGE 1
[pitest] --------------------------------------------------------------------------------
[pitest] > org.pitest.mutationtest.engine.gregor.mutators.PrimitiveReturnsMutator
[pitest] >> Generated 1 Killed 0 (0%)
[pitest] > KILLED 0 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0
[pitest] > MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0
[pitest] > NO_COVERAGE 1
[pitest] --------------------------------------------------------------------------------
[pitest] > org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator
[pitest] >> Generated 1 Killed 0 (0%)
[pitest] > KILLED 0 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0
[pitest] > MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0
[pitest] > NO_COVERAGE 1
[pitest] --------------------------------------------------------------------------------
[pitest] ================================================================================
[pitest] - Timings
[pitest] ================================================================================
[pitest] > scan classpath : < 1 second
[pitest] > coverage and dependency analysis : < 1 second
[pitest] > build mutation tests : < 1 second
[pitest] > run mutation analysis : < 1 second
[pitest] --------------------------------------------------------------------------------
[pitest] > Total : < 1 second
[pitest] --------------------------------------------------------------------------------
[pitest] ================================================================================
[pitest] - Statistics
[pitest] ================================================================================
[pitest] >> Generated 4 mutations Killed 0 (0%)
[pitest] >> Mutations with no coverage 4. Test strength 0%
[pitest] >> Ran 0 tests (0 tests per mutation)

BUILD SUCCESSFUL
Total time: 2 seconds

propery_based_test.PNG
Reply all
Reply to author
Forward
0 new messages