Comments (5)
@ICEDLEE337 did you see https://github.com/pact-foundation/pact-stub-server ?
from pact-mock_service.
Understood. This will add tremendous value because it enables accurate, pre-fabbed mocks for developing the client code now with bonafide contracts thereby greatly reducing unknowns at dev time! Personally, I just wrote a simple node service that picks up the outputted Pact json contracts and registers the Pact '$.path' regexes as Express endpoints, which then return the defined Pact response. A basic implementation is like ~40 lines of JS so it wasn't bad at all, but it'll be great to see this feature integrated in the Pact suite. Anyway, thanks and keep up the great work!
from pact-mock_service.
@bethesque sorry for disturbance. I guess the library was not intented to work as I would like it to :) Great job for doing it by the way. I will investigate the ruby source code deeper, becasue this is the most complicated source code that works that I've seen in my life :). I would like to understand how it works. Looks beautiful.
We will use it in the following way to use generated pacts as data-providers for our test:
- Write down the test in js-dsl
- run specilized gulp task that will run the pack mock server, run all test with pact js consumer dsl, hut the server.
- then read the generated pact files in the onPrepare method of protractor.js to populate some accessible in all of the e2e test variable
- use the data from pact.json's in $httpBackend to set up request|response in different use cases.
from pact-mock_service.
This would be a great feature. How is this not possible already?
from pact-mock_service.
Mainly because the mock server was not designed to be used in this way, and partially just because of time. We're actually close to being able to use it this way now, as the matching rules for the request are now serialised in the pact. Previously, these were discarded, as they were not needed in the provider verification.
from pact-mock_service.
Related Issues (20)
- Feature Request - Log level CLI Option on pact-stub-service HOT 1
- Can't start mock service wrong number of arguments (given 4, expected 2..3) (ArgumentError) HOT 1
- Internal server error when request payload cannot be encoded to UTF-8 HOT 9
- Count the number requests matching an interaction HOT 1
- Request to '/pact' endpoint without body is failing making python-pact verification unusable HOT 1
- Feature Request - support dynamic responses based on ID in request HOT 5
- given pacts dir not used HOT 2
- pactfile_write_mode - "usage" text is missing the option to 'update' HOT 2
- Ruby 2.7 cannot load such file -- thwait HOT 9
- Allow Access-Control-Allow-Credentials to be set for --cors mode HOT 13
- Feature request: json response from /interactions/verification
- Chore: migrate away from TravisCI HOT 1
- iam not able to generate pact files ,just the this infoi iam getting "INFO WEBrick::HTTPServer#start: pid=15660 port=1234" HOT 2
- Return more informative response codes HOT 2
- Feature request - Response based on provider state HOT 1
- Return most specific match when multiple matches are found HOT 4
- Can you please provide me the response model for POST /pact endpoint. HOT 2
- Pact stub service throws error for query values with matching rules HOT 5
- GH repo notifications on release HOT 1
- Update to rack 3
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-mock_service.