Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 837bd47

Browse files
committed
Merge remote-tracking branch 'origin/develop' into feature/nested_context
# Conflicts: # test/ut3_tester/core/test_suite_builder.pkb # test/ut3_tester/core/test_suite_builder.pks
2 parents c5f81eb + d367d52 commit 837bd47

26 files changed

Lines changed: 409 additions & 233 deletions

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ env:
4646
#utPLSQL released version directory
4747
- UTPLSQL_DIR="utPLSQL_latest_release"
4848
- SELFTESTING_BRANCH=${TRAVIS_BRANCH}
49-
- UTPLSQL_CLI_VERSION="3.1.7"
49+
- UTPLSQL_CLI_VERSION="3.1.8"
5050
# Maven
5151
- MAVEN_HOME=/usr/local/maven
5252
- MAVEN_CFG=$HOME/.m2

docs/about/authors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg)
22

33
### utPLSQL v3 Major Contributors
44

docs/about/license.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg)
22

33
# Version Information
44

docs/about/project-details.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg)
22

33
# utPLSQL Project Details
44

docs/about/support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg)
22

33
# How to get support
44

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg)
22

33
# Introduction to utPLSQL
44

docs/userguide/advanced_data_comparison.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg)
22

33
# Advanced data comparison
44

docs/userguide/annotations.md

Lines changed: 47 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg)
22

33
# Annotations
44

@@ -1225,11 +1225,11 @@ Finished in .035261 seconds
12251225

12261226
### Tags
12271227

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.
12291229

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.
12311231

1232-
e.q.
1232+
e.g.
12331233

12341234
```sql
12351235
--%tags(batch,daily,csv)
@@ -1238,29 +1238,31 @@ e.q.
12381238
or
12391239

12401240
```sql
1241-
--%tags(api,online,json)
1241+
--%tags(online,json)
1242+
--%tags(api)
12421243
```
12431244

1245+
Tags are defined as a comma separated list within the `--%tags` annotation.
12441246

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.
12451249

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.
12471251

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.
12511252

1253+
Sample test suite package with tags.
12521254
```sql
1253-
create or replace package ut_sample_test IS
1255+
create or replace package ut_sample_test is
12541256

12551257
--%suite(Sample Test Suite)
1256-
--%tag(suite1)
1258+
--%tags(api)
12571259

12581260
--%test(Compare Ref Cursors)
1259-
--%tag(test1,sample)
1261+
--%tags(complex,fast)
12601262
procedure ut_refcursors1;
12611263

12621264
--%test(Run equality test)
1263-
--%tag(test2,sample)
1265+
--%tags(simple,fast)
12641266
procedure ut_test;
12651267

12661268
end ut_sample_test;
@@ -1287,30 +1289,47 @@ end ut_sample_test;
12871289
/
12881290
```
12891291

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`
12911293

12921294
```sql
1293-
select * from table(ut.run(a_path => 'ut_sample_test',a_tags => 'suite1'));
1294-
select * from table(ut.run(a_tags => 'test1,test2'));
1295-
select * from table(ut.run(a_tags => 'sample'));
1295+
select * from table(ut.run(a_path => 'ut_sample_test',a_tags => 'api'));
1296+
```
1297+
The above call will execute all tests from `ut_sample_test` package as the whole suite is tagged with `api`
12961298

1297-
begin
1298-
ut.run(a_path => 'ut_sample_test',a_tags => 'suite1');
1299-
end;
1300-
/
1299+
```sql
1300+
select * from table(ut.run(a_tags => 'complex'));
1301+
```
1302+
The above call will execute only the `ut_sample_test.ut_refcursors1` test, as only the test `ut_refcursors1` is tagged with `complex`
13011303

1302-
exec ut.run('ut_sample_test', a_tags => 'sample');
1304+
```sql
1305+
select * from table(ut.run(a_tags => 'fast'));
13031306
```
1307+
The above call will execute both `ut_sample_test.ut_refcursors1` and `ut_sample_test.ut_test` tests, as both tests are tagged with `fast`
1308+
1309+
#### Tag naming convention
1310+
1311+
Tags must follow the below naming convention:
1312+
1313+
- tag is case sensitive
1314+
- tag can contain special characters like `$#/\?-!` etc.
1315+
- tag cannot be an empty string
1316+
- tag cannot start with a dash, e.g. `-some-stuff` is **not** a valid tag
1317+
- tag cannot contain spaces, e.g. `test of batch`. To create a multi-word tag use underscores or dashes, e.g. `test_of_batch`, `test-of-batch`
1318+
- leading and trailing spaces are ignored in tag name, e.g. `--%tags( tag1 , tag2 )` becomes `tag1` and `tag2` tag names
13041319

13051320

1321+
#### Excluding tests/suites by tags
13061322

1307-
Tags should adhere to following rules:
1323+
It is possible to exclude parts of test suites with tags.
1324+
In order to do so, prefix the tag name to exclude with a `-` (dash) sign when invoking the test run.
13081325

1309-
- tags are case sensitive
1310-
- tags cannot be an empty string
1311-
- tags cannot contain spaces e.g. to create a multi-word `tag` please use underscores,dashes, dots etc. e.g. `test_of_batch`
1312-
- tags with empty spaces will be ignored during execution
1313-
- tags can contain special characters
1326+
Examples (based on above sample test suite)
1327+
1328+
```sql
1329+
select * from table(ut.run(a_tags => 'api,fast,-complex'));
1330+
```
1331+
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.
13141333

13151334

13161335

docs/userguide/best-practices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg)
22

33
# Best Practices
44

docs/userguide/coverage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg)
22

33
# Coverage
44
utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database.

0 commit comments

Comments
 (0)