Hi there,
I've been trying to incorporate pitest into my maven build with the
pitest-maven plugin. Unfortunately, I have been running into problems
getting my tests passing.
I'm running on Java17 and my test suite normally runs through surefire on the
modulepath (i.e. useModulePath=true).
However, when attempting to run mutation against the suite, pit fails to
calculate the line coverage as it encounters test failures. After some
debugging, I discovered that this appears to be due to pit running the tests on
the classpath rather than module path. The specific problem is that service
loading doesn't work as the services are described in the module-info.java but
not in META-INF/services. I was able to fix my tests by simply adding the
services to META-INF/. Unfortunately, this would mean that I would need to
maintain both the classpath and modulepath for my tests to run with surefire
& pitest.
So I'm wondering if there is a way to have pitest-maven plugin run the tests
using the modulepath? I did a bit of debugging and as far as I can tell it
isn't possible (org.pitest.process.WrappingProcess seems to only set the
CLASSPATH environment variable). Though, I’m hoping I'm just misunderstanding
something.
Thanks in advance for any help!
Brendan
--
You received this message because you are subscribed to the Google Groups "PIT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pitusers+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pitusers/1391cb86-da39-44bc-96da-9ec2bf0672c1n%40googlegroups.com.