I have a general question about randomization in c...
# pact-js
m
I have a general question about randomization in consumer side tests. Here is an example from pact-workshop-js; we have a fixed product being added as the state. I am also doing it that way at my own consumer example. Because, if we randomize the the item being added in the state (which is a common pattern in e2e) then the contract updates every time we commit. And that is is not good. However, the lack of randomization mandates that we handle issues like the same state being necessary (but already existing) in subsequent steps, or test parallelization + multiple tests using the same states (do let me know if test parallelization is not recommended, but certainly it is workable with). It does lead to complex state handler setups at the provider (Example), and other patterns to ensure a clean db state (reset db at the beginning of npm start, & test start & teardown at the end)as much as possible. Are these normal best practices? Is there a better way?