You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/userguide/annotations.md
+50-14Lines changed: 50 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,8 @@ We strongly recommend putting package level annotations at the very top of packa
26
26
|`--%afterall`| Procedure | Denotes that the annotated procedure should be executed once after all elements of the suite. |
27
27
|`--%beforeeach`| Procedure | Denotes that the annotated procedure should be executed before each `%test` procedure in the suite. |
28
28
|`--%aftereach`| Procedure | Denotes that the annotated procedure should be executed after each `%test` procedure in the suite. |
29
-
|`--%beforetest(<procedure_name>)`| Procedure | Denotes that mentioned procedure should be executed before the annotated `%test` procedure. |
30
-
|`--%aftertest(<procedure_name>)`| Procedure | Denotes that mentioned procedure should be executed after the annotated `%test` procedure. |
29
+
|`--%beforetest(<[owner.[package.]]procedure_name>[,...])`| Procedure | Denotes that mentioned procedure(s) should be executed before the annotated `%test` procedure. |
30
+
|`--%aftertest(<[owner.[package.]]procedure_name>[,...]>)`| Procedure | Denotes that mentioned procedure(s) should be executed after the annotated `%test` procedure. |
31
31
|`--%rollback(<type>)`| Package/procedure | Defines transaction control. Supported values: `auto`(default) - a savepoint is created before invocation of each "before block" is and a rollback to specific savepoint is issued after each "after" block; `manual` - rollback is never issued automatically. Property can be overridden for child element (test in suite) |
32
32
|`--%disabled`| Package/procedure | Used to disable a suite or a test. Disabled suites/tests do not get executed, they are however marked and reported as disabled in a test run. |
33
33
|`--%context(<name>)`| Package | Denotes start of a named context (sub-suite) in a suite package |
@@ -685,12 +685,15 @@ Finished in .018115 seconds
685
685
686
686
### Beforetest
687
687
688
-
Indicates a specific setup to be executed for a test.
689
-
Used alongside `--%test` annotation. Indicates procedure name to be executed before specific test.
688
+
Indicates specific setup procedure(s) to be executed for a test. The procedure(s) can be located either:
689
+
- within current package (package name is optional)
690
+
- within another package
691
+
692
+
The annotation need to be placed alongside `--%test` annotation.
690
693
691
694
The `--%beforetest` procedures are executed after invoking all `--%beforeeach` for a test.
692
695
693
-
If a test is marked as disabled the `--%beforetest`procedure is not invoked for that test.
696
+
If a test is marked as disabled the `--%beforetest`procedures are not invoked for that test.
694
697
695
698
If `--%beforetest` raises an unhandled exception the following will happen:
696
699
- the following `--%beforetest` for that test **will not be executed**
@@ -701,16 +704,31 @@ If `--%beforetest` raises an unhandled exception the following will happen:
701
704
702
705
When multiple `--%beforetest` procedures are defined for a test, all of them will be executed before invoking the test.
703
706
704
-
For multiple `--%beforetest` procedures order of execution is defined by annotation position in the package specification.
707
+
The order of execution for `--%beforetest` procedures is defined by:
708
+
- position of procedure on the list within single annotation
709
+
- annotation position
705
710
706
711
As a rule, the `--%beforetest` execution gets aborted if preceding `--%beforeeach` or `--%beforetest` failed.
Indicates a specific cleanup to be executed for a test.
771
-
Used alongside `--%test` annotation. Indicates procedure name to be executed after specific test.
772
-
773
-
The `--%aftertest` procedures are executed before invoking any `--%aftereach` for a test.
789
+
Indicates specific cleanup procedure(s) to be executed for a test. The procedure(s) can be located either:
790
+
- within current package (package name is optional)
791
+
- within another package
792
+
793
+
The annotation need to be placed alongside `--%test` annotation.
774
794
775
-
If a test is marked as disabled the `--%aftertest`procedure is not invoked for that test.
795
+
If a test is marked as disabled the `--%aftertest`procedures are not invoked for that test.
776
796
777
797
If `--%aftertest` raises an unhandled exception the following will happen:
778
798
- the test will be marked as errored and exception stack trace will be captured and reported
@@ -782,16 +802,31 @@ If `--%aftertest` raises an unhandled exception the following will happen:
782
802
783
803
When multiple `--%aftertest` procedures are defined for a test, all of them will be executed before invoking the test.
784
804
785
-
For multiple `--%aftertest` procedures order of execution is defined by annotation position in the package specification.
805
+
The order of execution for `--%aftertest` procedures is defined by:
806
+
- position of procedure on the list within single annotation
807
+
- annotation position
786
808
787
809
As a rule, the `--%aftertest` gets executed even if the associated `--%beforeeach`, `--%beforetest`, `--%test` or other `--%aftertest` procedures have raised unhandled exceptions.
0 commit comments