Skip to content

Commit

Permalink
doc: Documentation for test specifcation generate
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiaswal committed Sep 5, 2024
1 parent fe1ae8c commit 8f8ba37
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions doc/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,35 @@ or, when running interactively:
$ make test-sh
09:08:17 infamy0:test # ./9pm/9pm.py -o"--transport=restconf" case/ietf_system/hostname.py

### Test specification

The test specification is automaticly generated from the test cases,
this put some constaints on the test cases:

All test cases must be written so that it can be understandable with
only the steps so the result can be reproduced
manually. For example: Intead of `set ip address on
the interface` it should be more human readable, for example:

```
test.step("Set IPv4 address on the interface dut:cross")
test.step("Verify the IP address is set on dut:cross")
```
where dut, cross and the IPv4 address could be found inside the
logical topology for the test.

Each test case must begin with the test name followed by a empty line and
the description of the test. For example:
```
Set hostname
Verify that it it possible to change hostname
```

The test specifaction can be genererated with:

$ make test-spec

[9PM]: https://github.com/rical/9pm
[Qeneth]: https://github.com/wkz/qeneth

0 comments on commit 8f8ba37

Please sign in to comment.