PHP version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project
Apache License 2.0
273
stars
92
forks
source link
Compatibility Suite: Random fail on 'Supports using a generator with the request query parameters' scenario #685
Scenario: Supports using a generator with the request query parameters # compatibility-suite/pact-compatibility-suite/features/V3/http_generators.feature:19
Given a request configured with the following generators: # PhpPactTest\CompatibilitySuite\Context\V3\RequestGeneratorsContext::aRequestConfiguredWithTheFollowingGenerators()
| generators |
| JSON: { "query": { "v1": { "type": "RandomInt", "min": 1, "max": 10 } } } |
Verifying a pact between c and p
Interaction 1 (0s loading, 4ms verification)
returns a response which
has status code 200 (FAILED)
has a matching body (OK)
Failures:
1) Verifying a pact between c and p - Interaction 1
1.1) has status code 200
expected 200 but was 500
There were 1 pact failures
When the request is prepared for use # PhpPactTest\CompatibilitySuite\Context\V3\RequestGeneratorsContext::theRequestIsPreparedForUse()
Then the request "queryParameter[v1]" will match "\d+" # PhpPactTest\CompatibilitySuite\Context\V3\RequestGeneratorsContext::theRequestWillMatch()
Warning: file_get_contents(compatibility-suite/tests/Constant/../../public/generators/queryParams.json): Failed to open stream: No such file or directory in compatibility-suite/tests/Service/GeneratorServer.php line 54