Skip to content

Commit 3456650

Browse files
committed
Polish
1 parent c4fd1f2 commit 3456650

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

docs/modules/k6.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@ Testcontainers module for [k6](https://registry.hub.docker.com/r/grafana/k6).
1414
You can start a K6 container instance from any Java application by using:
1515

1616
<!--codeinclude-->
17-
[Setup the container](../../modules/k6/src/test/java/org/testcontainers/k6/K6ContainerTests.java) inside_block:standard_k6_test
17+
[Setup the container](../../modules/k6/src/test/java/org/testcontainers/k6/K6ContainerTests.java) inside_block:standard_k6
1818
<!--/codeinclude-->
1919

2020
The test above uses a simple k6 script, `test.js`, with command line options and an injected script variable.
2121

22+
Once the container is started, you can wait for the test results to be collected:
23+
24+
<!--codeinclude-->
25+
[Wait for test results](../../modules/k6/src/test/java/org/testcontainers/k6/K6ContainerTests.java) inside_block:wait
26+
<!--/codeinclude-->
27+
2228
Create a simple k6 test script to be executed as part of your tests:
2329

2430
<!--codeinclude-->

modules/k6/src/test/java/org/testcontainers/k6/K6ContainerTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ void k6StandardTest() throws Exception {
2323
) {
2424
container.start();
2525

26+
// wait {
2627
WaitingConsumer consumer = new WaitingConsumer();
2728
container.followOutput(consumer);
2829

@@ -34,6 +35,7 @@ void k6StandardTest() throws Exception {
3435
3,
3536
TimeUnit.SECONDS
3637
);
38+
// }
3739

3840
assertThat(container.getLogs()).contains("k6 tests are cool!");
3941
}

0 commit comments

Comments
 (0)