Summary
In this chapter, we have seen how to work with headers and cookies. We then looked at different new configuration and test run options that give us more flexibility and help to organize our test code better. An important Karate feature, defining expressions with the def
keyword was the next topic in line, followed by JSONPath and XPath for efficient filtering of JSON and XML. Finally, we explored the GraphQL-specific approaches as an example of testing another data format apart from pure JSON.
In Chapter 7, Customizing and Optimizing Karate Tests, we will see how Karate can be extended with more custom functionality. Also, we will take a closer look at how we can make our code even more concise and easier to maintain.