Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to specify an environment variable? #33

Open
DanilSuits opened this issue Mar 12, 2020 · 0 comments
Open

Is it possible to specify an environment variable? #33

DanilSuits opened this issue Mar 12, 2020 · 0 comments

Comments

@DanilSuits
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant