PaChSu
PaChSu

Reputation: 307

Pre-requisites for getting started with Pact Contract Testing

Our organisation team structure is such that there is a new independent team of testers who is supposed to do API Testing. So as a member of this team, I do not have java code set up for every API project.

  1. So how can I write Consumer driven tests in that case?
  2. Or do I need to setup every consumer java project before i start testing?
  3. Or do I need to request all the API providers/consumers about this framework and ask them to implement the same.

Currently, the testing is limited to manual testing via Postman and Unit Testing by developers.

Upvotes: 0

Views: 453

Answers (1)

Matthew Fellows
Matthew Fellows

Reputation: 4065

Pact tests need to be part of the Consumer code base, as they are run as unit-level tests, so you will need access to the code to do so.

As for the Provider code base, they could arguably be kept outside of the code base (as you just need a running Provider to execute the tests) but I would strongly recommend against this for a number of reasons.

Answering your questions one-by-one:

  1. (see above)
  2. Yes, or
  3. Yes - this is the ideal situation, freeing your team up for 'manual' or more 'exploratory' testing.

As an aside, I would argue that having a separate team of testers is an anti-pattern. While structurally you might have different reporting lines, what I've seen work best is if members of your Test team were virtual members of the other team and could be closely collaborating with them.

Upvotes: 2

Related Questions