Skip to content

Commit 43f4717

Browse files
committed
More Demo Stuff
1 parent 1556177 commit 43f4717

10 files changed

Lines changed: 357 additions & 72 deletions

File tree

docs/Reference.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,26 @@ An obvious drawback of this approach is running assertions when NLS settings mus
3535
* ORA-20009 - WT_RESULT Package: "in_test_run_id" cannot be NULL
3636
* ORA-20010 - WT_TEST_RUN_STAT Package: Unknown Result status
3737
* ORA-20011 - WT_TEST_RUN_STAT Package: Unknown Profile status
38+
39+
## WT_TEXT_REPORT Detail Levels
40+
* **Less than 10 (including null)** - No Detail
41+
* Assertion results summary.
42+
* Profiled lines summary.
43+
* **10 to 19** - Minimal Detail
44+
* Assertion results summary.
45+
* Profiled lines summary.
46+
* Failed assertion result details.
47+
* Profiled source lines that were "not executed".
48+
* **20 to 29** - Partial Full Detail
49+
* Assertion results summary.
50+
* Profiled lines summary.
51+
* All assertion result details.
52+
* Profiled source lines that were "not executed".
53+
* **30 or more** - Full Detail
54+
* Assertion results summary.
55+
* Profiled lines summary.
56+
* All assertion result details.
57+
* All profiled source lines.
58+
3859
---
3960
[Website Home Page](README.md)

docs/demo/Package-Test.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
[Demos and Examples](README.md)
12

23
# Test a PL/SQL Package
34

5+
---
6+
47
The majority of wtPLSQL testing is testing packages. In order to demonstrate wtPLSQL compatibility, this is an example from [utPLSQL V2.3.1 documentation]().
8+
9+
---
10+
[Demos and Examples](README.md)

docs/demo/README.md

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,19 @@
1-
# Demonstrations and Examples
2-
---
3-
Demonstrations and examples assume successful connection to an [Oracle database](http://www.oracle.com/technetwork/database/database-technologies/express-edition/overview/index.html) with wtPLSQL installed. [wtPLSQL Installation instructions](https://github.com/DDieterich/wtPLSQL/releases) are available on the [wtPLSQL Releases page](https://github.com/DDieterich/wtPLSQL/releases).
1+
[Website Home Page](../README.md)
42

5-
## Simple Stuff
3+
# Demonstrations and Examples
64

7-
The simplest check for a wtPLSQL installation is to select the "version from dual".
5+
---
86

9-
Run this:
10-
```
11-
select wtplsql.show_version from dual;
12-
```
13-
and get this:
14-
```
15-
SHOW_VERSION
16-
------------
17-
1.1.0
18-
```
7+
Demonstrations and examples assume successful connection to an [Oracle database](http://www.oracle.com/technetwork/database/database-technologies/express-edition/overview/index.html) with wtPLSQL installed. [wtPLSQL Installation instructions](https://github.com/DDieterich/wtPLSQL/releases) are available on the [wtPLSQL Releases page](https://github.com/DDieterich/wtPLSQL/releases).
198

20-
Another simple test is an ad-hoc assertion. This test requires DBMS_OUTPUT. The results of this test are not recorded.
9+
Test results from assertions can be queried from a set of wtPLSQL tables. The examples here will use the default reporting package called WT_TEXT_REPORT. This package displays test results using DBMS_OUTPUT.
2110

22-
Run this:
23-
```
24-
set serveroutput on size unlimited format word_wrapped
2511

26-
begin
27-
wt_assert.eq(msg_in => 'Ad-Hoc Test'
28-
,check_this_in => 1
29-
,against_this_in => '1');
30-
end;
31-
/
32-
```
33-
And get this:
34-
```
35-
PASS Ad-Hoc Test. EQ - Expected "1" and got "1"
36-
```
12+
## The Basics
3713

38-
Note: This ad-hoc test also demonstrates implicit data type conversion.
14+
The [Simple Stuff](Simple-Stuff.md) page is a confidence builder, excellent for first time users of wtPLSQL.
3915

40-
The majority of wtPLSQL testing uses a Test Runner. A Test Runner is a PL/SQL package written by the tester. [This page](Test-Runner.md) has an example of a very simple [Test Runner](Test-Runner.md). All the examples below will use Test Runners.
16+
The [Test Runner](Test-Runner.md) page covers all the basics of creating a Test Runner. wtPLSQL is all about creating and running Test Runners.
4117

4218
## Database Object Tests
4319
More interesting examples actually test database objects. Here is an example test of each database object supported by wtPLSQL.
@@ -56,3 +32,6 @@ More interesting examples actually test database objects. Here is an example tes
5632
* [Create and Run a Test Suite](Test-Suite.md) - Build a Test Suite package. (Not Ready)
5733
* [ut_betwnstr](ut_betwnstr.md) (Not Ready)
5834
* [Version](Version.md) (Not Ready)
35+
36+
---
37+
[Website Home Page](../README.md)

docs/demo/Simple-Stuff.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
[Website Home Page](README.md)
2+
3+
# Simple Stuff
4+
5+
---
6+
7+
A login, or database session, is required to interact with the Oracle database. The SQL below will create a user that can run these examples. If you already have a database login, this is not necessary.
8+
9+
```
10+
create user wtp_demo identified by wtp_demo
11+
default tablespace users
12+
quota unlimited on users
13+
temporary tablespace temp;
14+
15+
grant create session to wtp_demo;
16+
grant create type to wtp_demo;
17+
grant create sequence to wtp_demo;
18+
grant create table to wtp_demo;
19+
grant create trigger to wtp_demo;
20+
grant create view to wtp_demo;
21+
grant create procedure to wtp_demo;
22+
```
23+
24+
The simplest check for a wtPLSQL installation is to select the "version from dual".
25+
26+
Run this:
27+
```
28+
select wtplsql.show_version from dual;
29+
```
30+
and get this:
31+
```
32+
SHOW_VERSION
33+
------------
34+
1.1.0
35+
```
36+
37+
Another simple test is an ad-hoc assertion. This test requires DBMS_OUTPUT. The results of this test are not recorded.
38+
39+
Run this:
40+
```
41+
set serveroutput on size unlimited format word_wrapped
42+
43+
begin
44+
wt_assert.eq(msg_in => 'Ad-Hoc Test'
45+
,check_this_in => 1
46+
,against_this_in => '1');
47+
end;
48+
/
49+
```
50+
And get this:
51+
```
52+
PASS Ad-Hoc Test. EQ - Expected "1" and got "1"
53+
```
54+
55+
Note: This ad-hoc test also demonstrates implicit data type conversion.
56+
57+
---
58+
[Website Home Page](README.md)

0 commit comments

Comments
 (0)