Skip to content

Releases: karatelabs/karate

v1.5.0

05 Aug 15:36
Compare
Choose a tag to compare

Breaking Changes

  • Karate 1.5.0 requires Java 17
  • The Maven group-id has changed from com.intuit.karate to io.karatelabs

So the only change should be to your pom.xml or gradle.build.

There are no other syntax or behavior breaking changes, so this should be a smooth upgrade for your tests. The Java APIs (package names) have not changed. They will change only in a future release (most likely 1.6.0).

Notable Improvements

Fix List

Here is a complete list of all issues fixed in this release.

Full Changelog: v1.4.1...v1.5.0

A Big Thank You

To all contributors, especially first-time contributors to Karate.

And to all our users and community. We are proud to see Karate cross the 8000 star mark on GitHub 🚀 ⭐ 🙏

New Contributors

Artifacts Released

v1.5.0.RC5

26 Jul 05:54
d73303c
Compare
Choose a tag to compare
v1.5.0.RC5 Pre-release
Pre-release

Karate 1.5.0 will require Java 17. Karate 1.5.0 will also change the Maven group-id from com.intuit.karate to io.karatelabs. For a smoother transition, the Java APIs would be changed in a future release (most likely 1.6.0). Karate 1.5.0 is required if you use Java 22 or greater.

This is an RC release, so there could be minor changes before 1.5.0 (final). But most teams can start using this, especially those who need Java 17 and the CVE resolutions.

Notable Improvements

Fix List

Here is a complete list of all issues fixed in this release.

Full Changelog: v1.4.1...v1.5.0.RC5

Artifacts Released

v1.5.0.RC3

01 Feb 07:39
Compare
Choose a tag to compare
v1.5.0.RC3 Pre-release
Pre-release

Karate 1.5.0 will require Java 17. Karate 1.5.0 will also change the Maven group-id from com.intuit.karate to io.karatelabs. For a smoother transition, the Java APIs would be changed in a future release (most likely 1.6.0).

This is an RC release, so there could be minor changes before 1.5.0 (final). But most teams can start using this, especially those who need Java 17 and the CVE resolutions.

Notable Improvements

Fix List

Here is a complete list of all issues fixed in this release. Since the statuses can change, use the below snapshot as a reference.

image

Full Changelog: v1.4.1...v1.5.0.RC3

Artifacts Released

v1.4.1

16 Oct 06:22
Compare
Choose a tag to compare

First, a big THANK YOU to all new contributors !

New Contributors

For those interested in participating in Hacktoberfest, you can find instructions here: Karate and Hacktoberfest

Fix List

Some notable improvements:

  • UI testing - driver.intercept() (Chrome only) now returns a mock, which opens up some advanced use-cases, see #2361
  • some teams reported a slow down in Karate 1.4.0 especially when a lot of JS re-use was involved, which should be fixed, see #2329

Here is a complete list of all issues fixed in this release.

Breaking Changes

The good news is that for most teams there should not be any breakages to existing test scripts. But there are a few things to note, read on below.

match each defaults to fail if array is empty

You can read a detailed description in the issue #2364. This may break existing test scripts only if you are extensively using the fuzzy matching short-cut #[] in enbedded schema validations. The good news is that if you see any of your existing tests break, you can do this to get back the old behavior.

* configure matchEachEmptyAllowed = true

if a match each fails now with Karate 1.4.1, ensure that any JsonPath expression on the LHS (Left Hand Side) is accurate. The reason for this change in Karate behavior is that previously - if you had an invalid JsonPath expression on the LHS of a match each, it would always return an empty array, and the match would always pass.

Docker image now in karatelabs organization

Until now, the karate-chrome Docker image was published at ptrthomas/karate-chrome. It has now moved to karatelabs/karate-chrome.

IDE debugging requires extra dependency

IDE debugging now requires an extra dependency on the classpath. Maven and Gradle users can use the io.karatelabs:karate-debugserver dependency. For details on how to use the new debug-server in IntelliJ or VS Code, please refer to this wiki page: Debug Server.

Experimental Distributed Testing Support Removed

Karate used to have a distributed-testing (experimental) option released in v0.9.5. This is no-longer available as part of karate-core

Heads Up

Karate 1.5.0 will require Java 17. This is a bit sooner than we expected, but reasons are explained in #2401 - mainly because of needing to address some CVEs. 1.4.1 may be the last release that supports Java 11.

