pact-provider-verifier
pact-provider-verifier copied to clipboard
Implement ProviderState generator to allow injecting parameters to Interactions
pact-jvm supports injecting parameters to Interactions thanks to clever usage of generators and ProviderState parameters as described here:
- consumer contract implementation: https://github.com/DiUS/pact-jvm/tree/master/provider/pact-jvm-provider-junit#returning-values-that-can-be-injected
- provider state injection: https://github.com/DiUS/pact-jvm/tree/master/provider/pact-jvm-provider-junit#returning-values-that-can-be-injected
I would like to use Pact for our NodeJS provider, but this is a crucial feature and I am happy to work on a PR for this.
Is it possible to implement the generators with the same functionality as pact-jvm has it?
I think we'd just need to store the parameters we get from state preparation and implement proper generator.
I'd be very happy for you to work on this @hhhonzik.
You'll need to coordinate development between the pact-provider-verifier and pact-ruby projects. To do this, check them both out side by side, and then set the environment variable X_PACT_DEVELOPMENT=true in the pact-provider-verifier project before running bundle. This will cause the local copy of pact-ruby to be used instead of the gem dependency.
Hi, I am very keen to get this working, and will pick up where @hhhonzik left off if needed, looks like the pull requests were fairly far along?
I have added the remaining generators and some tests to the pact-ruby project
https://github.com/pact-foundation/pact-ruby/pull/273