1

We're implementing Pact framework for testing couple of microservices (Scala Backend & iOS-Android Frontend). So to test the Pact implementation itself, what sort of negative tests / defect seeding we can do to make sure that - the implemented Pact is catching what it supposed to catch? i.e. once our Pact work’s complete we’re thinking to do defect seeding & see if errors like Query parameters, API response structure change , spelling changes in API paths etc are getting caught correctly by the PACT or not? So on that line what other -ve tests & defect seeding, could we run on the implemented PACT framework? viz- Checklist for smoke test / exploratory tests to quickly test implemented PACT framework before its launched to live.

Thanks

user2451016
  • 1,857
  • 3
  • 20
  • 44

1 Answers1

1

Pact is not really designed for those types of tests. It can be done, but the extra variations in data often becomes an issue for providers [1].

There is a proposal to be able to "annotate" interactions by adding arbitrary labels for purposes such as this. If you'd like to add your thoughts to https://github.com/pact-foundation/pact-specification/issues/75 that would be helpful.

  1. https://docs.pact.io/consumer#use-pact-for-isolated-unit-tests
Matthew Fellows
  • 3,669
  • 1
  • 15
  • 18
  • thanks4the response. But if we've to do a smoke testing or exploratory testing of what we've implemented as part of PACT , then how do we validate (in controlled environment, non or semi-automated environment) that- its catching the bugs its supposed to catch? – user2451016 Mar 23 '21 at 13:16
  • 1
    Ah, I think I misunderstood the question. You want to write tests, to validate that Pact tests are covering everything? – Matthew Fellows Mar 24 '21 at 02:24
  • Yes. Basically to demonstrate on high level PACT framework is catching the bugs / issues which it is supposed to catch. Basically something similar to a induced failures / defect seeding.., which will then get detected by Pact in the Test/staging environment. – user2451016 Mar 24 '21 at 10:58