Karate – editing xml while running the test case

There is something called “embedded expressions” in Karate. Read the docs: https://github.com/intuit/karate#embedded-expressions

Example:

* def guids = <guids><guid>one</guid><guid>two</guid></guids>
* def body = <root>#(guids)</root>

Also refer this file, it has a lot of other examples and ideas for XML data-driven tests: xml.feature.

Leave a Comment