简体   繁体   中英

Pact provider verification is not calling provider-states

I have followed the examples on https://github.com/pact-foundation/pact-net#verifying-a-provider using version 4.0.0. My problem is that tests are failing because the provider state is not being set up. In the logs I see no mention of the /provider-states url being called and when I debug, the only call to ProviderStateMiddleware.InvokeAsync is for the actual API call. I can prove my test is passing by forcing the provider state setup in the constructor.

I found my issue. I was missing .Given(“some state”) in my consumer test.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM