Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #2492

Closed
wants to merge 132 commits into from
Closed

Develop #2492

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
1a106f0
prep for jdk 17 bump #2390
ptrthomas Sep 22, 2023
03cd29a
update docker file for jdk 17 #2390
ptrthomas Sep 22, 2023
b95796c
completed docker changes for jdk 17 #2390
ptrthomas Sep 22, 2023
11c1502
update pom to java 17 and graal vm
fabio-andre-rodrigues Sep 25, 2023
c5ebeb5
improve async / kafka extension plugin approach
ptrthomas Sep 25, 2023
598bd11
extension async value keyword should allow docstring
ptrthomas Sep 25, 2023
acf13b6
graal should not require jdk17 yet, this commit should confirm #2401
ptrthomas Sep 25, 2023
6394e54
trying to find graal version ok for jdk11 #2401
ptrthomas Sep 25, 2023
8ffec70
looks like graal-js 22.3.3 is the last that supports java 11 #2401
ptrthomas Sep 25, 2023
1afb140
[no ci] maven release failed, attempting fix
ptrthomas Sep 25, 2023
71a2ab7
upgrade logback deps to latest #2401
ptrthomas Sep 26, 2023
67e3265
Merge branch 'jdk17' into fix_cve_issues_jdk17
fabio-andre-rodrigues Sep 26, 2023
11abc40
Merge pull request #2402 from fabio-andre-rodrigues/fix_cve_issues_jdk17
ptrthomas Sep 26, 2023
066dc1b
[no ci] use new maven group-id and publish url
ptrthomas Oct 1, 2023
3f1ec14
[no ci] new maven group-id and server #2401 also see prev commit
ptrthomas Oct 1, 2023
1b1607f
[no ci] Merge branch 'develop' into jdk17
ptrthomas Oct 2, 2023
3ad39b1
Merge branch 'develop' into jdk17
ptrthomas Oct 10, 2023
2e55cc3
Merge branch 'develop' into jdk17
ptrthomas Oct 11, 2023
db0be14
Merge branch 'develop' into jdk17
ptrthomas Oct 11, 2023
83cf067
[no ci] Merge branch 'develop' into jdk17
ptrthomas Oct 11, 2023
89689ec
[no ci] bump version for development
ptrthomas Oct 16, 2023
66a924e
[no ci] merge from develop
ptrthomas Oct 16, 2023
fe7ed50
[no ci] fix ci status badge url
ptrthomas Oct 17, 2023
83392da
[no ci] Merge branch 'master' into develop
ptrthomas Oct 17, 2023
8b0d56a
[no ci] Merge branch 'develop' into jdk17
ptrthomas Oct 17, 2023
d042972
Fix 2419 - Multipart form fields ignoring numeric data
san70sh Oct 20, 2023
8c673f2
Fix 2419 - Multipart form fields ignoring numeric data
san70sh Oct 20, 2023
6f40066
Merge pull request #2420 from san70sh/develop
ptrthomas Oct 21, 2023
1bf1cb3
Merge branch 'develop' into jdk17
ptrthomas Oct 21, 2023
d81a05b
fix #2291
Oct 1, 2023
c5d8ecb
jdk17 branch is promoted to develop, bump jdk-compat build to java 22
ptrthomas Oct 21, 2023
4ef7fbb
[no ci] graal has issues with jdk 22
ptrthomas Oct 21, 2023
ee722e1
fix #2291
Oct 22, 2023
a887260
align to latest in develop
ptrthomas Oct 23, 2023
ec83553
align to develop part 2 #2421
ptrthomas Oct 23, 2023
7e612cd
Added log per PR feedback, and parse playwrightOptions.installBrowser…
Oct 24, 2023
d51f6c4
Merge remote-tracking branch 'origin/feature-2291-first-class-support…
Oct 24, 2023
1edb923
Merge pull request #2421 from f-delahaye/feature-2291-first-class-sup…
ptrthomas Oct 25, 2023
24168ef
upgrade a few dependencies
ptrthomas Oct 26, 2023
8f154a5
Fix issue #2333
Songshen1996 Oct 28, 2023
4ef7fb4
Merge pull request #2428 from Songshen1996/fix-issue#2333
ptrthomas Oct 28, 2023
f6f1c0b
Bump org.apache.activemq:activemq-client in /karate-demo
dependabot[bot] Oct 30, 2023
356d2d1
small tweak for server-side js
ptrthomas Nov 2, 2023
300db2f
2431 httpRetryEnabled feature (2409) is inaccessible as it has not be…
Nov 3, 2023
54fbeb3
server - map extension is common in web-dev
ptrthomas Nov 3, 2023
ed0a777
Merge pull request #2433 from ksola/develop
ptrthomas Nov 3, 2023
a213ae6
2431 httpRetryEnabled feature (2409) is inaccessible as it has not be…
Nov 3, 2023
266fe89
#2168
f-delahaye Nov 4, 2023
69b419a
#2168
f-delahaye Nov 4, 2023
e5497b2
Merge pull request #2434 from f-delahaye/2168-add-option-to-write-gat…
ptrthomas Nov 4, 2023
6df9e18
Merge branch 'develop' into 2168-update-documentation
f-delahaye Nov 4, 2023
d409c8d
2168 PR feedback
f-delahaye Nov 4, 2023
2273b80
server - reset session even if global
ptrthomas Nov 4, 2023
66ccefe
Merge pull request #2435 from f-delahaye/2168-update-documentation
ptrthomas Nov 5, 2023
beaf695
ensure response time refflects on response js
ptrthomas Nov 5, 2023
f4529f8
Merge branch 'master' into develop
ptrthomas Nov 7, 2023
1d0181f
Add silent support
ciandt-crodrigues Nov 8, 2023
219082d
fix default value
ciandt-crodrigues Nov 8, 2023
22474ad
small fixes
ciandt-crodrigues Nov 8, 2023
912ddd3
actually skipping the report
ciandt-crodrigues Nov 8, 2023
8ee33b7
fix warnings
ciandt-crodrigues Nov 8, 2023
e74145b
Merge pull request #2440 from ciandt-crodrigues/add-silent-option-for…
ptrthomas Nov 9, 2023
71b3140
code cleanup after prs #2433 #2434 #2428
ptrthomas Nov 9, 2023
afe39d2
Issue 2443: karate mock server interceptor
sergy8612 Nov 11, 2023
f6e8762
Merge pull request #2445 from sergy8612/mock-server-interceptor
ptrthomas Nov 15, 2023
86b5e30
Bump linecorp version
fabio-andre-rodrigues Nov 16, 2023
bd69ab0
Merge pull request #2447 from fabio-andre-rodrigues/patch-1
ptrthomas Nov 16, 2023
faea123
improve js api
ptrthomas Nov 16, 2023
ac114ca
improve user validation
ptrthomas Nov 23, 2023
ef89064
revise logger dependencies based on feedback
ptrthomas Nov 24, 2023
0421180
Remove trimWhiteSpace call from XmlUtils.toString
steveholmesGTS Nov 24, 2023
5ae24b2
Merge pull request #2452 from bouncysteve/develop
ptrthomas Nov 24, 2023
46c18c4
delete dead code #2451 #2452
ptrthomas Nov 24, 2023
710bb90
server - added some helpers
ptrthomas Nov 25, 2023
086176e
server - added helper property
ptrthomas Nov 26, 2023
425818c
release ci wip
ptrthomas Nov 29, 2023
01a3147
[no ci] got the maven release to work, uncomment
ptrthomas Nov 29, 2023
154c939
[no ci] Merge branch 'master' into develop
ptrthomas Nov 30, 2023
879e569
maven release ci docker param
ptrthomas Nov 30, 2023
54a83ec
[no ci] upgrade logback classic
ptrthomas Nov 30, 2023
5d1cffd
[no ci] attempt ci fix
ptrthomas Nov 30, 2023
6cb04c2
[no ci] attempt ci fix
ptrthomas Nov 30, 2023
6e26e16
[no ci] point to new maven loc
ptrthomas Nov 30, 2023
8e9fbff
[no ci] improve readme
ptrthomas Nov 30, 2023
b0facb4
dont include java files in core jar
ptrthomas Nov 30, 2023
063bead
follow up to #2392 refactor a ci test that was calling internet
ptrthomas Dec 1, 2023
4e4b2e0
improve resource abstraction for server templating
ptrthomas Dec 1, 2023
ba03873
upgrade logback version
ptrthomas Dec 1, 2023
b9d612a
upgrade armeria
ptrthomas Dec 1, 2023
432e7a3
[no ci] bump github action version ref #2460
ptrthomas Dec 4, 2023
18dff00
#2291
f-delahaye Dec 10, 2023
7204402
disable test to avoid log spamming
f-delahaye Dec 11, 2023
2734543
Reverted previous commit
f-delahaye Dec 11, 2023
e537429
#2291 - Reworked actionWaitTimeout per comment in #2291
f-delahaye Dec 15, 2023
04abc9b
Merge pull request #2462 from f-delahaye/2291-code-cleanup-and-doc
ptrthomas Dec 16, 2023
d440542
backported from scala dsl
f-delahaye Dec 17, 2023
f3f9328
Merge pull request #2464 from f-delahaye/add-silent-option
ptrthomas Dec 18, 2023
beb0d50
[no ci] Merge branch 'master' into develop
ptrthomas Dec 19, 2023
1008f7d
[no ci] Merge branch 'master' into develop
ptrthomas Dec 19, 2023
de00f73
- Make PWToken a simple wrapper around locator
f-delahaye Dec 23, 2023
371ef76
Merge pull request #2470 from f-delahaye/2291-refactor-locator-first
ptrthomas Jan 2, 2024
29c99f5
[no ci] Merge branch 'master' into develop
ptrthomas Jan 5, 2024
3affad9
minor typo / cleanup
ptrthomas Jan 9, 2024
c7cc672
2340: Enhance karate summary report
codehackerr Jan 13, 2024
9bc789e
fix system properties issue on runner #2474
dvargas46 Jan 16, 2024
48f2b23
Merge pull request #2479 from dvargas46/develop
ptrthomas Jan 18, 2024
f3007c6
Merge pull request #2477 from codehackerr/develop
ptrthomas Jan 18, 2024
61367bc
[no ci] fix code syntax issues when working on new parser
ptrthomas Jan 18, 2024
1b3b66b
[breaking] remove deprecated karate-options annotation
ptrthomas Jan 18, 2024
6d80da8
fix ci error probably related to #2440
ptrthomas Jan 18, 2024
f5a3292
fix thread count issue when using karate.options #2444
dvargas46 Jan 19, 2024
c6b2c62
Merge pull request #2481 from dvargas46/develop
ptrthomas Jan 20, 2024
ba31f00
remove dead code and improve debugger extensibility
ptrthomas Jan 22, 2024
78a5a7b
Merge branch 'master' into develop
ptrthomas Jan 22, 2024
6e70afe
2483: Enhance console report. Add skipped count, pass percentage
codehackerr Jan 22, 2024
e6c2e36
[no ci] add getter for debug port
ptrthomas Jan 23, 2024
0bd9270
2384: Fix setup step execution in dryrun mode
codehackerr Jan 23, 2024
bada06e
2384: Refactor and cleanup
codehackerr Jan 23, 2024
8203dd2
server side cleanup
ptrthomas Jan 26, 2024
36813d7
[no ci] reduce posthog events
ptrthomas Jan 27, 2024
52c21f5
Merge branch '2384_setup_dryrun_compatibility' into develop
codehackerr Jan 29, 2024
43f72c1
Revert unrelated changes
codehackerr Jan 29, 2024
e3654c2
Merge pull request #2491 from codehackerr/develop
ptrthomas Jan 30, 2024
425668e
upgrade all dependencies
ptrthomas Feb 1, 2024
f7d7137
[no ci] Merge remote-tracking branch 'refs/remotes/origin/develop' in…
ptrthomas Feb 1, 2024
248c296
update docs for gatling java dsl
ptrthomas Feb 1, 2024
d9516fb
[no ci] fix ci build
ptrthomas Feb 1, 2024
60fa560
[no ci] revert ci change wip
ptrthomas Feb 1, 2024
91f2773
[no ci] ci fix wip
ptrthomas Feb 1, 2024
1075a1b
[no ci] ci wip
ptrthomas Feb 1, 2024
fcc1ad3
[no ci] ci wip
ptrthomas Feb 1, 2024
481cead
2499: Improve auto-screenshot on error in report
codehackerr Feb 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: maven-build