Karate 1.5.0 will also change the Maven group-id from com.intuit.karate to io.karatelabs. Note that a 1.5.0.RC1 is available for teams to start trying this out. For a smoother transition, the Java APIs would be changed in a future release (most likely 1.6.0).

What's Changed

Full Changelog: v1.4.0...v1.4.1

Artifacts Released

v1.4.0

02 Apr 14:39
Compare
Choose a tag to compare

Important

There are multiple security vulnerabilities in libraries that Karate depends on that are fixed in this release. If you are on an old version of Karate - it is strongly recommended that you upgrade. Refer #2148 | #2265 | #2277

Breaking Changes

The main change in this release is that Karate requires Java 11 or above. We no longer support Java 8. Otherwise there should not be any syntax or behavior changes (from Karate 1.3.X).

Note that some of the security / CVE fixes cannot be back-ported to Java 8 because they depend on Java 11.

Also note:

  • JUnit 4 is no longer supported. If you were using JUnit 4, either move to the Runner API or JUnit 5
  • The ZIP release is no longer published since the official Karate plugins provide a better quick-start experience. The stand-alone JAR is still available.
  • The karate-mock-servlet dependency is no longer published
  • The old cucumber-java 1.2.5 dependency is no longer included, refer #2214

Fix List

Here is a complete list of all issues fixed in this release.

What's Changed

New Contributors

Full Changelog: v1.3.1...v1.4.0

Artifacts Released

v1.3.1

07 Dec 15:11
Compare
Choose a tag to compare

This is a bug-fix release.

Please refer to the release notes of v1.3.0 if you are upgrading from an older version.

  • Karate HTML report slow for large features #1270
  • New @setup wrongly increased scenario count #2169
  • New @setup was running even when supposed to be skipped #2169
  • New @setup missed a way to run setup once #2210
  • One more JS multi-threaded error solved #2204
  • HTML report now includes karate.env #2196
  • Better support for file-upload when files is an array #2171
  • match each now works for contains deep #2170

Artifacts Released

v1.3.0

02 Nov 16:50
Compare
Choose a tag to compare

New in 1.3.0

Visual Validation

3129-3381

A big thanks to @jkeys089 who contributed this after exploring various commercial and open-source tools. This is designed to solve issues encountered using existing / external screenshot comparison services. For example:

  • Difficulty sharing a single set of baseline images across feature branches
    • e.g. developers working on different features will run into failures until their updates can be included in the set of baseline images
  • Hosted services are limiting for remote developers
    • e.g. it isn't possible to run screenshot comparisons without a fast, reliable internet connection
  • Hosted services have inherent limitations
    • e.g. limited number of screenshots with costly overage penalties when using commercial services
    • single-threaded performance using an OSS solution locally

The solution:

  • Run screenshot comparisons in realtime as we take them
    • even when running multi-threaded tests
  • Define comparison settings inline with the tests where the screenshots are taken
  • Review comparison results and modify screenshot settings directly in the Karate reports
  • Check-in baseline screenshots and comparison configs with the tests
    • developers can make updates in feature branches independent of other branches

Karate now has a compareImage keyword and the corresponding karate.compareImage() JS API.

Refer to this video for how to use the HTML UI in the Karate report to inspect, configure and update the screenshots.

Graal JS multi-thread issues are solved

This is a big deal, achieved after upgrading Graal to version 22.0.

Advanced users of Karate may have run into some edge cases when trying to pass a JavaScript function to called feature files, especially when callonce and karate.callSingle() are involved and tests are run in parallel.
These issues were mostly solved in 1.1.0 and 1.2.0, but a few rare cases were still reported.

This issue is finally resolved along with some code clean-up and we are back to how things were in v0.9.X. You can freely pass JS functions all over the place.

New karate.response and karate.request API

This specifically solves for retrieving a given header while ignoring the case. While Karate already had support for this in simple match statements and via the configure lowerCaseResponseHeaders option, there were advanced use-cases that required more control. You can find more details here. Here is an example:

karate.response.header('content-type').

This also makes mock request routing based on headers much easier, for e.g. karate.request.header('foo') == 'bar'.

New option to write mocks in JavaScript

This is an alternate option for those who want to write more complicated mocks and opens up a lot of possibilities. The "server side" JS API is simple, clean and designed to even serve dynamic HTML.

