Skip to content

Commit

Permalink
[no ci] update docs for debug-server change
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrthomas committed Oct 16, 2023
1 parent 4b36ecf commit 29af9f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions karate-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ Combined with Docker, headless Chrome and Karate's [parallel-execution capabilit
Karate has a built-in implementation for Docker ([`DockerTarget`](src/main/java/com/intuit/karate/driver/DockerTarget.java)) that supports 2 existing Docker images out of the box:

* [`justinribeiro/chrome-headless`](https://hub.docker.com/r/justinribeiro/chrome-headless/) - for Chrome "native" in [headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome)
* [`ptrthomas/karate-chrome`](#karate-chrome) - for Chrome "native" but with an option to connect to the container and view via VNC, and with video-recording
* [`karatelabs/karate-chrome`](#karate-chrome) - for Chrome "native" but with an option to connect to the container and view via VNC, and with video-recording

To use either of the above, you do this in a Karate test:

Expand All @@ -449,7 +449,7 @@ function fn() {
baseUrl: 'https://qa.mycompany.com'
};
if (karate.env == 'ci') {
karate.configure('driverTarget', { docker: 'ptrthomas/karate-chrome' });
karate.configure('driverTarget', { docker: 'karatelabs/karate-chrome' });
}
return config;
}
Expand All @@ -458,7 +458,7 @@ function fn() {
To use the [recommended `--security-opt seccomp=chrome.json` Docker option](https://hub.docker.com/r/justinribeiro/chrome-headless/), add a `secComp` property to the `driverTarget` configuration. And if you need to view the container display via VNC, set the `vncPort` to map the port exposed by Docker.

```javascript
karate.configure('driverTarget', { docker: 'ptrthomas/karate-chrome', secComp: 'src/test/java/chrome.json', vncPort: 5900 });
karate.configure('driverTarget', { docker: 'karatelabs/karate-chrome', secComp: 'src/test/java/chrome.json', vncPort: 5900 });
```

### Custom `Target`
Expand Down Expand Up @@ -487,7 +487,7 @@ If the machine where you are running Karate is not the same as your target host
Another (simple) example of a custom `Target` you can use as a reference is this one: [`karate-devicefarm-demo`](https://github.com/ptrthomas/karate-devicefarm-demo) - which demonstrates how Karate can be used to drive tests on [AWS DeviceFarm](https://docs.aws.amazon.com/devicefarm/latest/testgrid/what-is-testgrid.html). The same approach should apply to any Selenium "grid" provider such as [Zalenium](https://opensource.zalando.com/zalenium/).

### `karate-chrome`
The [`karate-chrome`](https://hub.docker.com/r/ptrthomas/karate-chrome) Docker is an image created from scratch, using a Java / Maven image as a base and with the following features:
The [`karate-chrome`](https://hub.docker.com/r/karatelabs/karate-chrome) Docker is an image created from scratch, using a Java / Maven image as a base and with the following features:

* Chrome in "full" mode (non-headless)
* [Chrome DevTools protocol](https://chromedevtools.github.io/devtools-protocol/) exposed on port 9222
Expand All @@ -498,7 +498,7 @@ The [`karate-chrome`](https://hub.docker.com/r/ptrthomas/karate-chrome) Docker i
To try this or especially when you need to investigate why a test is not behaving properly when running within Docker, these are the steps:

* start the container:
* `docker run --name karate --rm -p 9222:9222 -p 5900:5900 -e KARATE_SOCAT_START=true --cap-add=SYS_ADMIN ptrthomas/karate-chrome`
* `docker run --name karate --rm -p 9222:9222 -p 5900:5900 -e KARATE_SOCAT_START=true --cap-add=SYS_ADMIN karatelabs/karate-chrome`
* it is recommended to use [`--security-opt seccomp=chrome.json`](https://hub.docker.com/r/justinribeiro/chrome-headless/) instead of `--cap-add=SYS_ADMIN`
* point your VNC client to `localhost:5900` (password: `karate`)
* for example on a Mac you can use this command: `open vnc://localhost:5900`
Expand Down
2 changes: 1 addition & 1 deletion karate-netty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ java -jar karate.jar -T 5 -C src/features
```

#### Debug Server
The `-d` or `--debug` option will start a debug server. See the [Debug Server wiki](https://github.com/karatelabs/karate/wiki/Debug-Server#standalone-jar) for more details.
The `-d` or `--debug` option will start a debug server. See the [Debug Server wiki](https://github.com/karatelabs/karate/wiki/Debug-Server) for more details.

## Custom Classpath
Karate allows you to use custom Java code or 3rd party Java libraries using [Java interop](https://github.com/karatelabs/karate#calling-java). Normally those who do this use Karate in the context of [Maven](https://maven.apache.org) or [Gradle](https://gradle.org) - and the [classpath](https://github.com/karatelabs/karate#classpath) would be set automatically.
Expand Down

0 comments on commit 29af9f4

Please sign in to comment.