pit-idea-plugin
pit-idea-plugin copied to clipboard
Is it possible to specify an environment variable?
I'm trying out PIT for the first time, using a toy project. The implementation uses random numbers, but a feature flag -- stored in the environment, allows me to substitute a deterministic generator for the random generator. To ensure that the variable is correctly set, my Junit4 tests use Assume.assumeTrue() to check that this precondition is satisfied.
If I run the pitest-maven plugin, with an environment variable set in the configuration, then everything is fine.
If I run the junit tests in Intellij, then I can add the environment variable to the configuration and all of the tests behave as expected.
But I can't seem to discover a way to configure an instance of the PIT Runner with the necessary setting to get the tests to behave as expected.