Skip to content

Releases: karatelabs/karate

v2.0.10

04 Jun 08:26

Choose a tag to compare

Important Fixes

  • screenshotOnFailure: true works again; added onStepFailure hook + ErrorRunEvent #2845
  • configure headers no longer leaks Background-set headers across requests #2846
  • Type-hint ! with an angle-bracket type in a doc-string no longer throws an NPE #2847
  • call read('f.feature') { key: #(var) } no longer throws ReferenceError: # is not defined #2849
  • startTime / endTime in the report JSON are correct again #2850
  • Java.type() resolves classes on the JUnit Platform classpath (--cp) again #2855
  • karate.tagValues aggregates all tags #2859
  • Gatling karateFeature("path", "@tag") applies the tag filter instead of treating it as a path #2870
  • Scenario Outline Example vars no longer mishandled when callonce is used in Background #2874
  • ApacheHttpClient proxy CONNECT TLS handshake uses the target host for SNI #2877
  • StackOverflowError on circular-reference variables fixed #2880
  • Regression on the left side of set for JSON keys with special characters fixed #2886
  • geckodriver starts again in standalone mode #2884
  • StackOverflowError when an afterScenario hook calls a feature with a circular reference fixed #2887
  • match $.field == '#notpresent' no longer throws when the field is missing #2892
  • #() / ##() schema references inside a doc-string match parse correctly #2893
  • [*] wildcard works inside karate.match() with $ JsonPath #2894
  • set keyword works with hyphenated key paths #2896
  • Embedded expressions in feature call args are evaluated as in v1 #2897
  • configure logging mask is applied to the scenario that triggers a callonce #2898
  • def var = $.missing yields #notpresent instead of throwing #2899
  • JUnit no longer runs the wrong tests when calling other feature files #2900
  • outputJunitXml exposed on io.karatelabs.junit6.Karate #2901
  • Type-hint suffix in an Examples table works in a match statement #2902

New Features & Enhancements

  • New karate-image extension — pixel image-comparison as its own ext module with a primitives API and an interactive diff lightbox in HTML reports
  • HTML report redesigned on Tailwind — timeline view, donut summary, filter chips, JSON syntax-highlighting of request/response bodies #2895
  • karate-js: ES6 classes (inheritance, super, instance/static fields), runtime strict mode, destructuring, logical-assignment (||=, &&=, ??=), RegExp named capture groups
  • Ext SPI — pluggable extensions contributing CLI subcommands, channel factories, ext globals, and report assets
  • Multi-part karate.embed object form + defer-until-visible embed rendering
  • Driver: out-of-process iframe (OOPIF) support for CDP; W3C driver mouse via the Actions API
  • Gatling: protocol-scoped callSingle / callOnce / setupOnce caches + protocol.runner exposure
  • JUnit 6: outputJunitXml / outputCucumberJson on the builder
  • Resource.bytes(byte[]) in-memory binary factory; CSV from byte[] support #2873
  • Runner.Builder.getResolvedFeatures() exposed #2876

View the complete list of all issues fixed in this release.

Full Changelog: v2.0.9...v2.0.10

Important: refer 2.0.0 release notes for those upgrading from 1.X

Artifacts

v2.0.9

13 May 04:05

Choose a tag to compare

Important Fixes

  • JS functions auto-coerced to Java functional interfaces (e.g. Predicate, Function) when passed to Java APIs — regression vs 1.5.2 #2837
  • configure proxy (and other global config) propagates into features invoked via call / callonce #2839
  • HTTP traffic from karate.callSingle() is captured in the calling feature's HTML report again; config-time output also surfaced in reports #2840
  • JsonPath [*] wildcard works inside match / match each expressions (e.g. match each response..items[*].type == '#string') #2841
  • String.prototype.substr() available again, and karate.set(map) bulk form restored — v1 parity for large-codebase migrations #2842
  • SUITE_EXIT durationMillis and time stats in karate-events.jsonl no longer report negative / incorrect values #2843
  • set RHS expressions route through the same evaluator as v1, restoring parity for embedded-expression and JS-style RHS forms #2813

New Features & Enhancements

  • passedRate exposed on SUITE_EXIT.summary and FEATURE_EXIT events for easier aggregation by external tooling #2832
  • Parser warns at parse time when the v1 @parallel tag is encountered, with a pointer to the migration docs #2838
  • Scenario names evaluate bare ${...} placeholders (in addition to <placeholder> substitution)
  • cucumber-json output flattens called sub-feature steps into the parent steps[] array
  • Driver honors the stop: false flag — skips quit and bypasses the driver pool, useful for manual / interactive debugging
  • karate-js: json-smart dependency removed, replaced with an own strict JsonParser
  • karate-js: +51 test262 PASS — abrupt-completion sweep, RegExp.escape, lexer \v / \x fixes
  • Markup: ka:fragment (attribute-level), ka:island, ka:data-mirror, devTrace directives (K3 / K7 / K8 / K16–K22)
  • Markup: th:each strict, th:attr SyntaxError hint, th:with object-spread (...obj), per-render context.set, per-request context.setGlobal / getGlobal
  • Markup: context.redirect sends HX-Redirect automatically for htmx-originated requests; dev-mode 500 returns a useful body
  • CsrfProtection.createTemplateToken returns null when no token is available (instead of throwing)
  • netty bumped 4.2.12 → 4.2.13

View the complete list of all issues fixed in this release.

Full Changelog: v2.0.8...v2.0.9

Important: refer 2.0.0 release notes for those upgrading from 1.X

Artifacts

v2.0.8

08 May 06:47

Choose a tag to compare

Important Fixes

  • karate.get('a.b.c') dot-notation path traversal restored (regression vs 1.5.2) #2833
  • #(...) embedded-expression ReferenceError now deferred to match-time instead of failing at def time, so schema templates can be defined before the referenced variables exist #2831
  • karate.response exposed in non-mock test context (case-insensitive header() access now works as documented) #2830
  • Java.type(...) class reference can again resolve static nested classes / enums via property chaining (regression vs 1.5.2) #2829
  • * set obj.field = 'foo' + bar no longer fails with MATH_ADD_EXPR is not a valid assignment target — intermediate paths on the LHS are auto-vivified #2828
  • Cucumber JSON / JUnit XML writers no longer NPE on synthetic step results, fixing intermittent empty cucumber-json output #2827

New Features & Enhancements

  • request.cache(key, fn) for per-request memoization in markup templates
  • ka:dispatch directive for declarative custom-event dispatch from markup
  • context.actions POST-handler registry with eager dispatch on registration
  • Markup: header set, fragment signature error reporting, lenient evaluation mode
  • Driver: v1 parity for previously missing methods + bare-keyword bindings
  • ScenarioRuntime.evalAsStep for evaluating raw Gherkin step text
  • ScenarioRuntime.hotReload + Step.parseAndUpdateFrom for live step reloading
  • Dependency-check report includes an inline Suppression Rules section
  • CI now reports suppressed CVEs; OWASP dep-check upgraded to 12.2.2 (with workaround for the broken CPE→CVE lookup in 12.x)

View the complete list of all issues fixed in this release.

Full Changelog: v2.0.7...v2.0.8

Important: refer 2.0.0 release notes for those upgrading from 1.X

Artifacts

v2.0.7

04 May 11:53

Choose a tag to compare

Important Fixes

  • configure logging mask no longer dropped when set inside karate-config.js #2826
  • JSON null matching against a property path restored (regression vs 1.5.2) #2820
  • JsonPath wildcard support for set / remove restored (regression vs 1.5.2) #2819
  • call read('foo.feature@tag') no longer re-executes the called scenario on failure #2821
  • ka:nocache template directive now fires on <link href>, not just <script src>
  • ##() embedded expressions correctly detect ReferenceError via the JS engine's error name

New Features & Enhancements

  • Console summary now shows the full failure message instead of truncating at ~200 chars #2822
  • request.cookies exposed to JS templates; multiple Set-Cookie headers now append rather than replace
  • SessionStore time fields switched from epoch milliseconds to epoch seconds

View the complete list of all issues fixed in this release.

Full Changelog: v2.0.6...v2.0.7

Important: refer 2.0.0 release notes for those upgrading from 1.X

Artifacts

v2.0.6

29 Apr 07:25

Choose a tag to compare

Important Fixes

  • karate.call() / karate.callonce() accepts array/List arguments again (loop-call) #2806
  • AssertionError inside a feature called via karate.call() now propagates to the parent #2816
  • PooledDriverProvider no longer hangs when a called feature has multiple UI scenarios #2817
  • java.time expressions (e.g. java.time.ZonedDateTime.now(...)) evaluate correctly instead of returning null #2815
  • Hyphenated keys (Content-Type, Idempotency-Key) in inline maps now parse cleanly #2814
  • Unquoted embedded expressions inside doc-string JSON (e.g. #(id)) no longer misroute through JavaScript #2813
  • karate.read() with a dynamically built classpath: path no longer NPEs when invoked via callSingle in karate-config.js #2811
  • JUnit XML tag-property format restored to the v1 shape — per-tag <property> entries, Xray-aligned #2818
  • Driver getVisibleText and shadow-DOM text extraction no longer leak hidden content (full ancestor-chain visibility check applied to the root element too)
  • Logging configuration unified under configure logging; @report=false behavior restored, with docs corrected #2810

New Features & Enhancements

  • beforeScenario / afterScenario activity now appears in the HTML report #2809
  • element.closest(selector) and element.matches(selector) for selector-based traversal (alongside the restored element.parent)
  • Continued JS-engine spec-conformance work via the karate-js-test262 harness — broader coverage of optional chaining, nullish coalescing, BigInt, Map/Set, Date, Function/Reflect, and Array/Object intrinsics

View the complete list of all issues fixed in this release.

Full Changelog: v2.0.5...v2.0.6

Important: refer 2.0.0 release notes for those upgrading from 1.X

Artifacts

v2.0.5

24 Apr 10:29

Choose a tag to compare

Important Fixes

  • call to a feature with isolated scope now preserves functions inherited from the calling scope #2805
  • Closures resolve via lexical scope across call boundaries #2802
  • scenarioName filter no longer leaks into called features #2804
  • Top-level semicolon scan now tracks (), {}, [] depth — fixes spurious splits in multi-statement script() payloads #2803
  • W3cDriver multi-statement scripts no longer lose everything after the first statement #2803
  • beforeScenario / afterScenario hooks are skipped for called features (matches documented hook scope)
  • waitUntil now routes JS callables through Supplier, and JsFunction.toString() returns a stable form
  • Redundant exists() re-check skipped after verified element actions
  • Console summary now shows the failed Gherkin source line
  • JSONL feature/scenario events now carry callDepth, error, skipped

New Features & Enhancements

  • Broad JS engine compatibility and error-reporting improvements, backed by a new karate-js-test262 conformance harness #2800
  • JSONL run records now live-tail during execution and the partial file is preserved on abort
  • Per-target url / title / active exposed via CdpDriver.getTargetInfos
  • Tag selector that excludes every scenario in a feature now pre-filters the whole feature

View the complete list of all issues fixed in this release.

Full Changelog: v2.0.4...v2.0.5

Important: refer 2.0.0 release notes for those upgrading from 1.X

Artifacts

v2.0.4

22 Apr 06:13

Choose a tag to compare

Important Fixes

  • JUnit XML and Cucumber JSON reports now strip ANSI escape codes from step logs #2799
  • configure afterScenario / beforeScenario now fire correctly for regular scenarios, including on scenario failure #2796 #2540
  • afterScenario hook: match failures now fail the scenario #2699
  • screenshot() from Gherkin now embeds into the HTML report by default #2798
  • script() no longer throws when a JS dialog opens while Runtime.evaluate is pending #2797
  • XML subtree extraction now carries ancestor xmlns:* declarations — fixes SOAP envelope namespace comparison #2469
  • HTML report content stays complete regardless of SLF4J log level
  • JS: break inside switch is now confined and no longer escapes enclosing blocks
  • Java host-function exceptions are now catchable from JS

New Features & Enhancements

  • beforeScenario hook introduced #2239
  • karate.dryRun exposed to feature files; dry-run now enforced at runtime
  • responseStatusText surfaces the HTTP response reason phrase #2591
  • Gatling report: sub-group results now aggregated correctly #2681
  • HttpLogger output split across INFO/DEBUG/TRACE tiers for cleaner logs
  • New karate.server logger for embedded server request/response traces

View the complete list of all issues fixed in this release.

Full Changelog: v2.0.3...v2.0.4

Important: refer 2.0.0 release notes for those upgrading from 1.X

Artifacts

v2.0.3

20 Apr 03:53

Choose a tag to compare

Important Fixes

  • Cookie values now preserve their original quoted/unquoted form on replay (Set-Cookie round-trip) #2779
  • encodeURIComponent / decodeURIComponent / encodeURI / decodeURI now available in feature JS expressions #2788
  • driver.intercept() restored on CdpDriver with mock and inline handler support #2787
  • Data-table cells now emitted as plain strings in Cucumber JSON report output #2785
  • karate-config.js processing failures no longer swallowed silently #2780
  • Extraneous / redundant slashes in feature and resource paths normalized #2732
  • JS parser: } else { and } catch { after a block now parse correctly (ES6 compliance)
  • JS error messages now report JS type names instead of Java class names
  • Fixed 0-indexed line numbers in JS error messages
  • Fixed String.split() literal separator; added isNaN / isFinite globals
  • Added missing ES6 Date / String / console methods

New Features & Enhancements

  • Fail-fast: abortSuiteOnFailure now interrupts in-flight scenarios on first failure #2786
  • mTLS: configure ssl with keyStore honored by the v2 HTTP client; MockServer client-auth supported #2789
  • request.proceed() in JS-file mocks, mirroring karate.proceed() #2344
  • HTML report: skipped-scenario tracking, totals row, and pass-% #2340
  • Wildcard non-proxy hosts + general proxy support #1851
  • Scenario filter by exact name via -n / --name #2522
  • Repeatable -P / --path option on karate run for multi-path runs
  • Tab tracking for popups / new tabs: drainOpenedTargets() + switchPageById()
  • isVisible() overlay detection via elementFromPoint + pointer-events check
  • Pooled drivers that fail a post-reset liveness probe are recycled automatically

View the complete list of all issues fixed in this release.

Full Changelog: v2.0.2...v2.0.3

Important: refer 2.0.0 release notes for those upgrading from 1.X

Artifacts

v2.0.2

09 Apr 04:32

Choose a tag to compare

Important Fixes

  • Cookie values with special characters now correctly quoted per RFC 6265 #2779
  • Embedded expressions (#()) in JSON files now resolved after read() #2778
  • Fixed 0 == null returning true — ES6 compliance for equality and match with parens #2777
  • print, karate.log(), and HTTP logs now appear in console output and in called features in HTML reports #2776 #2774
  • Docstring with @ sign no longer breaks Scenario Outline parsing #2775
  • Tag filter on Examples blocks no longer skips entire Scenario Outline #2773
  • Fixed flaky browser frame test by handling Page.frameDetached and pruning stale frames

View complete list of all issues fixed in this release.

Full Changelog: v2.0.1...v2.0.2

Important: refer 2.0.0 release notes for those upgrading from 1.X

Artifacts

v2.0.1

07 Apr 07:04

Choose a tag to compare

Important: 2.0.2 is available.

Important Fixes

  • HTML / JSON reports don't include ANSI codes any more
  • UI / driver testing issues and v1 compatibility fixed
  • Java interop edge cases / varargs / v1 compatibility
  • Dependencies upgraded / CVE resolutions

View complete list of all issues fixed in this release.

Full Changelog: v2.0.0...v2.0.1

Important: refer 2.0.0 release notes for those upgrading from 1.X

Artifacts