-
Notifications
You must be signed in to change notification settings - Fork 8.4k
doc: Add information on Twister Statuses #80625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ Testing | |
|
|
||
| ztest | ||
| twister | ||
| twister_statuses | ||
| twister/twister_blackbox | ||
| pytest | ||
| coverage | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,215 @@ | ||||||||||||||
| .. _twister_statuses: | ||||||||||||||
|
|
||||||||||||||
| Twister Status | ||||||||||||||
| ############## | ||||||||||||||
|
|
||||||||||||||
| What is a Twister Status? | ||||||||||||||
| ========================= | ||||||||||||||
|
|
||||||||||||||
| Twister Status formulates the current state of | ||||||||||||||
|
|
||||||||||||||
| - ``Harness`` | ||||||||||||||
| - ``TestCase`` | ||||||||||||||
| - ``TestSuite`` | ||||||||||||||
| - ``TestInstance`` | ||||||||||||||
|
|
||||||||||||||
| in a comprehensive and easy-to understand way. | ||||||||||||||
| In practice, most users will be interested in Statuses | ||||||||||||||
| of Instances and Cases after the conclusion of their Twister runs. | ||||||||||||||
|
|
||||||||||||||
| .. tip:: | ||||||||||||||
|
|
||||||||||||||
| Nomenclature reminder: | ||||||||||||||
|
|
||||||||||||||
| .. tabs:: | ||||||||||||||
|
|
||||||||||||||
| .. tab:: ``Harness`` | ||||||||||||||
|
|
||||||||||||||
| ``Harness`` is a Python class inside Twister that allows us | ||||||||||||||
| to capture and analyse output from a program external to Twister. | ||||||||||||||
| It has been excised from this page for clarity, | ||||||||||||||
| as it does not appear in final reports. | ||||||||||||||
|
|
||||||||||||||
| .. tab:: ``TestCase`` | ||||||||||||||
|
|
||||||||||||||
| ``TestCase``, also called Case, is a piece of code that aims to verify some assertion. | ||||||||||||||
| It is the smallest subdivision of testing in Zephyr. | ||||||||||||||
|
|
||||||||||||||
| .. tab:: ``TestSuite`` | ||||||||||||||
|
|
||||||||||||||
| ``TestSuite``, also called Suite, is a grouping of Cases. | ||||||||||||||
| One can modify Twister's behaviour on a per-Suite basis via ``testcase.yaml`` files. | ||||||||||||||
| Such grouped Cases should have enough in common | ||||||||||||||
| for it to make sense to treat them all the same by Twister. | ||||||||||||||
|
|
||||||||||||||
| .. tab:: ``TestInstance`` | ||||||||||||||
|
|
||||||||||||||
| ``TestInstance``, also called Instance, is a Suite on some platform. | ||||||||||||||
| Twister typically reports its results for Instances, | ||||||||||||||
| despite them being called "Suites" there. | ||||||||||||||
| If a status is marked as applicable for Suites, it is also applicable for Instances. | ||||||||||||||
| As the distinction between them is not useful in this section, | ||||||||||||||
| whenever you read "Suite", assume the same for Instances. | ||||||||||||||
|
Comment on lines
+47
to
+52
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Twister summary output uses |
||||||||||||||
|
|
||||||||||||||
| More detailed explanation can be found :ref:`here <twister_tests_long_version>`. | ||||||||||||||
|
|
||||||||||||||
| Possible Twister Statuses | ||||||||||||||
| ========================= | ||||||||||||||
|
|
||||||||||||||
| .. list-table:: Twister Statuses | ||||||||||||||
| :widths: 10 10 66 7 7 | ||||||||||||||
| :header-rows: 1 | ||||||||||||||
|
|
||||||||||||||
| * - In-code | ||||||||||||||
| - In-text | ||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| - Description | ||||||||||||||
| - Suite | ||||||||||||||
| - Case | ||||||||||||||
| * - FILTER | ||||||||||||||
| - filtered | ||||||||||||||
| - A static or runtime filter has eliminated the test from the list of tests to use. | ||||||||||||||
| - ✓ | ||||||||||||||
| - ✓ | ||||||||||||||
| * - NOTRUN | ||||||||||||||
| - not run | ||||||||||||||
| - The test wasn't run because it was not runnable in current configuration. | ||||||||||||||
| It was, however, built correctly. | ||||||||||||||
| - ✓ | ||||||||||||||
| - ✓ | ||||||||||||||
| * - BLOCK | ||||||||||||||
| - blocked | ||||||||||||||
| - The test was not run because of an error or crash in the test suite. | ||||||||||||||
| - ✕ | ||||||||||||||
| - ✓ | ||||||||||||||
| * - SKIP | ||||||||||||||
| - skipped | ||||||||||||||
| - Test was skipped by some other reason than previously delineated. | ||||||||||||||
| - ✓ | ||||||||||||||
| - ✓ | ||||||||||||||
| * - ERROR | ||||||||||||||
| - error | ||||||||||||||
| - The test produced an error in running the test itself. | ||||||||||||||
| - ✓ | ||||||||||||||
| - ✓ | ||||||||||||||
| * - FAIL | ||||||||||||||
| - failed | ||||||||||||||
| - The test produced results different than expected. | ||||||||||||||
| - ✓ | ||||||||||||||
| - ✓ | ||||||||||||||
| * - PASS | ||||||||||||||
| - passed | ||||||||||||||
| - The test produced results as expected. | ||||||||||||||
| - ✓ | ||||||||||||||
| - ✓ | ||||||||||||||
|
|
||||||||||||||
| **In-code** and **In-text** are the naming contexts of a given status: | ||||||||||||||
| the former is rather internal for Twister and appears in logs, | ||||||||||||||
| whereas the latter is used in the JSON reports. | ||||||||||||||
|
|
||||||||||||||
| .. note:: | ||||||||||||||
|
|
||||||||||||||
| There are two more Statuses that are internal to Twister. | ||||||||||||||
| ``NONE`` (A starting status for Cases and Suites) and | ||||||||||||||
| ``STARTED`` (Indicating an in-progress Case). | ||||||||||||||
|
||||||||||||||
| ``NONE`` (A starting status for Cases and Suites) and | |
| ``STARTED`` (Indicating an in-progress Case). | |
| - ``NONE`` - an initial status for Cases and Suites, | |
| - ``STARTED`` - Indicating an in-progress Case. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, will have to see how it interacts with the Note box.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't play nicely with the box, had to remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note the proposed changes in the text itself.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it is better to remove this from here to allow more clarification of what 'instance' is from user's perspective later in the 'nomenclature' section below.