Skip to content

Commit 0b4bca1

Browse files
committed
complete merge for version 1.5.2 final
2 parents c545803 + 003dd3f commit 0b4bca1

File tree

86 files changed

+1783
-933
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1783
-933
lines changed

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040

4141
steps:
4242
- name: Checkout repository
43-
uses: actions/checkout@v5
43+
uses: actions/checkout@v6
4444

4545
- name: set up jdk 17
4646
uses: actions/setup-java@v5

.github/workflows/jdk-compat.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: git checkout
13-
uses: actions/checkout@v5
13+
uses: actions/checkout@v6
1414
- name: get latest jdk ga
1515
uses: oracle-actions/setup-java@v1
1616
with:
1717
website: jdk.java.net
18-
release: 23
18+
release: 25
1919
- name: cache maven packages
2020
uses: actions/cache@v4
2121
with:

.github/workflows/maven-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: git checkout
15-
uses: actions/checkout@v5
15+
uses: actions/checkout@v6
1616
- name: set up jdk 17
1717
uses: actions/setup-java@v5
1818
with:

.github/workflows/maven-release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ jobs:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- name: git checkout
31-
uses: actions/checkout@v5
31+
uses: actions/checkout@v6
3232
- name: set up jdk 17
3333
uses: actions/setup-java@v5
3434
with:
3535
distribution: adopt
3636
java-version: 17
37-
server-id: ossrh
38-
server-username: MAVEN_USERNAME
39-
server-password: MAVEN_PASSWORD
37+
server-id: central
38+
server-username: CENTRAL_TOKEN_USERNAME
39+
server-password: CENTRAL_TOKEN_PASSWORD
4040
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
4141
gpg-passphrase: MAVEN_GPG_PASSPHRASE
4242
- name: set maven version
@@ -63,11 +63,11 @@ jobs:
6363
- name: maven deploy to central
6464
if: ( github.event.inputs.maven == 'enabled' )
6565
env:
66-
MAVEN_USERNAME: ${{ secrets.OSSRH_TOKEN_USER }}
67-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
66+
CENTRAL_TOKEN_USERNAME: ${{ secrets.OSSRH_TOKEN_USER }}
67+
CENTRAL_TOKEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
6868
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
6969
run: |
70-
mvn -B -ntp deploy -DskipTests -P pre-release,release
70+
mvn -B -ntp deploy -DskipTests -P pre-release,release -pl "!karate-archetype,!karate-demo,!karate-e2e-tests"
7171
- name: maven build binaries
7272
run: |
7373
mvn package -DskipTests -P fatjar -f karate-core/pom.xml

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ All you need is available in the [`karate-core`](https://search.maven.org/artifa
349349
<dependency>
350350
<groupId>io.karatelabs</groupId>
351351
<artifactId>karate-junit5</artifactId>
352-
<version>1.5.1</version>
352+
<version>1.5.2</version>
353353
<scope>test</scope>
354354
</dependency>
355355
```
@@ -358,7 +358,7 @@ All you need is available in the [`karate-core`](https://search.maven.org/artifa
358358
Alternatively for [Gradle](https://gradle.org):
359359

360360
```yml
361-
testImplementation 'io.karatelabs:karate-junit5:1.5.1'
361+
testImplementation 'io.karatelabs:karate-junit5:1.5.2'
362362
```
363363

364364
Also refer to the wiki for using [Karate with Gradle](https://github.com/karatelabs/karate/wiki/Gradle).
@@ -393,7 +393,7 @@ You can replace the values of `com.mycompany` and `myproject` as per your needs.
393393
mvn archetype:generate \
394394
-DarchetypeGroupId=io.karatelabs \
395395
-DarchetypeArtifactId=karate-archetype \
396-
-DarchetypeVersion=1.5.1 \
396+
-DarchetypeVersion=1.5.2 \
397397
-DgroupId=com.mycompany \
398398
-DartifactId=myproject
399399
```
@@ -2419,6 +2419,8 @@ karate.configure('ssl', { trustAll: true });
24192419

24202420
For end-to-end examples in the Karate demos, look at the files in [this folder](karate-demo/src/test/java/ssl).
24212421

2422+
There is also a minimal Spring Boot based example here: [Karate and SSL](https://github.com/karatelabs/karate-examples/blob/main/ssl/README.md)
2423+
24222424
### NTLM Authentication
24232425
Karate provides support for NTLM authentication using the Apache NTLMEngine implementation.
24242426

@@ -4271,6 +4273,7 @@ Karate also has built-in support for [websocket](http://www.websocket.org) that
42714273
* `subProtocol` - in case the server expects it
42724274
* `headers` - another JSON of key-value pairs
42734275
* `maxPayloadSize` - this defaults to 4194304 (bytes, around 4 MB)
4276+
* `useFrameAggregation` - (Boolean) defaults to `false`. Can be enabled to aggregate multiple frames if the server sends multiple frames for a single payload.
42744277

42754278
These will init a websocket client for the given `url` and optional `subProtocol`. You can call `send()` on the returned object to send a message.
42764279

@@ -4330,6 +4333,7 @@ For completeness, the "built-in" tags are the following:
43304333
Tag | Description
43314334
--- | -----------
43324335
`@ignore` | Any `Scenario` with (or that has inherited) this tag will be skipped at run-time. This does not apply to anything that is "called" though
4336+
`@fail` | Any `Scenario` with (or that has inherited) this tag will be expected to fail. This can be used if e.g. tests are written before fixes
43334337
`@parallel` | See [`@parallel=false`](#parallelfalse)
43344338
`@report` | See [`@report=false`](#reportfalse)
43354339
`@setup` | See [`@setup`](#setup)

build-docker.sh

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,40 +12,51 @@ mvn clean test -B -ntp -f examples/gatling/pom.xml
1212

1313
# copy only karate jars to a place where the docker image build can add from
1414
KARATE_REPO=karate-docker/karate-chrome/target/repository/io/karatelabs
15-
mkdir -p ${KARATE_REPO}
16-
cp -r ~/.m2/repository/io/karatelabs ${KARATE_REPO}
15+
mkdir -p "${KARATE_REPO}"
16+
cp -r ~/.m2/repository/io/karatelabs "${KARATE_REPO}"
1717

1818
# create / copy the karate fatjar so that the docker image build can add it
1919
mvn package -B -ntp -P fatjar -DskipTests -f karate-core/pom.xml
20-
cp karate-core/target/karate-${KARATE_VERSION}.jar karate-docker/karate-chrome/target/karate.jar
20+
cp "karate-core/target/karate-${KARATE_VERSION}.jar" karate-docker/karate-chrome/target/karate.jar
2121

22-
# setup multiplatform build
23-
docker buildx rm multiplatform-builder
22+
# setup multiplatform build (ignore error if builder doesn't exist)
23+
docker buildx rm multiplatform-builder || true
2424
docker buildx create --name multiplatform-builder
2525
docker buildx use multiplatform-builder
2626

2727
# build karate-chrome docker image that includes karate fatjar + maven jars for convenience
28-
# Only possible for linux/amd64 as chrome not available on linux/arm64
29-
docker buildx build --platform linux/amd64 --cache-from=type=local,src=./target/docker --cache-to=type=local,dest=./target/docker -t karatelabs/karate-chrome:${{ github.event.inputs.version }} -t karatelabs/karate-chrome:latest karate-docker/karate-chrome
30-
# build karate-chromium docker image that includes karate fatjar + maven jars for convenience
31-
# Both platform
32-
docker buildx build --platform linux/amd64,linux/arm64 --cache-from=type=local,src=./target/docker --cache-to=type=local,dest=./target/docker -t karatelabs/karate-chromium:${{ github.event.inputs.version }} -t karatelabs/karate-chromium:latest karate-docker/karate-chromium
28+
# Only linux/amd64 is supported because google-chrome-stable is amd64-only
29+
docker buildx build \
30+
--platform linux/amd64 \
31+
--cache-from=type=local,src=./target/docker \
32+
--cache-to=type=local,dest=./target/docker \
33+
-t karatelabs/karate-chrome:${{ github.event.inputs.version }} \
34+
-t karatelabs/karate-chrome:latest \
35+
karate-docker/karate-chrome
3336

34-
# Select image for test depending current OS
37+
# Decide platform for local "load" build
38+
PLATFORM_FLAG=""
3539
if [[ "$OSTYPE" == "darwin"* ]]; then
36-
# chromium only solution on Mac darwin
37-
IMAGE=chromium
38-
else
39-
IMAGE=chrome
40+
# On Mac (including M1), force linux/amd64 so Chrome is available
41+
PLATFORM_FLAG="--platform=linux/amd64"
4042
fi
41-
# Load image image for local
42-
docker buildx build --load --cache-from=type=local,src=./target/docker -t karate-$IMAGE karate-docker/karate-$IMAGE
43+
44+
# Build local image (for running tests) and load into Docker
45+
docker buildx build \
46+
--load \
47+
${PLATFORM_FLAG} \
48+
--cache-from=type=local,src=./target/docker \
49+
-t karate-chrome \
50+
karate-docker/karate-chrome
4351

4452
# just in case a previous run had hung (likely only in local dev)
4553
docker stop karate || true
4654

4755
# note that this command is run as a background process
48-
docker run --name karate --rm --cap-add=SYS_ADMIN -v "$PWD":/karate -v "$HOME"/.m2:/root/.m2 karate-$IMAGE &
56+
docker run --name karate --rm --cap-add=SYS_ADMIN \
57+
-v "$PWD":/karate \
58+
-v "$HOME/.m2":/root/.m2 \
59+
karate-chrome &
4960

5061
# just ensure that the docker container named "karate" exists after the above command
5162
# it does not have to have completed startup, the command / karate test below will wait
@@ -59,4 +70,3 @@ docker exec -w /karate karate mvn test -B -ntp -f karate-e2e-tests/pom.xml -Dtes
5970

6071
docker stop karate
6172
wait
62-

examples/consumer-driven-contracts/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<spring.boot.version>3.2.2</spring.boot.version>
2020
<junit5.version>5.7.0</junit5.version>
2121
<java.version>17</java.version>
22-
<karate.version>1.5.1</karate.version>
22+
<karate.version>1.5.2</karate.version>
2323
</properties>
2424

2525
<dependencies>

examples/gatling/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
}
44

55
ext {
6-
karateVersion = '1.5.1'
6+
karateVersion = '1.5.2'
77
}
88

99
dependencies {

examples/gatling/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<maven.compiler.version>3.6.0</maven.compiler.version>
1414
<!-- please change this when running locally -->
1515
<karate.version>${project.version}</karate.version>
16-
<gatling.plugin.version>4.1.1</gatling.plugin.version>
16+
<gatling.plugin.version>4.3.4</gatling.plugin.version>
1717
</properties>
1818

1919
<dependencies>

examples/image-comparison/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1212
<java.version>17</java.version>
1313
<maven.compiler.version>3.8.1</maven.compiler.version>
14-
<karate.version>1.5.1</karate.version>
14+
<karate.version>1.5.2</karate.version>
1515
</properties>
1616

1717
<dependencies>

0 commit comments

Comments
 (0)