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
+46-27
Original file line number
Diff line number
Diff line change
@@ -1225,11 +1225,11 @@ Finished in .035261 seconds
1225
1225
1226
1226
### Tags
1227
1227
1228
-
Tag is a label attached to the test or a suite path. It is used for identification and execution a group of tests / suites that share same tag.
1228
+
Tag is a label attached to the test or a suite. It is used for identification and execution of a group of tests / suites that share the same tag.
1229
1229
1230
-
It allows us to group a tests / suites using a various categorization and place a test / suite in multiple buckets. Same tests can be group with other tests based on the functionality , frequency, type of output etc.
1230
+
It allows for grouping of tests / suites using various categorization and place tests / suites in multiple buckets. Same tests can be grouped with other tests based on the functionality , frequency, type of output etc.
1231
1231
1232
-
e.q.
1232
+
e.g.
1233
1233
1234
1234
```sql
1235
1235
--%tags(batch,daily,csv)
@@ -1238,29 +1238,31 @@ e.q.
1238
1238
or
1239
1239
1240
1240
```sql
1241
-
--%tags(api,online,json)
1241
+
--%tags(online,json)
1242
+
--%tags(api)
1242
1243
```
1243
1244
1245
+
Tags are defined as a comma separated list within the `--%tags` annotation.
1244
1246
1247
+
When executing a test run with tag filter applied, the framework will find all tests associated with the given tags and execute them.
1248
+
The framework applies `OR` logic to all specified tags so any test / suite that matches at least one tag will be included in the test run.
1245
1249
1246
-
Tags are defined as a coma separated list. When executing a test run with tag filter applied, framework will find all tests associated with given tags and execute them. Framework applies `OR` logic when resolving a tags so any tests / suites that match at least one tag will be included in the test run.
1250
+
When a suite/context is tagged, all of its children will automatically inherit the tag and get executed along with the parent. Parent suite tests are not executed, but a suitepath hierarchy is kept.
1247
1251
1248
-
When a suite gets tagged all of its children will automatically inherit a tag and get executed along the parent. Parent suit tests are not executed. but a suitepath hierarchy is kept.
1249
-
1250
-
Sample tag package.
1251
1252
1253
+
Sample test suite package with tags.
1252
1254
```sql
1253
-
create or replace package ut_sample_test IS
1255
+
create or replace package ut_sample_test is
1254
1256
1255
1257
--%suite(Sample Test Suite)
1256
-
--%tag(suite1)
1258
+
--%tags(api)
1257
1259
1258
1260
--%test(Compare Ref Cursors)
1259
-
--%tag(test1,sample)
1261
+
--%tags(complex,fast)
1260
1262
procedure ut_refcursors1;
1261
1263
1262
1264
--%test(Run equality test)
1263
-
--%tag(test2,sample)
1265
+
--%tags(simple,fast)
1264
1266
procedure ut_test;
1265
1267
1266
1268
end ut_sample_test;
@@ -1287,30 +1289,47 @@ end ut_sample_test;
1287
1289
/
1288
1290
```
1289
1291
1290
-
Execution of the test is done by using a parameter `a_tags`
1292
+
Execution of the test is done by using the parameter `a_tags`
The above call will execute all suites/contexts/tests that are marked with any of tags `api` or `fast` except those suites/contexts/tests that are marked as `complex`.
1332
+
Given the above example package `ut_sample_test`, only `ut_sample_test.ut_test` will be executed.
In addition to the path, you can filter the tests to be run by specifying tags. Tags are defined in the test with the `--%tags`-annotation ([Read more](annotations.md#tags)).
288
-
Multiple tags are separated by comma. If multiple tags are set, all tests with __any__ of them specified are run.
287
+
In addition to the path, you can filter the tests to be run by specifying tags. Tags are defined in the test / context / suite with the `--%tags`-annotation ([Read more](annotations.md#tags)).
288
+
Multiple tags are separated by comma.
289
+
The framework applies `OR` logic to all specified tags so any test / suite that matches at least one tag will be included in the test run.
0 commit comments