A more subtle distinction is needed when it comes to contractual test interactions that do not have side effects, such as validation error reactions. 3.2 License for PayPal. You PayPal a paid, free, revocable, worldwide, non-exclusive, non-transferable license for the use of your application for testing, verification or other related purposes to ensure that your application complies with this Agreement. You can revoke this license at any time by PayPal in writing. If you revoke this license, this contract will be terminated immediately. After the licence is revoked, you can request the withdrawal of your application from PayPal websites. PayPal will make economically reasonable efforts, as it did at its discretion, to remove all references and links to your website application PayPal. PayPal is not required to delete copies, references or links to your app. If your internal or external consumers expect you to be able to use your service in a way that is not documented in the contract, none of you can test it unless it is written as a future test that may fail in the first round. For this reason, it is important to ensure that the contract is released before the test of the requirements/responses pairs is launched. If you have rules for your data, z.B.
maximum and minimum limits, format and size. Contract tests only test these rules effectively if you test the supplied version of the service. While I hate negatives, anyone who studies contract testing will find a wealth of conflicting information about the use and limitations of contract testing. I will not add that, other than to specify what contract tests cannot explicitly do and under what circumstances. Otherwise, I`ll tell you exactly what contract testing does, provide some use cases and you can decide whether it fits (or not) in your context. When it comes to building contract tests, there are a number of tools you can use depending on the scale and perspective of the tests. PACT is good for internal testing of suppliers and consumers. The spring cloud contract is recommended for those who focus on consumption tests. Hoverfly is written in Go with a native support for Java, which can be run in the JUnit test.
Hoverfly can be used to test REST APIs and test calls between microservices.