Refer to this documentation for more: Karate JavaScript Mocks.

contains only deep for match

This is an enhancement to match that makes it possible to assert that a JSON is "deep equal to" another - but with the slight twist that JSON array order is ignored. Come to think of it, we should have had this sooner :| This is expected to be very relevant for teams using GraphQL. Details here: #2093

configure abortSuiteOnFailure

Some teams have requested for being able to stop the entire test suite if one test fails. This will save time when the environment has issues and "fail fast" instead of letting the CI job plough on and result in all tests failing. Details here: #2090

Easier way to drive dynamic Scenario Outlines

See the new @setup life-cycle described below.

Breaking Changes

@setup life-cycle

This is an important change that adds a new life-cycle to scenarios. There is a description and discussion here. The updated documentation can be found here.

The highlights are:

  • adds a way for data to be set-up before a Scenario starts
  • the focus is on returning data, so no "global" state modifications are allowed, which keeps things simple
  • this was introduced specifically to make it easier to setup a JSON array (or function) for Dynamic Scenario Outlines
  • so you can think of this as a scenario that acts as a "background" for a Scenario Outline (but can also be called from any Scenario)
  • the Dynamic Scenario Outline had an inconsistency, which is that the Background was only run once, but with this change, the Background will run before every Scenario whether it is
    • a normal Scenario
    • a row from a fixed set of Examples: in a "normal" Scenario Outline:
    • or a row generated at runtime by a dynamic Scenario Outline: <-- this is the breaking change

Here is a diff of what to expect. In most cases, where you were using a Background to "drive" a dynamic Scenario Outline, the change is to use a Scenario tagged with @setup instead.

url is not passed to called features

Most likely you won't be affected by this. But in 1.2.0 we un-intentionally introduced a bug that the url and path in the HTTP "builder" behind the scenes would NOT reset when you call a feature. You can find more details here.

Some JS behavior has changed

ℹ️ Ignore this if you have not referred to JS functions within other JS functions.

For details, see: #2009 (comment)

Websocket support has changed

ℹ️ Ignore this if you have not used the karate.webSocket() API

This is a breaking change, but the pattern for editing your existing tests is quite straightforward. Here below is a before-and-after:

image

  • the socket.listen(5000) call has to be replaced with * listen 5000 - where 5000 (here just an example) is the timeout in milliseconds
  • the magic-variable listenResult holds the result of the captured websocket message
  • more details are in the docs: https://github.com/karatelabs/karate/tree/develop#websocket

Heads Up

1.3.0 will be the last release of Karate that allows for usage of Java 8. From 1.4.0 onwards, Karate will have a minimum requirement of Java 11. Please comment here if you have any concerns.

For what's fixed in this version, refer to this list.

New Contributors

Full Changelog: v1.2.0...v1.3.0

Artifacts Released

v1.2.1.RC1

27 May 06:09
Compare
Choose a tag to compare
v1.2.1.RC1 Pre-release
Pre-release

Only the "fatjar" release that fixes #2028

v1.2.0

09 May 14:48
3ea821f
Compare
Choose a tag to compare

Highlights

A "final" release after half a year. Multiple fixes and stability improvements. Thanks to all who tested RC releases.

For what's fixed in this version, refer to this list.

Note that we have an experimental NPM package for Node / JS teams. Please spread the word !

Breaking Changes from 1.1.0

Please read the 1.2.0 Upgrade Guide. The good news is that this will not impact most projects.

Karate also starts tracking a very basic level of analytics. Read more here.

New Contributors

Thanks to all contributors, past and present !

Full Changelog: v1.1.0...v1.2.0

Artifacts Released

v1.2.0.RC6

18 Apr 05:45
Compare
Choose a tag to compare
v1.2.0.RC6 Pre-release
Pre-release

ℹ️ This is planned to be the last RC release for version 1.2.0. Please test and provide feedback !

We want to make sure that our new release automation pipeline delivers artifacts that work for all Java versions (8 and above).

For what's fixed in this version, look at the issues here that have the fixed tag.

This release includes the Docker image.

Note that we have an experimental NPM package for Node / JS teams. Please spread the word !

Breaking Changes from 1.1.0

Please read the 1.2.0 Upgrade Guide. The good news is that this will not impact most projects.

Artifacts Released