v0.6.2
Karate
We hope you like the new logo !
Possible Breaking Change
table
keyword will omit keys with null values from resulting JSON
It is quite unlikely you will face issues with the new behavior, but. Empty cells or expressions that evaluate to null
will result in the key being omitted from the JSON. To force a null
value, wrap it in parentheses:
* def one = { baz: null }
* table json
| foo | bar |
| 'hello' | |
| one.baz | (null) |
| 'world' | null |
* match json == [{ foo: 'hello' }, { bar: null }, { foo: 'world' }]
New JUnit "dev-mode" HTML report
The main reason why you may want to upgrade. This should greatly improve the ease of trouble-shooting a Karate test in your IDE in dev-mode. You need to use the JUnit Runner. Here is a video of what to expect: link.
GraphQL Example Added
Karate is actually a perfect fit for testing GraphQL API-s and a new example was added to the demo suite to show-case this capability: graphql.feature
.
Notable Enhancements and Fixes
#136 callonce
now works when using IDE runner (Eclipse and IntelliJ)
#216 Apache HTTP Client does not follow POST redirects by default - fixed
#229 Apache HTTP Client not allowing cookies with dots in the 'domain' - fixed
#232 built-in variables __arg and __loop not set if using shared-scope - fixed
#223 HTTP response not recognised as JSON if it begins with a newline - fixed
#239 Failed scenarios in called features will now have Scenario name included in the exception / log
#244 XML with DTD would fail - fixed
#246 Parallel runner not honoring logback config - fixed
#248 Schema-like validation should support JSON chunk references which are optional - fixed
#226 Actual HTTP request made (especially headers and payload) can be now be retrieved within a test - which makes writing a framework over Karate easier. There's a new karate.prevRequest
property on the built-in karate
JS object
Pull requests
#253 Karate runner Java 8 updates - thanks to Srinivasan Sekar