avocado-framework / avocado

Avocado is a set of tools and libraries to help with automated testing. One can call it a test framework with benefits. Native tests are written in Python and they follow the unittest pattern, but any executable can serve as a test.
https://avocado-framework.github.io/
Other
345 stars 343 forks source link

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

Closed clebergnu closed 2 months ago

clebergnu commented 3 months ago

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:

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

richtja commented 2 months ago

Resolved in #6012