File tree Expand file tree Collapse file tree 4 files changed +42
-0
lines changed
Expand file tree Collapse file tree 4 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -227,3 +227,28 @@ For other examples see: +
227227link:models/Blinky/README.adoc[] +
228228link: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+
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 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+
You can’t perform that action at this time.
0 commit comments