Questions tagged [pact]

Pact is a cross-language tool that provides Consumer Driven Contracts testing.

A Contract is a collection of agreements between a client (Consumer) and an API (Provider) that describes the interactions that can take place between them.

Consumer Driven Contracts is a pattern that drives the development of the Provider from its Consumers point of view.

Pact is a testing tool that guarantees those Contracts are satisfied.

pact.io

658 questions
0
votes
2 answers

Does Pact support REST and JMS?

I want to start using the framework Pact for JVM for contract testing. But does Pact JVM support REST and JMS? I haven't found any information about this.
martin
  • 85
  • 1
  • 11
0
votes
1 answer

How to make Netty listen on all interfaces via System property?

I am using https://github.com/DiUS/pact-jvm/tree/master/pact-jvm-consumer-junit, which uses MockServer, which uses Netty. The launched Netty listens on loopback only (netstat -tulpn output:) tcp 0 0 127.0.0.1:21221 0.0.0.0:* LISTEN 27681/java , but…
Markus Schulte
  • 4,171
  • 3
  • 47
  • 58
0
votes
1 answer

Pact verify provider, what does Pact::UnexpectedIndex mean?

I am using Pact for Consumer Driven Contracts testing. In my usecase, my consumer "some-market-service-consumer" is using provider "market-service". The contract "produced" at some-market-service-consumer, looks like this: { "provider": { …
Markus Schulte
  • 4,171
  • 3
  • 47
  • 58
0
votes
1 answer

Writing interactions for pact-js-mocha that respond with an error

I've been working through the pact-js-mocha example and I'm having some difficulty verifying an interaction when the expected response is an error. This is the interaction I would like to verify: PactConsumer(PactOpts, function () { …
0
votes
0 answers

Running pact jvm provider tests via IntelliJ

I am very trying the pact-jvm-provider-junit using IntelliJ IDEA as my IDE. I'm testing out the provided ContractTest example: import org.junit.BeforeClass; import org.junit.Before; import org.junit.ClassRule; import…
ndelacrz
  • 1
  • 1
0
votes
1 answer

Who is the consumer in a POST scenario?

I have read that on Pact, the consumer is the one initiating the request. I have a service (let's call it A) that is used to draw pictures that will then be submitted (via POST) to a service (let's call it B) that will process those inputs and…
Hommer Smith
  • 26,772
  • 56
  • 167
  • 296
0
votes
2 answers

Pact-js e2e example implementation[Issue:Cannot GET /states] MAC OS

Need help on solving the above problem 'cannot GET /states' for http:/localhost:8081/states. I have gone through https://groups.google.com/forum/#!topic/pact-support/zGj8o6snf5c, it is very helpful but did not find the answer. GitHub Repository…
Sakshi
  • 11
  • 4
0
votes
1 answer

How to use Pact Matcher for values other than 'Strings'

In pact-jvm (groovy on consumer side and gradle on the provider side), I'm trying to use Pact matchers like below: name regexp(~/\w+/,'sony') Will Pact matcher regex work only for Strings ? For values other than strings, do I need to use Pact term…
0
votes
1 answer

Running Pact against test environment in Rails API

Just playing around with Pact against my Rails API and noticed that the out-of-the-box Pact setup runs against the "development" environment by default. How do I configure to run against the "test" environment without having to specify it in…
0
votes
2 answers

Using Pact Broker

Can someone point me in detail as for how to publish JSON pacts in step by step to Pact Broker? Have installed docker, dius/pack_broker and well as Postgres (brew installation). Missing the point of mending all the above in a proper way and the…
0
votes
0 answers

Pact - how to write expectations on requests?

I have successfully run expectations on the response that the provider gives. Now, how can I write expectations to make sure that the things that I am sending to the provider as a consumer are correct? That is, how do you ensure that the request…
Hommer Smith
  • 26,772
  • 56
  • 167
  • 296
0
votes
1 answer

pact HTTP message consumer

I have a relationship between two components/microservices where component A sends events by HTTP to component B. In a traditional pact HTTP consumer/provider pattern, A is the consumer of B since A is sending the request and B is responding.…
Joel Andersson
  • 239
  • 2
  • 7
0
votes
1 answer

How to have tests distributed across classes at provider end for same consumer

I have a scenario where my provider service provides 3 functionalities. At consumer end I have 3 different classes to write tests for these 3 functionalities. When pact file is generated, it encompasses all the tests with same consumer-provider…
0
votes
2 answers

pact-jvm Consumer Pact Test

I'm new to pact. My project is Java project. I read through pact documentation and found the github project https://github.com/DiUS/pact-jvm/tree/master/pact-jvm-consumer-junit I imported it in my eclipse IDE. I'm stuck from here. 1. Which test to…
sandstone
  • 1
  • 2
0
votes
1 answer

Missing 'PactFragment' in package au.com.dius.pact.model

I am new to Pact. I downloaded the code from Github, "pact-jvm" project. I created a new project in IntelliJ from "existing source" with Gradle setting. It imported all the packages fine. However, when I tried running some of the tests in it, I got…
Eric
  • 181
  • 1
  • 7
1 2 3
43
44