I am working on validating the graphQL request and response for a POST method using Karate. Recently the schema undergone changes and now the requests/response changed.I need to re-work completely. Is there any way in updating the requests based on the schema in the product app while running in local other than manual updation?
Asked
Active
Viewed 41 times
1 Answers
0
No there isn't especially for GraphQL. The whole point of the test is to fail when your schema changes and think of this as Karate doing it's job.
If your response schemas are constant across multiple tests, you can choose to extract them into re-usable files: https://stackoverflow.com/a/56987803/143475
Also see: https://stackoverflow.com/a/56273812/143475
But you are generally recommended to keep your tests simple and readable, refer: https://stackoverflow.com/a/54126724/143475

Peter Thomas
- 54,465
- 21
- 84
- 248