-
Notifications
You must be signed in to change notification settings - Fork 76
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
Stop generating random values #863
Comments
@praveenfun2 There are several ways to disable pre-population. Here are some common ways you can handle this issue.
|
So I want to disable this feature altogether, as if it was not even present. I have an existing setup of test cases where we don't populate the values randomly. We populate the values by hardcoding it. So the values which are not harcoded, I want them to be null. |
@praveenfun2 FixtureMonkey nullGenerateFixtureMonkey = FixtureMonkey.builder()
.defaultNullInjectGenerator(
new DefaultNullInjectGenerator(
1.0d,
false,
false,
false,
Collections.emptySet(),
Collections.emptySet()
)
)
.build();
Or You can use your existing test setup just as below. fixtureMonkey.giveMeBuilder(YourExistingTestObject)
.sample() FixtureMonkey instance will generate an object exactly like your existing test object, without populating it with random values. |
Describe your question
Is there a way by which we can disable prepopulating the fields with random values.
The text was updated successfully, but these errors were encountered: