Skip to content

Commit 8dcc93a

Browse files
dmarxIOLPatrickRobbIOL
authored andcommitted
doc: add test case docstring example to dts rst
Add a section to the dts rst under How to Write a Test Suite which provides an example for how to write a test case docstring, including a steps and verify section. Signed-off-by: Dean Marx <[email protected]> Reviewed-by: Luca Vizzarro <[email protected]>
1 parent e087292 commit 8dcc93a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

doc/guides/tools/dts.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,22 @@ and performance test cases should use ``@perf_test``.
427427
A test suite may include any number of functional and/or performance test cases.
428428
Each suite should focus on testing a single feature (one feature = one test suite).
429429

430+
Test case docstrings must include a Steps and Verify section. For example:
431+
432+
Example::
433+
434+
@func_test
435+
def test_basic_link(self):
436+
"""Tests basic link status.
437+
438+
Steps:
439+
* Launch testpmd.
440+
* Check port info.
441+
442+
Verify:
443+
* Port info shows link status is up.
444+
"""
445+
430446
Setup and Teardown Hooks
431447
~~~~~~~~~~~~~~~~~~~~~~~~
432448

0 commit comments

Comments
 (0)