Skip to content

Commit

Permalink
upgrade to Karate 1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Soumendra Daas committed Oct 27, 2023
1 parent 4ec98d6 commit 9cc1c30
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $ curl localhost:8080/api/person/42
## Setting Up Karate

The folder structure for Karate tests is given in the Karate documentation on
[folder structure](https://github.com/intuit/karate#folder-structure), but the
[folder structure](https://github.com/karatelabs/karate#folder-structure), but the
summary is that:

* All tests are defined in `*.feature` files
Expand All @@ -46,7 +46,7 @@ summary is that:


A `*.feature` file has the same syntax as [Gherkin/Cucumber](https://cucumber.io/docs/gherkin/reference/)
and is also described in Karate [documentation](https://github.com/intuit/karate#script-structure). The
and is also described in Karate [documentation](https://github.com/karatelabs/karate#script-structure). The
key points are

* Lines that start with `#` are comments
Expand All @@ -60,24 +60,26 @@ key points are
* `Then` : the expected outcome(s)


The [`karate-config.js`](https://github.com/intuit/karate#karate-configjs) file in the `/test/java` folder contains the environment
The [`karate-config.js`](https://github.com/karatelabs/karate#karate-configjs) file in the `/test/java` folder contains the environment
and global variables used by Karate. This is is basically a javascript function that returns
a JSON object. Which means that the file cannot contain any comment statements before the function body.


### Logging Configuration

Logging configuration is controlled by the `/test/java/logback.xml` file as explained in the Karate documentation
on [logging](https://github.com/intuit/karate#logging).
on [logging](https://github.com/karatelabs/karate#logging).

## Setting up your Laptop


On Macs, you need to have an entry in your `/etc/hosts` file that contains an entry with your machine name. For example ...
```
127.0.0.1 localhost -MY-MACHINE-NAME-
```

This happens due to the way netty works in Karate. This issue is supposed to be fixed in Karate 1.0
(TODO - check if this is still valid for Karate 1.4 )

## Running the tests

Expand Down Expand Up @@ -122,8 +124,9 @@ master branch. See [maven.yml](.github/workflows/maven.yml)

### References

* [Karate DSL ](https://github.com/intuit/karate)
* [Karate 1.0 Upgrade Guide](https://github.com/karatelabs/karate/wiki/1.0-upgrade-guide)
* [Karate DSL ](https://github.com/karatelabs/karate)
* [Wiki](https://github.com/karatelabs/karate/wiki/)
* [Documentation](https://karatelabs.github.io/karate/)
* [Spring Boot](https://spring.io/projects/spring-boot)
* [Quickstart for Github Actions](https://docs.github.com/en/actions/quickstart?utm_source=pocket_mylist)
* [Maven Release Plugin](https://maven.apache.org/maven-release/maven-release-plugin/index.html)
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<java.version>11</java.version>

<junit-jupiter.version>5.4.0</junit-jupiter.version>
<karate.version>1.2.0</karate.version>
<karate.version>1.4.1</karate.version>

<maven-surefire-plugin.version>2.22.1</maven-surefire-plugin.version>
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
Expand Down Expand Up @@ -80,6 +80,7 @@
</scm>

<build>
<!-- See https://github.com/karatelabs/karate#folder-structure for writeup on folder structure -->
<testResources>
<testResource>
<directory>src/test/java</directory>
Expand Down

0 comments on commit 9cc1c30

Please sign in to comment.