Quarkus Test doesn't have compatibility with PIT
See original GitHub issueI’ve been creating a back-end service with Quarkus (tests in JUnit/PIT) and I’m not having a good experience with mutation testing (specifically with the first mutant I have to kill). The mutant is: replaced return value with null for org/company/controller/UserController::getUserInformations → SURVIVED
.
Controller
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public UserInformations getUserInformations(String userId) {
return service.getUserInformations(userId);
}
I have some unit tests to this controller method. Thinking about the null mutant, I just added a Assertions.assertNotNull(userObject) in one of these tests. But, this isn’t working at all. So, how can I kill the mutant?
By the way, I’ve already ensured that the tests in question are being executed in the footer of the execution report:
Issue Analytics
- State:
- Created a year ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Testing Your Application - Quarkus
So far we have only covered integration style tests that test the app via HTTP endpoints, but what if we want to do...
Read more >Measuring the coverage of your tests - Quarkus
Learn how to measure the test coverage of your application. This guide covers: ... Having completed the Testing your application guide ...
Read more >Continuous Testing - Quarkus
Quarkus supports continuous testing, where tests run immediately after code changes have been saved. This allows you to get instant feedback on your...
Read more >Quarkus now supports test profiles
With the release of Quarkus 1.6 Quarkus now supports test profiles, allowing you to easily test multiple different configurations inside the ...
Read more >Security Testing - Quarkus
Test Security Extension ... This artifact provides the io.quarkus.test.security.TestSecurity annotation, that can be applied to test methods and test classes to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gdcmarinho https://github.com/hcoles/pitest/releases/tag/1.8.0
@gdcmarinho No problem, it was an interesting one. I suspect there are other test runners out there that have a similar problem that hasn’t been reported. Unfortunately I couldn’t find a clean general soloution to this, so if any more are identified, the code will have to be updated to recognise them and apply the fix.
Closing as fixed in 1.8.0.