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
We welcome new developers to join our community and contribute to the utPLSQL project.
53
-
If you are interested in helping please read our [guide to contributing](docs/about/CONTRIBUTING.md)
54
-
The best place to start is to read the documentation and get familiar with the existing code base.
55
-
A [slack chat](https://utplsql.slack.com/) is the place to go if you want to talk with team members.
56
-
To sign up to the chat use [this link](http://utplsql-slack-invite.herokuapp.com/)
57
-
50
+
# Installation
58
51
59
-
[__Authors__](docs/about/authors.md)
52
+
To install the utPLSQL into a new database schema and grant it to public, execute the script `install_headless.sql`.
53
+
This will create a new user `UT3`, grant all required privileges to that user and create PUBLIC synonyms needed.
60
54
61
-
__Version 2 to Version 3 Comparison__
55
+
For detailed instructions on other install options see the [Install Guide](docs/userguide/install.md)
62
56
63
-
If you have a great feature in mind, that you would like to see in utPLSQL v3 please create an [issue on GitHub](https://github.com/utPLSQL/utPLSQL/issues) or discuss it with us in the [Slack chat rooms](http://utplsql-slack-invite.herokuapp.com/).
| PLSQL Record Assertions | generated code through **utRecEq** Package |[possible on Oracle 12c](https://oracle-base.com/articles/12c/using-the-table-operator-with-locally-defined-types-in-plsql-12cr1) using [cursor matchers](docs/userguide/expectations.md#comparing-cursors)|
87
-
| Test Skeleton Generation | Yes | On Roadmap |
88
-
|**Test Execution<sup>3</sup>**|||
89
-
| Single Test Package Execution | Yes | Yes |
90
-
| Single Test Procedure Execution | No | Yes |
91
-
| Test Suite Execution | Yes | Yes |
92
-
| Subset of Suite Execution | No | Yes |
93
-
| Multiple Suite Execution | No | Yes |
94
-
| Organizing Suites into hierarchies | No | Yes |
95
-
|**Code Coverage Reporting**| No | Yes |
96
-
| Html Coverage Report | No | Yes |
97
-
| Sonar XML Coverage Report | No | Yes |
98
-
| Coveralls Json Coverage Report | No | Yes |
99
-
| Framework Transaction Control | No | Yes - Annotations<sup>1</sup> |
100
-
|**Test Output**|||
101
-
| Real-time test execution progress reporting | No | Yes |
102
-
| Multiple Output Reporters can be used during test execution | No| Yes |
103
-
| DBMS_OUTPUT | Yes | Yes (clean formatting) |
104
-
| File | Yes (to db server only)| Yes (on client side) |
105
-
| Stored in Table | Yes | No (can be added as custom reporter)
To execute using development IDE (TOAD/SQLDeveloper/PLSQLDeveloper/other) use one of following commands.
61
+
```sql
62
+
begin
63
+
ut.run();
64
+
end;
65
+
/
66
+
```
67
+
```sql
68
+
exec ut.run();
69
+
```
70
+
```sql
71
+
select*from table(ut.run());
72
+
```
109
73
110
-
<sup>1</sup> Annotations are specially formatted comments in your package specification. This enables *declarative* test configuration that is coupled with the source code. See Documentation for more details.
74
+
The above commands will run all the suites in the current schema and provide report to dbms_output or as a select statement.
111
75
112
-
<sup>2</sup> **utAssert2** package - Contains 59 Assertions - 2 Not implemented = 57, 28 are duplicated only change on outcome_in parameter 57-28 = 29, **utPipe** package - Contains 1 Assertion 29 + 1 = 30
76
+
# Command lien clients
113
77
114
-
<sup>3</sup> Test execution comparison is in a single call so the results are combined. We know it was always possible to group in any way with multiple calls. But that may not be desired under a CI system where you want a single JUnit XML Output.
78
+
To have more control over how the tests are invoked, use one of the utPLSQL command line clients: [utPLSQL-sql-cli](https://github.com/utPLSQL/utPLSQL-sql-cli) or [utPLSQL-cli](https://github.com/utPLSQL/utPLSQL-cli).
115
79
116
-
# Installation
80
+
To use `utPLSQL-sql-cli` you will need to have SQLPlus installed. `utPLSQL-cli` is Java project, so no additional software is needed.
117
81
118
-
To simply install the utPLSQL into a new database schema and grant it to public, execute the script `install_headless.sql`.
82
+
Amongst many benefits they provide ability to:
83
+
* see the progress of test execution for long-running tests - real-time reporting
84
+
* use many reporting formats simultaneously and save reports to files (publish)
85
+
* map your project source files and test files into database objects
119
86
120
-
This will create a new user `UT3` with password `UT3`, grant all required privileges to that user and create PUBLIC synonyms needed to use the utPLSQL framework.
121
87
122
-
Example invocation of the script from command line:
For detailed instructions on other install options see the [Install Guide](docs/userguide/install.md)
90
+
**For examples of using Continuous Integration Server & SonarCloud with utPLSQL see the [utPLSQL demo project](https://github.com/utPLSQL/utPLSQL-demo-project/).**
129
91
130
-
# Example unit test packages
131
92
132
93
The below test package is a fully-functional Unit Test package for testing a [`betwnstr` function](examples/between_string/betwnstr.sql).
133
94
The package specification is [annotated](docs/userguide/annotations.md) with special comments.
@@ -179,25 +140,7 @@ end;
179
140
/
180
141
```
181
142
182
-
Have a look at the [utPLSQL demo project](https://github.com/utPLSQL/utPLSQL-demo-project/).
183
-
The project is installing few example packages from the [source directory](https://github.com/utPLSQL/utPLSQL-demo-project/tree/develop/source),
184
-
installing the test packages from [test directory](https://github.com/utPLSQL/utPLSQL-demo-project/tree/develop/test)
185
-
and finally executing all the tests using [Travis CI](https://travis-ci.org/utPLSQL/utPLSQL-demo-project).
186
-
The [test results](https://sonarqube.com/component_measures/metric/tests/list?id=utPLSQL%3AutPLSQL-demo-project)
187
-
together with [code coverage](https://sonarqube.com/component_measures/metric/coverage/list?id=utPLSQL%3AutPLSQL-demo-project)
188
-
are published to the [projects Sonar page](https://sonarqube.com/dashboard?id=utPLSQL%3AutPLSQL-demo-project) after every successful build.
189
-
190
-
# Running tests
191
-
192
-
To execute using development IDE (TOAD/SQLDeveloper/PLSQLDeveloper/other) just run the following.
193
-
```sql
194
-
begin
195
-
ut.run();
196
-
end;
197
-
/
198
-
```
199
-
Will run all the suites in the current schema and provide documentation report using dbms_output
200
-
143
+
Outputs from running the above tests
201
144
```
202
145
Between string function
203
146
Returns substring from start position to end position
@@ -209,12 +152,77 @@ Finished in .036027 seconds
209
152
4 tests, 0 failures
210
153
```
211
154
212
-
To execute your tests from command line, you will need a oracle sql client like SQLPlus or [SQLcl](http://www.oracle.com/technetwork/developer-tools/sqlcl/overview/index.html)
213
155
214
-
You may benefit from using the [ut_run](https://github.com/utPLSQL/utPLSQL-sql-cli) script to execute your tests if you want to achieve one of the following:
215
-
* see the progress of test execution for long-running tests
216
-
* have output to screen with one output format (text) and at the same time have output to file in other format (xunit)
156
+
# Contributing to the project
157
+
158
+
We welcome new developers to join our community and contribute to the utPLSQL project.
159
+
If you are interested in helping please read our [guide to contributing](docs/about/CONTRIBUTING.md)
160
+
The best place to start is to read the documentation and get familiar with the existing code base.
161
+
A [slack chat](https://utplsql.slack.com/) is the place to go if you want to talk with team members.
162
+
To sign up to the chat use [this link](http://utplsql-slack-invite.herokuapp.com/)
163
+
164
+
165
+
----------
166
+
[__Authors__](docs/about/authors.md)
167
+
168
+
----------
169
+
__Version 2 to Version 3 Comparison__
170
+
171
+
If you have a great feature in mind, that you would like to see in utPLSQL v3 please create an [issue on GitHub](https://github.com/utPLSQL/utPLSQL/issues) or discuss it with us in the [Slack chat rooms](http://utplsql-slack-invite.herokuapp.com/).
| PLSQL Record Assertions | generated code through **utRecEq** Package |[possible on Oracle 12c](https://oracle-base.com/articles/12c/using-the-table-operator-with-locally-defined-types-in-plsql-12cr1) using [cursor matchers](docs/userguide/expectations.md#comparing-cursors)|
195
+
| Test Skeleton Generation | Yes | No (Let us know if you use this) |
196
+
|**Test Execution<sup>3</sup>**|||
197
+
| Single Test Package Execution | Yes | Yes |
198
+
| Single Test Procedure Execution | No | Yes |
199
+
| Test Suite Execution | Yes | Yes |
200
+
| Subset of Suite Execution | No | Yes |
201
+
| Multiple Suite Execution | No | Yes |
202
+
| Organizing Suites into hierarchies | No | Yes |
203
+
|**Code Coverage Reporting**| No | Yes |
204
+
| Html Coverage Report | No | Yes |
205
+
| Sonar XML Coverage Report | No | Yes |
206
+
| Coveralls Json Coverage Report | No | Yes |
207
+
| Framework Transaction Control | No | Yes - Annotations<sup>1</sup> |
208
+
|**Test Output**|||
209
+
| Real-time test execution progress reporting | No | Yes |
210
+
| Multiple Output Reporters can be used during test execution | No| Yes |
211
+
| DBMS_OUTPUT | Yes | Yes (clean formatting) |
212
+
| File | Yes (to db server only)| Yes (on client side) |
213
+
| Stored in Table | Yes | No (can be added as custom reporter) |
<sup>1</sup> Annotations are specially formatted comments in your package specification. This enables *declarative* test configuration that is coupled with the source code. See Documentation for more details.
219
+
220
+
<sup>2</sup> **utAssert2** package - Contains 59 Assertions - 2 Not implemented = 57, 28 are duplicated only change on outcome_in parameter 57-28 = 29, **utPipe** package - Contains 1 Assertion 29 + 1 = 30
221
+
222
+
<sup>3</sup> Test execution comparison is in a single call so the results are combined. We know it was always possible to group in any way with multiple calls. But that may not be desired under a CI system where you want a single JUnit XML Output.
223
+
224
+
225
+
----------
218
226
__Project Directories__
219
227
220
228
* .travis - contains files needed for travis-ci integration
0 commit comments