Skip to content

Commit 28ec59c

Browse files
R11BRT-1992 add information about how to execute the tests locally (#158)
1 parent 0bb4821 commit 28ec59c

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

test/unit/Readme.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Requirements
2+
3+
Validate if you have `Pester` version 4.10.1 at least to run the tests
4+
5+
```
6+
Get-Module Pester -ListAvailable
7+
```
8+
9+
By default `Powershell` comes with 3.4.0 but we need at least 4.10.1 for some of our tests otherwise they will fail.
10+
11+
12+
```
13+
Install-Module Pester -RequiredVersion 4.10.1
14+
```
15+
16+
------
17+
18+
# How to run tests
19+
20+
To execute tests, we need to use `Invoke-Pester` with the test file and the `-PassThru` option.
21+
22+
For example:
23+
24+
```
25+
Invoke-Pester .\Install-OSServer.Tests.ps1 -PassThru
26+
```
27+
28+
# Cleanup
29+
30+
You can remove the `Pester` module from the `PowerShell` by executing the following command:
31+
32+
33+
```
34+
Uninstall-Module Pester -AllVersions
35+
```
36+
37+
You may need to close the `PowerShell` that was executing the tests.
38+
39+
Note: This will leave 3.4.0 which is the default by `PowerShell`

0 commit comments

Comments
 (0)