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
export ORACLE_PWD=oracle # Adjust your local SYS password
85
87
```
86
88
87
-
**Download utPLSQL release sources and utplsq-cli**
89
+
### Download utPLSQL release sources and utplsq-cli
88
90
89
-
_The below script is fetching latest release version from utPLSQL repository. Latest release version is used for self-testing._
91
+
The below script is fetching latest release version from utPLSQL repository. Latest release version is used for self-testing.
90
92
```bash
91
93
development/refresh_sources.sh
92
94
```
93
95
94
-
**Setup local database for utPLSQL development**
96
+
### Setup local database for utPLSQL development
97
+
95
98
```bash
96
99
development/install.sh
97
100
```
98
101
99
-
That's it! You now have the following:
102
+
### That's it
103
+
104
+
You now have the following:
100
105
- sources from `develop` branch of your fork of utPLSQL repository in `utPLSQL/ut3_latest_release` directory
101
106
- sources from `master` branch of utPLSQL/utPLSQL repository in `utPLSQL/ut3_latest_release` directory
102
107
- binaries of `utplsql-cli` in `utPLSQL/utPLSQL-cli` directory
@@ -106,27 +111,60 @@ That's it! You now have the following:
106
111
107
112
At any time, if you need to refresh your database, the below scripts might be helpful.
108
113
109
-
### Cleanup of utPLSQL installation in local database
114
+
## Running unit tests
115
+
116
+
Currently we use two forms of unit tests in our CI build:
117
+
- sql scripts as unit tests in the `old_tests` directory
118
+
- utPLSQL v3 unit tests in the `test` directory
119
+
120
+
Before you push any changes and create a pull request to the utPLSQL project repository, make sure that all of the tests are executing successfully in your local environment.
121
+
122
+
Every new functionality needs to be documented by unit tests that cover both happy-path scenarios as well as edge-cases and exception paths.
123
+
124
+
> **Important notice:**
125
+
> We do our best to keep utPLSQL covered with unit tests.
126
+
> Lack of sufficient unit testing is a perfect reason for PR to be rejected.
127
+
128
+
To suite of legacy unit tests execute:
129
+
```bash
130
+
development/env.sh
131
+
old_tests/runAll.sh
132
+
```
133
+
To run a full suite of unit tests execute:
134
+
```bash
135
+
development/env.sh
136
+
test/install_and_run_tests.sh
137
+
```
138
+
139
+
You can review the results of tests as well as see information about code coverage in `./old_tests/coverage.html, ./coverage.html` files.
140
+
141
+
142
+
## Cleanup of utPLSQL installation in local database
143
+
110
144
```bash
111
145
development/cleanup.sh
112
146
```
113
147
114
-
### Reinstalling utPLSQL development in `ut3` schema
148
+
## Reinstalling utPLSQL development in `ut3` schema
149
+
115
150
```bash
116
151
development/refresh_ut3.sh
117
152
```
118
153
119
-
Whenever a new version of utPLSQL or a new version of utPLSQL-cli is available, use `development/refresh_sources.sh` to refresh files in your local project folders.
154
+
## Refreshing after release
155
+
156
+
Whenever a new version of utPLSQL or a new version of utPLSQL-cli is available, use `development/refresh_sources.sh` to refresh files in your local project folders.
157
+
120
158
121
-
## Modules ##
159
+
## Modules
122
160
123
161
Below diagram gives a high-level overview of utPLSQL v3 modules and their dependencies.
124
162
Dependencies to `ut_util` are not shown as most of modules are depending on it.
We are using private docker images to test utPLSQL for our Travis CI builds. The following versions of Oracle Database are being used.
132
170
@@ -143,7 +181,7 @@ The build steps are simple if you already have some experience using Docker. You
143
181
144
182
> If you are new to Docker, you can start by reading the [Getting Started With Docker](https://docs.docker.com/engine/getstarted/) docs.
145
183
146
-
### Docker Build Notes ###
184
+
### Docker Build Notes
147
185
148
186
* You need to comment out the VOLUME line. This step is required, because volumes are not saved when using `docker commit` command.
149
187
* When the build process is complete, you will run the container to install the database. Once everything is set up and you see the message "DATABASE IS READY!", you may change the password and stop the running container. After the container is stopped, you can safely commit the container.
@@ -158,7 +196,7 @@ Variable | Description
158
196
---------|------------
159
197
**DOCKER_USER**<br />**DOCKER_PASSWORD** | _Your Docker Hub website credentials. They will be used to pull the private database images._
160
198
161
-
### SQLCL ###
199
+
### SQLCL
162
200
163
201
Our build configuration uses SQLCL to run the scripts, and you need to configure a few additional secure environment variables. After the first build, the downloaded file will be cached.
164
202
@@ -167,7 +205,7 @@ Variable | Description
167
205
**ORACLE_OTN_USER<br />ORACLE_OTN_PASSWORD** | _Your Oracle website credentials. They will be used to download SQLCL._
168
206
169
207
170
-
## New to GIT ##
208
+
## New to GIT
171
209
172
210
If you are new to GIT here are some links to help you with understanding how it works.
0 commit comments