Skip to content
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

Description of possible test phases transitions and status, including behavior of timeouts #5995

Closed
clebergnu opened this issue Aug 4, 2024 · 1 comment

Comments

@clebergnu
Copy link
Contributor

Is your feature request related to a problem? Please describe.
During its execution, a test will be in different phases. So far, these are the definitions of the phases within an avocado-instrumented test:

avocado/core/test.py:        self.__phase = "INIT"
...
avocado/core/test.py:                self.__phase = "SETUP"
avocado/core/test.py:                self.__phase = "TEST"
avocado/core/test.py:                self.__phase = "TEARDOWN"
avocado/core/test.py:        self.__phase = "FINISHED"

As it can be seen, there's no central place defining the possible phases, just some aid to the test itself so that it knows where it's currently at.

In preparation for supporting timeouts for individual phases, it's a good idea to understand where the transitions from phases can and how they happen. For instance, what happens if a timeout is hit during the SETUP phase? Will it transition to FINISHED or will it go to TEARDOWN first?

Describe the solution you'd like
There should a reference document showing the possible:

  • Test phases
  • Phase transitions
  • Associated possible statuses for each phase (example, it should be impossible for a test under INIT to have a pass status?)
  • Phases where a timeout is supported

Additional information
This issue is based on the discussions from https://gitlab.com/avocado-framework/dovetail/-/issues/14

@mr-avocado mr-avocado bot moved this to Triage in Default project Aug 4, 2024
@clebergnu clebergnu moved this from Triage to Short Term (Current Q) Backlog in Default project Aug 5, 2024
@richtja richtja self-assigned this Aug 21, 2024
@richtja richtja moved this from Short Term (Current Q) Backlog to In progress in Default project Aug 21, 2024
richtja added a commit to richtja/avocado that referenced this issue Aug 27, 2024
This commit adds a new chapter to the reference guide about avocado
instrumented tests and its lifecycle.

Reference: avocado-framework#5995
Signed-off-by: Jan Richter <[email protected]>
richtja added a commit to richtja/avocado that referenced this issue Aug 28, 2024
This commit adds a new chapter to the reference guide about avocado
instrumented tests and its lifecycle.

Reference: avocado-framework#5995
Signed-off-by: Jan Richter <[email protected]>
richtja added a commit to richtja/avocado that referenced this issue Sep 11, 2024
This commit adds a new chapter to the reference guide about avocado
instrumented tests and its lifecycle.

Reference: avocado-framework#5995
Signed-off-by: Jan Richter <[email protected]>
@richtja
Copy link
Contributor

richtja commented Sep 18, 2024

Resolved in #6012

@richtja richtja closed this as completed Sep 18, 2024
@github-project-automation github-project-automation bot moved this from In progress to Done 108 in Default project Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done 108
Development

No branches or pull requests

2 participants