You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-2
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
# Wokwi Part Tests
2
2
3
-
This repository contains a set of test projects for many Wokwi parts. The tests can be compiled
4
-
using platformio and then run using the Wokwi CLI.
3
+
This repository contains a set of test projects for many Wokwi parts. The tests can be compiled using platformio and then run using the [Wokwi CLI](https://docs.wokwi.com/wokwi-ci/cli-installation).
5
4
6
5
## List of Tests
7
6
@@ -20,3 +19,48 @@ using platformio and then run using the Wokwi CLI.
To build the test projects and run the tests, you need to install [PlatformIO Core](https://platformio.org/install/cli) and the [Wokwi CLI](https://docs.wokwi.com/wokwi-ci/cli-installation), get a [Wokwi CI token](https://wokwi.com/dashboard/ci) and set the `WOKWI_CLI_TOKEN` environment variable with the token.
25
+
26
+
Then use `pio run` to compile the project and `wokwi-cli . --scenario <scenario_file_name>.yaml` to run the tests. You can also use [Wokwi for VS Code](https://docs.wokwi.com/vscode/getting-started) to interactively simulate the test projects.
27
+
28
+
For example, to compile and run the tests for the `wokwi-dht22` part on the ESP32, you can use the following commands:
29
+
30
+
```
31
+
cd wokwi-dht22/dht22-esp32
32
+
pio run
33
+
wokwi-cli . --scenario dht22.test.yaml
34
+
```
35
+
36
+
The output of the test should look as follows this:
37
+
38
+
```
39
+
Wokwi CLI v0.16.0 (ff220a404971)
40
+
Connected to Wokwi Simulation API 1.0.0-0000000-g00000000
0 commit comments