on:
push:
branches: [ master, develop, java11 ]
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]

Expand All @@ -13,11 +13,11 @@ jobs:
steps:
- name: git checkout
uses: actions/checkout@v4
- name: set up jdk 11
uses: actions/setup-java@v3
- name: set up jdk 17
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 11
java-version: 17
- name: cache maven packages
uses: actions/cache@v4
with:
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ on:
workflow_dispatch:
inputs:
version:
description: version
required: true
default: 'X.X.X.RCX'
docker:
required: true
type: choice
options:
- 'enabled'
- 'disabled'

jobs:
build:
Expand All @@ -15,11 +20,11 @@ jobs:
steps:
- name: git checkout
uses: actions/checkout@v4
- name: set up jdk 11
uses: actions/setup-java@v3
- name: set up jdk 17
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 11
java-version: 17
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
Expand All @@ -29,23 +34,26 @@ jobs:
run: |
mvn versions:set versions:commit -B -ntp -DnewVersion=${{ github.event.inputs.version }}
- name: docker build
if: ( github.event.inputs.docker == 'enabled' )
run: |
mvn clean install -B -ntp -DskipTests -P pre-release
./build-docker.sh
- name: docker login
if: ( github.event.inputs.docker == 'enabled' )
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: docker push
if: ( github.event.inputs.docker == 'enabled' )
run: |
docker tag karate-chrome karatelabs/karate-chrome:${{ github.event.inputs.version }}
docker tag karate-chrome karatelabs/karate-chrome:latest
docker push karatelabs/karate-chrome:${{ github.event.inputs.version }}
docker push karatelabs/karate-chrome:latest
- name: maven deploy to central
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_USERNAME: ${{ secrets.OSSRH_TOKEN_USER }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
run: |
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
</a>
</div>
<div>
<a href="https://central.sonatype.com/namespace/com.intuit.karate">
<img src="https://img.shields.io/maven-central/v/com.intuit.karate/karate-core.svg"/>
<a href="https://central.sonatype.com/namespace/io.karatelabs">
<img src="https://img.shields.io/maven-central/v/io.karatelabs/karate-core.svg"/>
</a>
<a href="https://github.com/karatelabs/karate/actions?query=workflow%3Amaven-build">
<img src="https://github.com/karatelabs/karate/actions/workflows/maven-build.yml/badge.svg?branch=develop"/>
Expand Down Expand Up @@ -1790,6 +1790,8 @@ This can be easily solved by using `java.math.BigDecimal`:
* match json == '{"num":123123123123}'
```

For more tips, refer [here](https://stackoverflow.com/a/77576066/143475).

## `doc`
Karate has a built-in HTML templating engine that can be used to insert additional custom HTML into the test-reports. Here is an [example](karate-core/src/test/java/com/intuit/karate/core/users-doc.feature):

Expand Down
4 changes: 2 additions & 2 deletions build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ mvn versions:set versions:commit -B -ntp -DnewVersion=${KARATE_VERSION} -f examp
mvn clean test -B -ntp -f examples/gatling/pom.xml

# copy only karate jars to a place where the docker image build can add from
KARATE_REPO=karate-docker/karate-chrome/target/repository/com/intuit
KARATE_REPO=karate-docker/karate-chrome/target/repository/io/karatelabs
mkdir -p ${KARATE_REPO}
cp -r ~/.m2/repository/com/intuit/karate ${KARATE_REPO}
cp -r ~/.m2/repository/io/karatelabs ${KARATE_REPO}

# create / copy the karate fatjar so that the docker image build can add it
mvn package -B -ntp -P fatjar -DskipTests -f karate-core/pom.xml
Expand Down
4 changes: 2 additions & 2 deletions examples/consumer-driven-contracts/payment-consumer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.intuit.karate.examples</groupId>
<groupId>io.karatelabs.examples</groupId>
<artifactId>examples-cdc</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
Expand All @@ -13,7 +13,7 @@

<dependencies>
<dependency>
<groupId>com.intuit.karate.examples</groupId>
<groupId>io.karatelabs.examples</groupId>
<artifactId>examples-cdc-producer</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.intuit.karate.examples</groupId>
<groupId>io.karatelabs.examples</groupId>
<artifactId>examples-cdc</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
Expand Down
4 changes: 2 additions & 2 deletions examples/consumer-driven-contracts/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.intuit.karate.examples</groupId>
<groupId>io.karatelabs.examples</groupId>
<artifactId>examples-cdc</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
Expand All @@ -24,7 +24,7 @@

<dependencies>
<dependency>
<groupId>com.intuit.karate</groupId>
<groupId>io.karatelabs</groupId>
<artifactId>karate-core</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
Expand Down
4 changes: 2 additions & 2 deletions examples/gatling/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ plugins {
}

ext {
karateVersion = '1.4.1'
karateVersion = '1.5.0.RC1'
}

dependencies {
testImplementation "com.intuit.karate:karate-gatling:${karateVersion}"
testImplementation "io.karatelabs:karate-gatling:${karateVersion}"
}

repositories {
Expand Down
6 changes: 3 additions & 3 deletions examples/gatling/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.intuit.karate.examples</groupId>
<groupId>io.karatelabs.examples</groupId>
<artifactId>examples-gatling</artifactId>
<version>1.5.0-SNAPSHOT</version>
<packaging>jar</packaging>
Expand All @@ -18,15 +18,15 @@

<dependencies>
<dependency>
<groupId>com.intuit.karate</groupId>
<groupId>io.karatelabs</groupId>
<artifactId>karate-core</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
<!-- next line is normally not required, but is here for testing karate release process -->
<classifier>all</classifier>
</dependency>
<dependency>
<groupId>com.intuit.karate</groupId>
<groupId>io.karatelabs</groupId>
<artifactId>karate-gatling</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
Expand Down
4 changes: 2 additions & 2 deletions examples/image-comparison/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.intuit.karate.examples</groupId>
<groupId>io.karatelabs.examples</groupId>
<artifactId>image-comparison-test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
Expand All @@ -16,7 +16,7 @@

<dependencies>
<dependency>
<groupId>com.intuit.karate</groupId>
<groupId>io.karatelabs</groupId>
<artifactId>karate-junit5</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
Expand Down
4 changes: 2 additions & 2 deletions examples/mobile-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.intuit.karate.examples</groupId>
<groupId>io.karatelabs.examples</groupId>
<artifactId>mobile-test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
Expand All @@ -17,7 +17,7 @@

<dependencies>
<dependency>
<groupId>com.intuit.karate</groupId>
<groupId>io.karatelabs</groupId>
<artifactId>karate-junit5</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
Expand Down
4 changes: 2 additions & 2 deletions examples/profiling-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.intuit.karate.examples</groupId>
<groupId>io.karatelabs.examples</groupId>
<artifactId>profiling-test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
Expand All @@ -17,7 +17,7 @@

<dependencies>
<dependency>
<groupId>com.intuit.karate</groupId>
<groupId>io.karatelabs</groupId>
<artifactId>karate-gatling</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
Expand Down
4 changes: 2 additions & 2 deletions examples/robot-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.intuit.karate.examples</groupId>
<groupId>io.karatelabs.examples</groupId>
<artifactId>examples-robot-test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
Expand All @@ -17,7 +17,7 @@

<dependencies>
<dependency>
<groupId>com.intuit.karate</groupId>
<groupId>io.karatelabs</groupId>
<artifactId>karate-robot</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
Expand Down
4 changes: 2 additions & 2 deletions examples/ui-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.intuit.karate.examples</groupId>
<groupId>io.karatelabs.examples</groupId>
<artifactId>examples-ui-test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
Expand All @@ -16,7 +16,7 @@

<dependencies>
<dependency>
<groupId>com.intuit.karate</groupId>
<groupId>io.karatelabs</groupId>
<artifactId>karate-junit5</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
Expand Down
2 changes: 1 addition & 1 deletion jbang-catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"catalogs": {},
"aliases": {
"karate": {
"script-ref": "com.intuit.karate:karate-core:1.4.1:all"
"script-ref": "io.karatelabs:karate-core:1.5.0.RC1:all"
}
}
}
4 changes: 2 additions & 2 deletions karate-archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.intuit.karate</groupId>
<groupId>io.karatelabs</groupId>
<artifactId>karate-parent</artifactId>
<version>1.4.1</version>
<version>1.6.0-SNAPSHOT</version>
</parent>
<artifactId>karate-archetype</artifactId>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
<java.version>11</java.version>
<maven.compiler.version>3.11.0</maven.compiler.version>
<maven.surefire.version>3.0.0</maven.surefire.version>
<karate.version>1.4.1</karate.version>
<karate.version>1.5.0.RC1</karate.version>
</properties>

<dependencies>
<dependency>
<groupId>com.intuit.karate</groupId>
<groupId>io.karatelabs</groupId>
<artifactId>karate-junit5</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
Expand Down
40 changes: 31 additions & 9 deletions karate-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
| <a href="#karate-chrome">Docker / <code>karate-chrome</code></a>
| <a href="#driver-types">Driver Types</a>
| <a href="#playwright">Playwright</a>
| <a href="#playwright-legacy">Playwright Legacy</a>
| <a href="#timeout"><code>timeout()</code></a>
| <a href="#driversessionid"><code>driver.sessionId</code></a>
</td>
Expand Down Expand Up @@ -346,7 +347,36 @@ Note that some capabilities such as "headless" may be possible via the command-l

Also see [`driver.sessionId`](#driversessionid).


### Playwright

Driver that leverages [Playwright](https://playwright.dev) java native APIs.

To use it, add the following dependency:
```xml
<dependency>
<groupId>io.karate</groupId>
<artifactId>karate-playwright</artifactId>
<scope>test</scope>
</dependency>
```

And make sure it is declared before `io.karate:karate-core`.

A server will be automatically started and made available to Karate without any extra-script. If you have one pre-started, you can still use the [`playwrightUrl`](#configure-driver) driver config.

### `playwrightOptions`
When using [Playwright](#playwright) you can omit this in which case Karate will default to Chrome (within Playwright) and the default browser window size.

This can take the following keys:
* `browserType` - defaults to `chromium`, can be set to the other [types that Playwright supports](https://playwright.dev/docs/core-concepts#browser), e.g. `firefox` and `webkit`
* `context` - JSON which will be passed as the argument of the Playwright [`browser.newContext()`](https://playwright.dev/docs/api/class-browser#browsernewcontextoptions) call, needed typically to set the page dimensions
* `channel` - defaults to chrome, for the `chromium` browserType, allows to specify which [flavor](https://playwright.dev/docs/browsers#google-chrome--microsoft-edge) to use
* `installBrowsers` - defaults to `true`, whether or not all the supported browsers will be downloaded and installed by Playwright (once).

Note that there is a top-level config flag for `headless` mode. The default is: `* configure driver = { headless: false }`

### Playwright Legacy
To use [Playwright](https://playwright.dev), you need to start a Playwright server. If you have one pre-started, you need to use the [`playwrightUrl`](#configure-driver) driver config.

Or you can set up an executable that can do it and log the URL to the console when the server is ready. The websocket URL will look like this: `ws://127.0.0.1:4444/0e0bd1c0bb2d4eb550d02c91046dd6e0`.
Expand Down Expand Up @@ -399,14 +429,6 @@ For convenience, Karate assumes by default that the executable name is `playwrig

Based on the above details, you should be able to come up with a custom strategy to connect Karate to Playwright. And you can consider a [`driverTarget`](#custom-target) approach for complex needs such as using a Docker container for CI.

### `playwrightOptions`
When using [Playwright](#playwright) you can omit this in which case Karate will default to Chrome (within Playwright) and the default browser window size.

This can take the following keys:
* `browserType` - defaults to `chromium`, can be set to the other [types that Playwright supports](https://playwright.dev/docs/core-concepts#browser), e.g. `firefox` and `webkit`
* `context` - JSON which will be passed as the argument of the Playwright [`browser.newContext()`](https://playwright.dev/docs/api/class-browser#browsernewcontextoptions) call, needed typically to set the page dimensions

Note that there is a top-level config flag for `headless` mode. The default is: `* configure driver = { headless: false }`

## `configure driverTarget`
The [`configure driver`](#configure-driver) options are fine for testing on "`localhost`" and when not in `headless` mode. But when the time comes for running your web-UI automation tests on a continuous integration server, things get interesting. To support all the various options such as Docker, headless Chrome, cloud-providers etc., Karate introduces the concept of a pluggable [`Target`](src/main/java/com/intuit/karate/driver/Target.java) where you just have to implement two methods:
Expand Down Expand Up @@ -1950,7 +1972,7 @@ Scenario:
* screenshot()
```

* `driver.intercept()` is supported only for the driver type `chrome`
* `driver.intercept()` is fully supported only for the driver type `chrome`. [`Playwright`](#playwright) supports only [urlPatterns](https://chromedevtools.github.io/devtools-protocol/tot/Fetch/#type-RequestPattern)
* you can route multiple URL patterns to the same Karate mock-feature, the format of each array-element under `patterns` can be found [here](https://chromedevtools.github.io/devtools-protocol/tot/Fetch/#type-RequestPattern).
* the `*` wildcard (most likely what you need) will match any number of characters, e.g. `*myhost/some/path/*`
* `?` will match any single character
Expand Down
Loading
Loading