Skip to content

Commit 92d0958

Browse files
Update documentation for PowerShell-based BeforeAll/AfterAll implementation
Co-authored-by: MariusStorhaug <[email protected]>
1 parent 2027a0b commit 92d0958

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Depending on the labels in the pull requests, the workflow will result in differ
4242
- [Test module](./.github/workflows/Test-ModuleLocal.yml)
4343
- Import and tests the module in parallel (matrix) using Pester tests from the module repository.
4444
- Supports setup and teardown scripts:
45-
- **BeforeAll.ps1**: Runs once before all test matrix jobs to set up test environment (e.g., deploy infrastructure, download test data)
46-
- **AfterAll.ps1**: Runs once after all test matrix jobs complete to clean up test environment (e.g., remove test resources, cleanup databases)
45+
- **BeforeAll.ps1**: Runs before each test execution to set up test environment (e.g., deploy infrastructure, download test data)
46+
- **AfterAll.ps1**: Runs after each test execution to clean up test environment (e.g., remove test resources, cleanup databases)
4747
- Setup/teardown scripts are automatically detected in test directories and executed with the same environment variables as tests
4848
- This produces a json based report that is used to later evaluate the results of the tests.
4949
- [Get test results](./.github/workflows/Get-TestResults.yml)
@@ -267,13 +267,13 @@ The workflow supports automatic execution of setup and teardown scripts for modu
267267

268268
#### BeforeAll.ps1
269269
- **Location**: Place in your test directories (e.g., `tests/BeforeAll.ps1`)
270-
- **Purpose**: Runs once before all test matrix jobs to prepare the test environment
270+
- **Purpose**: Runs before each test execution to prepare the test environment
271271
- **Use cases**: Deploy test infrastructure, download test data, initialize databases, configure services
272272
- **Environment**: Has access to the same environment variables as your tests (secrets, GitHub token, etc.)
273273

274274
#### AfterAll.ps1
275275
- **Location**: Place in your test directories (e.g., `tests/AfterAll.ps1`)
276-
- **Purpose**: Runs once after all test matrix jobs complete to clean up the test environment
276+
- **Purpose**: Runs after each test execution to clean up the test environment
277277
- **Use cases**: Remove test resources, cleanup databases, stop services, upload artifacts
278278
- **Environment**: Has access to the same environment variables as your tests
279279

0 commit comments

Comments
 (0)