Skip to content

Commit 763b38b

Browse files
nadiamoeNadia Santalla
authored and
Nadia Santalla
committed
manualtest: document croco6 in README
1 parent 5c066e0 commit 763b38b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,18 @@ Moreover, chromium's sandbox focuses on isolating the processes running untruste
1010
Regarding process isolation, we only run one chromium process concurrently, and that's the only process in the container running as the (unprivileged) container. Therefore we do not see much value in this isolation.
1111
Regarding filesystem access, the whole container is run with a read-only filesystem. The Crocochrome binary is not readable or runnable by the user chromium is running on, and there should be no sensitive files to be accessed whatsoever.
1212
Regarding the network, we can use `NetworkPolicy` objects to forbid the Crocochrome container from accessing private IP ranges.
13+
14+
## Manual testing
15+
16+
The `manualtest` folder includes some simple scripts that use browser and can be used to test Crocochrome. Additionally, a script called `croco6.sh` also in that folder acts as a k6 wrapper that connects to a running instance of Crocochrome and configures k6 to use it. It can be used as follows:
17+
18+
```bash
19+
# Build and run container
20+
docker build . -t localhost:5000/crocochrome && \
21+
docker run -ti --rm -p 8080:8080 --memory=512M --read-only -v /tmp:/chromium-tmp localhost:5000/crocochrome
22+
23+
# Run a script
24+
./manualtest/croco6.sh run manualtest/testk6io.js
25+
```
26+
27+
All arguments passed to `croco6.sh` are passed to k6 unmodified. `croco6.sh` takes care of creating a browser session in Crocochrome, retrieving the websocket URL, passing it down to k6, and finally destroying the session when k6 exits.

0 commit comments

Comments
 (0)