Skip to content

Commit 89953fd

Browse files
author
watney
committed
Add documentation for the test harness
1 parent 6c89788 commit 89953fd

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

README.adoc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,3 +227,28 @@ For other examples see: +
227227
link:models/Blinky/README.adoc[] +
228228
link:models/Device/README.adoc[]
229229
230+
## Test Harness
231+
232+
The test harness provides the capability to test a state machine model by setting guard states and sending events. +
233+
A graphical rendering of the state machine is updated to animate the state machine.
234+
235+
image::TestHarness.png[alt="STARS Interfaces"]
236+
237+
### Example
238+
239+
- `cd testharness`
240+
241+
- `cp ../models/TestModels/complex_junction/Complex_Junction.plantuml .`
242+
243+
- `ipython`
244+
245+
- `%run test_harness.py`
246+
247+
- `set_model("Complex_Junction.plantuml")` +
248+
(Open and view `Complex_Junction.png`)
249+
250+
- `set_guard("g3", "True")`
251+
252+
- `send_event("Ev1")`
253+
254+

TestHarness.drawio

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

TestHarness.png

261 KB
Loading

testharness/Notes

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
To use the test harness:
2+
------------------------
3+
Copy a model
4+
- cp ../models/TestModels/complex_junction/Complex_Junction.plantuml .
5+
6+
- ipython
7+
8+
> %run test_harness.py
9+
10+
> set_model("Complex_Junction.plantuml")
11+
(Open and view Complex_Junction.png)
12+
13+
> set_guard("g3", "True")
14+
15+
> send_event("Ev1")
16+

0 commit comments

Comments
 (0)