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
@@ -23,11 +23,15 @@ We strongly recommend putting package level annotations at the very top of packa
23
23
|`--%test(<description>)`| Procedure | Denotes that the annotated procedure is a unit test procedure. Optional test description can by provided (see `displayname`). |
24
24
|`--%throws(<exception_number>[,<exception_number>[,...]])`| Procedure | Denotes that the annotated procedure must throw one of the exception numbers provided. If no valid numbers were provided as annotation parameters the annotation is ignored. Applicable to test procedures only. |
25
25
|`--%beforeall`| Procedure | Denotes that the annotated procedure should be executed once before all elements of the suite. |
26
+
|`--%beforeall([[<owner>.]<package>.]<procedure>[,...])`| Package | Denotes that the mentioned procedure(s) should be executed once before all elements of the suite. |
26
27
|`--%afterall`| Procedure | Denotes that the annotated procedure should be executed once after all elements of the suite. |
28
+
|`--%afterall([[<owner>.]<package>.]<procedure>[,...])`| Package | Denotes that the mentioned procedure(s) should be executed once after all elements of the suite. |
27
29
|`--%beforeeach`| Procedure | Denotes that the annotated procedure should be executed before each `%test` procedure in the suite. |
30
+
|`--%beforeeach([[<owner>.]<package>.]<procedure>[,...])`| Package | Denotes that the mentioned procedure(s) should be executed before each `%test` procedure in the suite. |
28
31
|`--%aftereach`| Procedure | Denotes that the annotated procedure should be executed after each `%test` procedure in the suite. |
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. |
32
+
|`--%aftereach([[<owner>.]<package>.]<procedure>[,...])`| Package | Denotes that the mentioned procedure(s) should be executed after each `%test` procedure in the suite. |
33
+
|`--%beforetest([[<owner>.]<package>.]<procedure>[,...])`| Procedure | Denotes that mentioned procedure(s) should be executed before the annotated `%test` procedure. |
34
+
|`--%aftertest([[<owner>.]<package>.]<procedure>[,...])`| Procedure | Denotes that mentioned procedure(s) should be executed after the annotated `%test` procedure. |
31
35
|`--%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
36
|`--%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
37
|`--%context(<name>)`| Package | Denotes start of a named context (sub-suite) in a suite package |
@@ -301,8 +305,35 @@ Finished in .005868 seconds
301
305
302
306
### Beforeall
303
307
308
+
There are two possible ways to use the `--%beforeall` annotation.
309
+
310
+
As a procedure level annotation:
311
+
```sql
312
+
--%suite(Some test suite)
313
+
314
+
--%beforeall
315
+
procedure to_be_executed_before_all;
316
+
317
+
--%test
318
+
procedure some_test;
319
+
```
304
320
Marks annotated procedure to be executed before all test procedures in a suite.
305
321
322
+
As a package level annotation (not associated with any procedure).
@@ -809,29 +929,16 @@ The order of execution for `--%aftertest` procedures is defined by:
809
929
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