'How to validate External API payload in Integration tests
I have a simple springboot app which requires to make one external Rest api call to another application to post JSON content.
Flow is:- Data received in MQ --> Validation/filter Business logic applied --> API Payload constructed --> POST API call is executed to external Application to persist data
Since my application will be posting critical employee data, need help to validate & perform few simple checks on the API JSON payload in integration tests to ensure the business logic written is always meeting proper criteria.
I'm very new to writing Integration tests and kind of stuck at this. Please help with detailed solution.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|