Open
Description
Problem
You can nest suite
s inside other suite
s, yet the setup
and teardown
operations don't behave intuitively. The reason is outer setup
-teardowns
don't get called when running inner suites.
Suggested solution
Nesting suite
s should make the outer setup
and teardown
be called when running tests belonging to inner suites, also wrapping the inner setup-teardowns.
Example
The following sample test:
suite "Suite 0":
setup:
echo "+ Setup 0"
teardown:
echo "- Teardown 0"
suite "Suite 1":
setup:
echo "+ Setup 1"
teardown:
echo "- Teardown 1"
test "x":
echo "x"
suite "Suite 2":
setup:
echo "+ Setup 2"
teardown:
echo "- Teardown 2"
test "y":
echo "y"
Would currently print the following:
+ Setup 1
x
- Teardown 1
+ Setup 2
y
- Teardown 2
Where the expected behaviour is:
+ Setup 0
+ Setup 1
x
- Teardown 1
- Teardown 0
- Setup 0
+ Setup 2
y
- Teardown 2
- Teardown 0
Metadata
Metadata
Assignees
Labels
No labels