Skip to content

Commit

Permalink
prep release 0.9.5 final
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrthomas committed Feb 16, 2020
1 parent a29c310 commit a6ab132
Show file tree
Hide file tree
Showing 25 changed files with 86 additions and 107 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ For teams familiar with or currently using [REST-assured](https://rest-assured.io
* [Testing Web Services with Karate](https://automationpanda.com/2018/12/10/testing-web-services-with-karate/) - quick start guide and review by [Andrew Knight](https://twitter.com/automationpanda) at the *Automation Panda* blog


You can find a lot more references [in the wiki](https://github.com/intuit/karate/wiki/Community-News). Karate also has its own 'tag' and a very active and supportive community at [Stack Overflow](https://stackoverflow.com/questions/tagged/karate).
You can find a lot more references [in the wiki](https://github.com/intuit/karate/wiki/Community-News). Karate also has its own "tag" and a very active and supportive community at [Stack Overflow](https://stackoverflow.com/questions/tagged/karate).

# Getting Started
If you are a Java developer - Karate requires [Java](https://www.oracle.com/technetwork/java/javase/downloads/index.html) 8 (at least version 1.8.0_112 or greater) and then either [Maven](https://maven.apache.org), [Gradle](https://gradle.org), [Eclipse](#eclipse-quickstart) or [IntelliJ](https://github.com/intuit/karate/wiki/IDE-Support#intellij-community-edition) to be installed. Note that Karate works fine on OpenJDK. Any Java version from 8-12 is supported.
Expand All @@ -281,13 +281,13 @@ So you need two `<dependencies>`:
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-apache</artifactId>
<version>0.9.4</version>
<version>0.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-junit5</artifactId>
<version>0.9.4</version>
<version>0.9.5</version>
<scope>test</scope>
</dependency>
```
Expand All @@ -300,8 +300,8 @@ If you want to use [JUnit 4](#junit-4), use `karate-junit4` instead of `karate-j
Alternatively for [Gradle](https://gradle.org) you need these two entries:

```yml
testCompile 'com.intuit.karate:karate-junit5:0.9.4'
testCompile 'com.intuit.karate:karate-apache:0.9.4'
testCompile 'com.intuit.karate:karate-junit5:0.9.5'
testCompile 'com.intuit.karate:karate-apache:0.9.5'
```

Also refer to the wiki for using [Karate with Gradle](https://github.com/intuit/karate/wiki/Gradle).
Expand All @@ -317,7 +317,7 @@ You can replace the values of `com.mycompany` and `myproject` as per your needs.
mvn archetype:generate \
-DarchetypeGroupId=com.intuit.karate \
-DarchetypeArtifactId=karate-archetype \
-DarchetypeVersion=0.9.4 \
-DarchetypeVersion=0.9.5 \
-DgroupId=com.mycompany \
-DartifactId=myproject
```
Expand Down Expand Up @@ -369,7 +369,7 @@ With the above in place, you don't have to keep switching between your `src/test
Once you get used to this, you may even start wondering why projects need a `src/test/resources` folder at all !

### Spring Boot Example
Soumendra Daas has created a nice example and guide that you can use as a reference here: [`hello-karate`](https://github.com/Sdaas/hello-karate). This demonstrates a Java Maven + JUnit4 project set up to test a [Spring Boot](https://projects.spring.io/spring-boot/) app.
[Soumendra Daas](https://twitter.com/sdaas) has created a nice example and guide that you can use as a reference here: [`hello-karate`](https://github.com/Sdaas/hello-karate). This demonstrates a Java Maven + JUnit4 project set up to test a [Spring Boot](https://projects.spring.io/spring-boot/) app.

## Naming Conventions

Expand Down
2 changes: 1 addition & 1 deletion examples/consumer-driven-contracts/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<java.version>1.8</java.version>
<maven.compiler.version>3.6.0</maven.compiler.version>
<spring.boot.version>2.2.0.RELEASE</spring.boot.version>
<karate.version>1.0.0</karate.version>
<karate.version>0.9.5</karate.version>
</properties>

<dependencies>
Expand Down
48 changes: 48 additions & 0 deletions examples/gatling/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
plugins {
id 'scala'
}

ext {
karateVersion = '0.9.5'
}

dependencies {
testCompile "com.intuit.karate:karate-apache:${karateVersion}"
testCompile "com.intuit.karate:karate-gatling:${karateVersion}"
}

repositories {
mavenCentral()
// mavenLocal()
}

test {
systemProperty "karate.options", System.properties.getProperty("karate.options")
systemProperty "karate.env", System.properties.getProperty("karate.env")
outputs.upToDateWhen { false }
}

sourceSets {
test {
resources {
srcDir file('src/test/java')
exclude '**/*.java'
exclude '**/*.scala'
}
}
}

// to run, type: "gradle gatling"
task gatlingRun(type: JavaExec) {
group = 'Web Tests'
description = 'Run Gatling Tests'
new File("${buildDir}/reports/gatling").mkdirs()
classpath = sourceSets.test.runtimeClasspath
main = "io.gatling.app.Gatling"
args = [
// change this to suit your simulation entry-point
'-s', 'mock.CatsKarateSimulation',
'-rf', "${buildDir}/reports/gatling"
]
systemProperties System.properties
}
2 changes: 1 addition & 1 deletion examples/gatling/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<maven.compiler.version>3.6.0</maven.compiler.version>
<karate.version>1.0.0</karate.version>
<karate.version>0.9.5</karate.version>
<gatling.plugin.version>3.0.2</gatling.plugin.version>
</properties>

Expand Down
6 changes: 3 additions & 3 deletions examples/jobserver/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

ext {
karateVersion = '1.0.0'
karateVersion = '0.9.5'
}

dependencies {
Expand All @@ -29,8 +29,8 @@ test {
}

repositories {
// mavenCentral()
mavenLocal()
mavenCentral()
// mavenLocal()
}

task karateDebug(type: JavaExec) {
Expand Down
2 changes: 1 addition & 1 deletion examples/jobserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<maven.compiler.version>3.6.0</maven.compiler.version>
<karate.version>1.0.0</karate.version>
<karate.version>0.9.5</karate.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion examples/ui-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<maven.compiler.version>3.6.0</maven.compiler.version>
<karate.version>1.0.0</karate.version>
<karate.version>0.9.5</karate.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion karate-apache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-parent</artifactId>
<version>1.0.0</version>
<version>0.9.5</version>
</parent>
<artifactId>karate-apache</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion karate-archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-parent</artifactId>
<version>1.0.0</version>
<version>0.9.5</version>
</parent>
<artifactId>karate-archetype</artifactId>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<maven.compiler.version>3.6.0</maven.compiler.version>
<karate.version>0.9.4</karate.version>
<karate.version>0.9.5</karate.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion karate-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-parent</artifactId>
<version>1.0.0</version>
<version>0.9.5</version>
</parent>
<artifactId>karate-core</artifactId>
<packaging>jar</packaging>
Expand Down
15 changes: 4 additions & 11 deletions karate-core/src/test/resources/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ main:
mvn versions:set -DnewVersion=@@@
(edit archetype karate.version)
(edit README.md maven 5 places)
(edit karate-gatling/build.gradle 1 place)
(edit examples/jobserver/pom.xml)
(edit examples/gatling/pom.xml)

(edit examples/gatling/build.gradle)
(edit examples/jobserver/build.gradle)
(edit examples/*/pom.xml)
mvn versions:commit
mvn clean deploy -P pre-release,release

Expand All @@ -19,9 +20,6 @@ cd karate-netty
mvn install -P fatjar
https://bintray.com/ptrthomas/karate

edit-wiki:
https://github.com/intuit/karate/wiki/ZIP-Release

docker:
(double check if the below pom files are updated for the version
(edit examples/jobserver/pom.xml)
Expand All @@ -36,8 +34,3 @@ docker tag karate-chrome ptrthomas/karate-chrome:latest

docker tag karate-chrome ptrthomas/karate-chrome:@@@
docker push ptrthomas/karate-chrome

misc-examples:
update https://github.com/ptrthomas/karate-gatling-demo
update https://github.com/ptrthomas/payment-service
update https://github.com/ptrthomas/karate-sikulix-demo
5 changes: 4 additions & 1 deletion karate-demo/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Karate Demo
This is a sample [Spring Boot](https://projects.spring.io/spring-boot/) web-application that exposes some functionality as web-service end-points. And includes a set of Karate examples that test these services as well as demonstrate various Karate features and best-practices.

Note that this is *not* the best example of a skeleton Java / Maven project, as it is designed to be part of the Karate code-base and act as a suite of regression tests. For a good "starter" project, please use the [Quickstart](https://github.com/intuit/karate#quickstart) or the sample [Spring Boot Example](https://github.com/intuit/karate#spring-boot-example).
Note that this is *not* the best example of a skeleton Java / Maven project, as it is designed to be part of the Karate code-base and act as a suite of regression tests. For a good "starter" project, please use one of these:
* the [Quickstart](https://github.com/intuit/karate#quickstart)
* the sample [Spring Boot Example](https://github.com/intuit/karate#spring-boot-example)
* the [examples/jobserver](../examples/jobserver) project

| Example | Demonstrates
----------| --------
Expand Down
2 changes: 1 addition & 1 deletion karate-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-parent</artifactId>
<version>1.0.0</version>
<version>0.9.5</version>
</parent>

<artifactId>karate-demo</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion karate-gatling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ It is worth calling out that in the sample project, we are perf-testing [Karate

### Gradle

For those who use [Gradle](https://gradle.org), this sample [`build.gradle`](build.gradle) provides a `gatlingRun` task that executes the Gatling test of the `karate-netty` project - which you can use as a reference. The approach is fairly simple, and does not require the use of any Gradle Gatling plugins.
For those who use [Gradle](https://gradle.org), this sample [`build.gradle`](../examples/gatling/build.gradle) provides a `gatlingRun` task that executes the Gatling test of the `karate-netty` project - which you can use as a reference. The approach is fairly simple, and does not require the use of any Gradle Gatling plugins.

Most problems when using Karate with Gradle occur when "test-resources" are not configured properly. So make sure that all your `*.js` and `*.feature` files are copied to the "resources" folder - when you build the project.

Expand Down
65 changes: 0 additions & 65 deletions karate-gatling/build.gradle

This file was deleted.

2 changes: 1 addition & 1 deletion karate-gatling/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-parent</artifactId>
<version>1.0.0</version>
<version>0.9.5</version>
</parent>
<artifactId>karate-gatling</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion karate-jersey/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-parent</artifactId>
<version>1.0.0</version>
<version>0.9.5</version>
</parent>
<artifactId>karate-jersey</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion karate-junit4/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-parent</artifactId>
<version>1.0.0</version>
<version>0.9.5</version>
</parent>
<artifactId>karate-junit4</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion karate-junit5/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-parent</artifactId>
<version>1.0.0</version>
<version>0.9.5</version>
</parent>
<artifactId>karate-junit5</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion karate-mock-servlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-parent</artifactId>
<version>1.0.0</version>
<version>0.9.5</version>
</parent>

<artifactId>karate-mock-servlet</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion karate-netty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-parent</artifactId>
<version>1.0.0</version>
<version>0.9.5</version>
</parent>
<artifactId>karate-netty</artifactId>
<packaging>jar</packaging>
Expand Down
4 changes: 2 additions & 2 deletions karate-robot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This may result in a few large JAR files getting downloaded by default because o
## `robot`
Karate Robot is designed to only activate when you use the `robot` keyword, and if the `karate-robot` Java / JAR dependency is present in the project classpath.

Here Karate will look for an application window called `Chrome` and will "focus" it so that it becomes the top-most window, and be visible. This will work on Mac, Windows and Linux (X Windows).
Here Karate will look for an application window called `Chrome` and will "focus" it so that it becomes the top-most window, and be visible. This will work on Mac, Windows and Linux (X Window System / X11).

```cucumber
* robot { app: 'Chrome' }
Expand All @@ -50,7 +50,7 @@ Note that you can use [`karate.exec()`](https://github.com/intuit/karate#karate-

> If you want to do conditional logic depending on the OS, you can use [`karate.os`](https://github.com/intuit/karate#karate-os) - for e.g. `* if (karate.os.type == 'windows') karate.set('filename', 'start.bat')`
The keys that the `robot` keyword support are the below.
The keys that the `robot` keyword supports are the following:

key | description
--- | -----------
Expand Down
Loading

0 comments on commit a6ab132

Please sign in to comment.