From 8f8ba37cbb478ae718d7ff6da2229412a774de98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Thu, 5 Sep 2024 14:27:17 +0200 Subject: [PATCH] doc: Documentation for test specifcation generate --- doc/testing.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/doc/testing.md b/doc/testing.md index 55e85c852..1d61499ff 100644 --- a/doc/testing.md +++ b/doc/testing.md @@ -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