-
Notifications
You must be signed in to change notification settings - Fork 69
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
Windows Support to get all pact files in a directory #94
Comments
Can you help me understand your use case better? Why are there so many pacts for the same stub service? |
Of course, @bethesque . My use case is we wrote the pacts agreed between a consumer team with provider team which developed web service. |
No - I don't understand why there are multiple pacts? Did you hand code the pact files? |
As our project work, each pair of request/response will be defined to a pact record, a json file and published to Broker with a unique url, e.g: http://pact-broker.mydomain.kfs.com/pacts/provider/PROVIDER1/consumer/CONSUMER1/latest |
Yes, you are very mistaken. I think you need to do some more reading to understand how Pact works. Have you read this? https://docs.pact.io/readme#how-a-pact-test-works (in particular the "Consumer testing" section) Some important things to understand:
Please make sure you fully understand this - your current approach is not at all correct, and will not work. |
That being said, do we still think there is value in reading multiple pacts from a directory? |
I don't see the use case in normal operation. If you are using your own pact file to run up a stub server, then there should only be one file. If you want to stub a production version of the server from the pact broker, you would only use one file. You wouldn't stub the behaviour of the service at more than one point in time. |
I have read at the first days i investigated Pact. But as our discussion, if we made up a very long pact file with many interactions, maybe up to hundreds interactions, it is so difficult to read and identify which interaction to retrieve for each test case if the description is not clear. Many thanks @bethesque and Pact community! |
I can understand that pain point. Which language etc. are you using? Perhaps we can work to make that less painful and remove those workarounds. |
@mefellows Many thanks for your understanding! |
I am amazed at your set up. It's not the "right" way at all but I can see why you're doing it that way. I'll make the change you want. |
Many thanks for your understanding @bethesque . Because we are newbie on Micro-services, we learn days by days. Love Pact! |
Try v1.55.0 of the standalone |
@uglyog want to weigh in on #94 (comment)? Is there a way to address the provider verification issues described above? |
I might be missing something, but I didn't see anything relating to provider verification issues. From what I can tell, the main issue is visibility in the broker on what interactions failed. |
Yes, sorry, I really shouldn't skim issues and multi-task...
When executing pact verify, it is easy to keep track the result of test
suite, failed tests will be identified faster. Each line in red color on
Broker is a failed test case.
…On Tue, Aug 28, 2018 at 6:53 PM Ronald Holshausen ***@***.***> wrote:
I might be missing something, but I didn't see anything relating to
provider verification issues. From what I can tell, the main issue is
visibility in the broker and what interactions failed.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#94 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADSjBJTJv99hgnIVwITfdp9-S-EP8jRks5uVQUAgaJpZM4WNl42>
.
--
Matt Fellows
- http://www.onegeek.com.au/
|
Thanks @bethesque so much! version v1.55.0 works well for my case, i can load all pact files to stub server with command: |
We've got plans for improving the visibility. Sorry you have to do such a complicated work around. |
I am using pact-stub-server version 1.54.3 on Windows 10. I want to start stub-server and load an directory which contains about 100 pact records.
I execute the command:
pact-stub-service.bat "D:\pact\pacts\*"
orpact-stub-service.bat "D:\pact\pacts\"
but nothing happens.
Try with:
pact-stub-service.bat "D:\pact\pacts\pact1.json" "D:\pact\pacts\pact2.json"
The server is up and the info of two pact files is loaded.
But if applying this approach, the command line is too long and difficult to handle
Please help to clarify if any option to input a directory only, or should have an enhancement for it?
Many thanks and hope this grows fast!
The text was updated successfully, but these errors were encountered: