Releases: karatelabs/karate
v1.5.0
Breaking Changes
- Karate 1.5.0 requires Java 17
- The Maven group-id has changed from
com.intuit.karate
toio.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
- @fabio-andre-rodrigues made their first contribution in #2402
- @san70sh made their first contribution in #2420
- @f-delahaye made their first contribution in #2421
- @Songshen1996 made their first contribution in #2428
- @ciandt-crodrigues made their first contribution in #2440
- @sergy8612 made their first contribution in #2445
- @bouncysteve made their first contribution in #2452
- @codehackerr made their first contribution in #2477
- @AKushWarrior made their first contribution in #2505
- @dustinsand made their first contribution in #2532
- @brown-kaew made their first contribution in #2535
- @SirJerric made their first contribution in #2555
- @jandry made their first contribution in #2424
- @daviddavidgit made their first contribution in #2573
- @xloypaypa made their first contribution in #2570
Artifacts Released
- Maven artifacts
- Standalone JAR (download below)
- Karate-Robot JAR (download below)
- Docker Image
- Repository SBOM report (download below)
v1.5.0.RC5
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
- Maven artifacts
- Standalone JAR (download below)
- Karate-Robot JAR (download below)
- Docker Image
- Repository SBOM report (download below)
v1.5.0.RC3
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.
Full Changelog: v1.4.1...v1.5.0.RC3
Artifacts Released
- Maven artifacts
- Standalone JAR (download below)
- Karate-Robot JAR (download below)
- Docker Image
- Repository SBOM report (download below)
v1.4.1
First, a big THANK YOU to all new contributors !
New Contributors
- @kang-mansher made their first contribution in #2315
- @MohabMohie made their first contribution in #2318
- @lucarota made their first contribution in #2325
- @dvargas46 made their first contribution in #2343
- @barathraju-43 made their first contribution in #2354
- @dersvenhesse made their first contribution in #2368
- @dovikos made their first contribution in #2370
- @byd-android-2017 made their first contribution in #2375
- @GeorgeLBS1 made their first contribution in #2376
- @tstanczak made their first contribution in #2392
- @luanapassis made their first contribution in #2400
- @ksola made their first contribution in #2409
- @bharath2203 made their first contribution in #2415
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
- update java versions to 11 since 1.8 no longer supported by @ericdriggs in #2307
- Added changes for self signed cert generation by @kang-mansher in #2315
- Update Demo01JavaRunner.java by @MohabMohie in #2318
- Update README.md by @bischoffdev in #2323
- Fix #2324 - karate.callSingle caching fails on Windows using different keys by @lucarota in #2325
- fix retry with setup by @jkeys089 in #2335
- add support for NTLM authentication by @dvargas46 in #2343
- Bump docker/login-action from 2.1.0 to 2.2.0 by @dependabot in #2339
- fixed mouse(x, y) to accept Number type by @barathraju-43 in #2354
- Bump docker/login-action from 2.1.0 to 2.2.0 by @dependabot in #2355
- Bump h2 from 2.1.210 to 2.2.220 in /karate-demo by @dependabot in #2359
- Bump docker/login-action from 2.1.0 to 2.2.0 by @dependabot in #2360
- Bump com.linecorp.armeria:armeria from 1.22.0 to 1.24.3 in /karate-core by @dependabot in #2369
- chore: use fragment expression by @dersvenhesse in #2368
- Use Netty HttpPostRequestEncoder with "HTML5" encoder mode to prevent… by @dovikos in #2370
- chore: use updated thymeleaf syntax by @dersvenhesse in #2372
- Update README.md by @byd-android-2017 in #2375
- Fix: Resolves #2259 doubleClick and rightClick issue by @GeorgeLBS1 in #2376
- Bump actions/checkout from 3 to 4 by @dependabot in #2391
- Http using RuntimeHook by @tstanczak in #2392
- Bump docker/login-action from 2.2.0 to 3.0.0 by @dependabot in #2395
- retry on invoke exception by @ericdriggs in #2397
- Description by @luanapassis in #2400
- 2408 Allow retries to be enabled on default Apache HTTP client by @ksola in #2409
- Fix: XML whitespace trims while pretty print by @bharath2203 in #2415
Full Changelog: v1.4.0...v1.4.1
Artifacts Released
- Maven artifacts
- Standalone JAR (download below)
- Karate-Robot JAR (download below)
- Docker Image
v1.4.0
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
- fix bug preventing 'Transparent' button from updating image diff UI by @jkeys089 in #2173
- Bump actions/cache from 2 to 3 by @dependabot in #2179
- update image-comparison example by @jkeys089 in #2185
- Enable each contains deep functionality by @vincent-hennig in #2190
- improve HTML report loading performance by @jkeys089 in #2194
- Develop by @ThierryLejeune in #2199
- improve Result details for http failure by @shrik18 in #2219
- Clarify path example with trailing slash by @felipecrs in #2246
- Upgrade snakeyaml from 1.33 to 2.0 fixing CVE-2022-1471 by @julianladisch in #2266
- add check if contextClassLoader is null #2287 by @ajaravete in #2288
New Contributors
- @vincent-hennig made their first contribution in #2190
- @shrik18 made their first contribution in #2219
- @felipecrs made their first contribution in #2246
- @ajaravete made their first contribution in #2288
Full Changelog: v1.3.1...v1.4.0
Artifacts Released
- Maven artifacts
- Standalone JAR (download below)
- Karate-Robot JAR (download below)
- Docker Image
v1.3.1
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 forcontains deep
#2170
Artifacts Released
- Maven artifacts
- Standalone JAR (download below)
- ZIP Release (download below)
- Karate-Robot JAR (download below)
- Docker Image
v1.3.0
New in 1.3.0
Visual Validation
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 Outline
s
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 anyScenario
) - the Dynamic Scenario Outline had an inconsistency, which is that the
Background
was only run once, but with this change, theBackground
will run before everyScenario
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
- a normal
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:
- 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
- @jon-armen made their first contribution in #2004
- @renaud-ninauve made their first contribution in #2010
- @julianladisch made their first contribution in #2035
- @skibrianski made their first contribution in #2050
- @CMCunha made their first contribution in #2089
- @ThierryLejeune made their first contribution in #2125
- @captainbkarthick made their first contribution in #2144
- @aimanfatima made their first contribution in #2150
- @Rajpratik71 made their first contribution in #2154
Full Changelog: v1.2.0...v1.3.0
Artifacts Released
- Maven artifacts
- Standalone JAR (download below)
- ZIP Release (download below)
- Karate-Robot JAR (download below)
- Docker Image
v1.2.1.RC1
Only the "fatjar" release that fixes #2028
v1.2.0
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 !
- @lyxell made their first contribution in #1728
- @gerben86 made their first contribution in #1734
- @heyspearsy made their first contribution in #1744
- @treyturner made their first contribution in #1750
- @gillius made their first contribution in #1787
- @packleader made their first contribution in #1796
- @FanYuliang made their first contribution in #1829
- @Fresh-D101 made their first contribution in #1841
- @OreOreDa made their first contribution in #1884
- @ismail-s made their first contribution in #1891
- @bipin-k made their first contribution in #1897
- @borzykin made their first contribution in #1965
- @bischoffdev made their first contribution in #1998
Full Changelog: v1.1.0...v1.2.0
Artifacts Released
- Maven artifacts
- Standalone JAR (download below)
- ZIP Release (download below)
- Karate-Robot JAR (download below)
- Docker Image
v1.2.0.RC6
ℹ️ 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
- Maven artifacts
- Standalone JAR (download below)
- ZIP Release (download below)
- Karate-Robot JAR (download below)
- Docker Image