Comments (3)
Hi @mohanraj-r,
You are talking about functional testing, which is not something Pact supports. Each interaction must strictly be able to be validated in isolation from another. To achieve this, we use "provider states".
See https://docs.pact.io/best_practices/contract_tests_not_functional_tests.html for a discussion of these functional tests.
If I have misunderstood, and your request is more about being able to match the request path/headers/etc. using matchers, I've just come across a bug for that (related to a @gallamine query) and will release a fix in the next few days.
from pact-go.
we use "provider states".
Thanks @mefellows
Can you give me an example of how to setup provider states in Go?
Looked at Provider States ยท Pact - but the examples are in Ruby - not clear how I can do the same in Go.
more about being able to match the request path/headers/etc. using matchers
Yes, having the ability to use matchers in the req URL, query etc could be helpful for me in this case as well
from pact-go.
Have you looked at the examples? The mux example shows how to achieve this with the in-built http
package.
The readme also explains this in the provider section.
Hope that helps.
from pact-go.
Related Issues (20)
- pact-go v2.0.x requires CGO HOT 2
- Unable to Call AddSynchronousMessage() Multiple Times within the same Go Test
- Provider verifier not working correctly when consumer uses matchers.Decimal HOT 2
- Is PactFileWriteMode no longer available? HOT 1
- Metadata information not getting recorded for protobuf-message HOT 1
- Protobuf cannot find enum with multiple proto files HOT 3
- requestMetadata expects exact value instead of matching type
- How to specify Pact CLI path in Go package manager HOT 7
- Add support for disabling colored output HOT 8
- Library not loaded: libpact_ffi.dylib HOT 22
- VerifyMessageConsumer failed: error creating message: exit status 255 HOT 1
- undefined structs running pact-go/v2 HOT 3
- BeforeEach method runs before every state HOT 6
- Why is there a functional pattern constructore for the installer? HOT 1
- Runtime error occurs with golang 1.22.x HOT 8
- Installation section of README.md is the wrong path HOT 1
- Current state of the go implementation and roadmap HOT 8
- "example=0" struct tags for numbers lead to wrong example values in contract HOT 1
- New release? HOT 5
- Incorrect header matching rules key in v2 pact files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pact-go.