Skip to content

Commit 3a1fdc2

Browse files
Clarify that init is once per VU
Closes: #1124
1 parent 88eb0ee commit 3a1fdc2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/data/markdown/translated-guides/en/02 Using k6/06 Test lifecycle.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,14 @@ For examples and implementation details of each stage, refer to the subsequent s
5959

6060
**The init stage is required**.
6161
Before the test runs, k6 needs to initialize the test conditions.
62-
To prepare the test, the code in the `init` context:
62+
To prepare the test, code in the `init` context runs once per VU.
6363

64-
- Imports modules
65-
- Loads files from the local file system
66-
- Configures the test for all `options`
67-
- Defines lifecycle functions for the VU, `setup`, and `teardown` stages (and for custom or `handleSummary()` functions, too).
64+
Some operations that might happen in `init` include the following:
65+
66+
- Import modules
67+
- Load files from the local file system
68+
- Configure the test for all `options`
69+
- Define lifecycle functions for the VU, `setup`, and `teardown` stages (and for custom or `handleSummary()` functions, too).
6870

6971

7072
**All code that is outside of a lifecycle function is code in the `init` context**.

0 commit comments

Comments
 (0)