-
Notifications
You must be signed in to change notification settings - Fork 234
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
Pact json being overwritten by each test in C# .NET #493
Comments
Did you mean to raise the issue over here: https://github.com/pact-foundation/pact-net/ |
yes |
Moving issue to the correct repo. |
Could you please perhaps demonstrate (via code) how you construct your Pact tests so that we can better understand? You are also running quite an old version (3.0.0). Probably, you might just need to ensure you're calling the correct lifecycle method to write the pacts to file as you go. If you're new to Pact, I'd suggest upgrading to the latest version. |
the example above helps..it does have all tests published in same pact file, but I don't see any specific settings for the same. |
PactNet 4.x+ (which is the only supported version) works in merge mode only, thus running tests will always add to an existing file instead of overwriting it. This wasn't the case with v3.x and less, which are all unsupported versions now. |
I see the builder has persisting pact file which keeps all interactions in single pact json. _mockProviderService.UponReceiving("a request to create a new event") |
Software versions
I'm writing Pact tests as part of a C# .NET application with NUnit test system. I have several functions that each run a Pact test. They overwrite the previous functions pact definition such that my final pact.json only has the last run test. How do I have separate test functions that all append to the pact test?
Steps to reproduce
Provide a repository, gist or reproducable code snippet so that we can test the problem. You may also want to adapt one of the examples in the repository to demonstrate the problem.
Relevent log files
Please ensure you set logging to
DEBUG
and attach any relevant log files here (or link from a gist).The text was updated successfully, but these errors were encountered: