Skip to content

v0.8.0

Compare
Choose a tag to compare
@ptrthomas ptrthomas released this 16 Jul 05:33
· 3479 commits to master since this release

Breaking Changes

This first one only applies if you are using the stand-alone JAR. Previously the command-line option -t was used to specify the feature file to be run - but now it is used to specify Cucumber tags. There are some big improvements - parallel execution and even reporting are built into the single binary ! Refer to the documentation for more details.

Second: the com.intuit.karate.Debug class has been removed - while refactoring the engine to get Gatling support to work, but we are pretty sure no one was using this. We can bring this back if needed.

Introducing: Karate-Gatling

Re-use API functional tests as performance tests !

We are releasing this ! This is the first version, but we have people who tried it report back and it seems to be stable. Here is a video of what to expect: link. And here is the documentation. Your feedback can make this better, and we are committed to release minor version upgrades when needed as we evolve this.

Notable Enhancements and Fixes

Parallel Runner Memory Usage

To pick one highlight - it is the greatly improved memory usage of the parallel runner. Earlier, teams that had many tests would run into an Out Of Memory error and had to reduce or switch-off log levels to work-around.

map, filter and forEach

Also map, filter and forEach operations have been introduced on the built-in karate JS helper object. This will make it easier to work with JSON arrays or list-like data - very useful for filtering or even transforming one kind of JSON into another. This demo file has some examples.

Stand-alone JAR has everything

This makes Karate more accessible for teams that are not really into Java and don't want to use a Java IDE or Maven project structure. The stand-alone JAR can now even run tests in parallel from the command-line and the only pre-requisite is a JRE. You can now recommend Karate for JavaScript, .NET or Python developers without holding back ! This is great for demos as well. Note that the binary has been renamed to karate-<version>.jar to signify that it has everything in it. Refer to the documentation for all the details.

karate-netty dependency bundles Netty dependencies

The test-doubles (karate-netty) project now "shades" the netty JAR which means you can combine Karate mocks into Maven or Gradle projects which already use netty - without any library conflict issues.

Closed Issues Register

  • #329 Eclipse JUnit test results would show as "unrooted"
  • #306 Karate UI improvements - thanks to @RavinderSinghMaan
  • #319 Gradle conventions are honored for build output directory
  • #337 Test-Doubles - introduced bodyPath helper to make it easier to route incoming requests based on payload content
  • #341 XML attribute embedded expressions would not work for empty elements
  • #342 Apache bug in HTTP headers needs upgrade
  • #346 Complex JSON schema bug in match each
  • #355 Dynamic XPath support for XML
  • #370 Standalone JAR can now run multiple features in parallel and generate HTML reports !
  • #378 karate.match() implemented, now you can programmatically do a match
  • #379 JSON / HTML reporting improved for "called" features
  • #381 Support for HTTP proxy exceptions - thanks to @xxxyyyz
  • #387 Clean way to over-ride config in dev mode without having to check-in sensitive values
  • #397 Option to disable / switch on-off HTTP logging during a test
  • #407 remove had no effect on XML attributes
  • #408 Removed hard-dependency on logback
  • #415 multipart fields introduced that can take a JSON with multiple dynamic values
  • #417 Java API to select features at run-time for parallel / execution
  • #411 Clean way to stop karate-netty server via admin HTTP end-point
  • #421 Cucumber Outlines within called features would abort on the first example that failed
  • #439 Karate version now appears in the logs to help bug-reporters
  • #452 #notpresent will work as a JsonPath or XPath match even if it is the only RHS