-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
You can nest suites inside other suites, 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 suites 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 2Where the expected behaviour is:
+ Setup 0
+ Setup 1
x
- Teardown 1
- Teardown 0
- Setup 0
+ Setup 2
y
- Teardown 2
- Teardown 0Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request