Skip to content

Commit 6326514

Browse files
committed
Updated help
1 parent 3236087 commit 6326514

File tree

2 files changed

+88
-51
lines changed

2 files changed

+88
-51
lines changed

README.md

Lines changed: 77 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -39,84 +39,80 @@ export LC_ALL=en_US.utf-8
3939
The charset-part of LC_ALL is ignored.
4040

4141
## Usage
42+
Currently, utPLSQL-cli knows the following commands:
43+
- run
44+
- info
4245

43-
`utplsql run <ConnectionURL> [-p=(ut_path|ut_paths)] [-f=format [-o=output_file] [-s] ...]`
44-
46+
### run
47+
`utplsql run <ConnectionURL> [<options>]`
48+
4549
```
4650
<ConnectionURL> - accepted formats:
47-
<user>/<password>@//<host>[:<port>]/<service>
48-
<user>/<password>@<host>:<port>:<SID>
49-
<user>/<password>@<TNSName>
50-
To connect using TNS, you need to have the ORACLE_HOME environment variable set.
51-
The file tnsnames.ora must exist in path %ORACLE_HOME%/network/admin
52-
The file tnsnames.ora must contain valid TNS entries.
51+
<user>/<password>@//<host>[:<port>]/<service>
52+
<user>/<password>@<host>:<port>:<SID>
53+
<user>/<password>@<TNSName>
54+
To connect using TNS, you need to have the ORACLE_HOME environment variable set.
55+
The file tnsnames.ora must exist in path %ORACLE_HOME%/network/admin
56+
The file tnsnames.ora must contain valid TNS entries.
57+
```
58+
59+
#### Options
60+
```
5361
-p=suite_path(s) - A suite path or a comma separated list of suite paths for unit test to be executed.
5462
The path(s) can be in one of the following formats:
5563
schema[.package[.procedure]]
5664
schema:suite[.suite[.suite][...]][.procedure]
5765
Both formats can be mixed in the list.
5866
If only schema is provided, then all suites owner by that schema are executed.
5967
If -p is omitted, the current schema is used.
68+
6069
-f=format - A reporter to be used for reporting.
6170
If no -f option is provided, the default ut_documentation_reporter is used.
62-
Available options:
63-
-f=ut_documentation_reporter
64-
A textual pretty-print of unit test results (usually use for console output)
65-
-f=ut_teamcity_reporter
66-
For reporting live progress of test execution with Teamcity CI.
67-
-f=ut_xunit_reporter
68-
Used for reporting test results with CI servers like Jenkins/Hudson/Teamcity.
69-
-f=ut_coverage_html_reporter
70-
Generates a HTML coverage report with summary and line by line information on code coverage.
71-
Based on open-source simplecov-html coverage reporter for Ruby.
72-
Includes source code in the report.
73-
-f=ut_coveralls_reporter
74-
Generates a JSON coverage report providing information on code coverage with line numbers.
75-
Designed for [Coveralls](https://coveralls.io/).
76-
-f=ut_coverage_sonar_reporter
77-
Generates a JSON coverage report providing information on code coverage with line numbers.
78-
Designed for [SonarQube](https://about.sonarqube.com/) to report coverage.
79-
-f=ut_sonar_test_reporter
80-
Generates a JSON report providing detailed information on test execution.
81-
Designed for [SonarQube](https://about.sonarqube.com/) to report test execution.
82-
83-
-o=output - Defines file name to save the output from the specified reporter.
71+
See reporters list for possible values
72+
-o=output - Defines file name to save the output from the specified reporter.
8473
If defined, the output is not displayed on screen by default. This can be changed with the -s parameter.
8574
If not defined, then output will be displayed on screen, even if the parameter -s is not specified.
8675
If more than one -o parameter is specified for one -f parameter, the last one is taken into consideration.
87-
-s - Forces putting output to to screen for a given -f parameter.
76+
-s - Forces putting output to to screen for a given -f parameter.
77+
8878
-source_path=source - path to project source files, use the following options to enable custom type mappings:
89-
-owner="app"
90-
-regex_expression="pattern"
91-
-type_mapping="matched_string=TYPE[/matched_string=TYPE]*"
92-
-owner_subexpression=subexpression_number
93-
-type_subexpression=subexpression_number
94-
-name_subexpression=subexpression_number
79+
-owner="app"
80+
-regex_expression="pattern"
81+
-type_mapping="matched_string=TYPE[/matched_string=TYPE]*"
82+
-owner_subexpression=subexpression_number
83+
-type_subexpression=subexpression_number
84+
-name_subexpression=subexpression_number
85+
9586
-test_path=test - path to project test files, use the following options to enable custom type mappings:
96-
-owner="app"
97-
-regex_expression="pattern"
98-
-type_mapping="matched_string=TYPE[/matched_string=TYPE]*"
99-
-owner_subexpression=subexpression_number
100-
-type_subexpression=subexpression_number
101-
-name_subexpression=subexpression_number
87+
-owner="app"
88+
-regex_expression="pattern"
89+
-type_mapping="matched_string=TYPE[/matched_string=TYPE]*"
90+
-owner_subexpression=subexpression_number
91+
-type_subexpression=subexpression_number
92+
-name_subexpression=subexpression_number
93+
10294
-c - If specified, enables printing of test results in colors as defined by ANSICONSOLE standards.
10395
Works only on reporeters that support colors (ut_documentation_reporter).
96+
10497
--failure-exit-code - Override the exit code on failure, defaults to 1. You can set it to 0 to always exit with a success status.
98+
10599
-scc - If specified, skips the compatibility-check with the version of the database framework.
106100
If you skip compatibility-check, CLI will expect the most actual framework version
107-
-include=package_list - Comma-separated object list to include in the coverage report.
108-
Format: [schema.]package[,[schema.]package ...].
109-
See coverage reporting options in framework documentation.
110-
-exclude=package_list - Comma-separated object list to exclude from the coverage report.
111-
Format: [schema.]package[,[schema.]package ...].
112-
See coverage reporting options in framework documentation.
101+
102+
-include=pckg_list - Comma-separated object list to include in the coverage report.
103+
Format: [schema.]package[,[schema.]package ...].
104+
See coverage reporting options in framework documentation.
105+
106+
-exclude=pckg_list - Comma-separated object list to exclude from the coverage report.
107+
Format: [schema.]package[,[schema.]package ...].
108+
See coverage reporting options in framework documentation.
113109
```
114110

115111
Parameters -f, -o, -s are correlated. That is parameters -o and -s are controlling outputs for reporter specified by the preceding -f parameter.
116112

117113
Sonar and Coveralls reporter will only provide valid reports, when source_path and/or test_path are provided, and ut_run is executed from your project's root path.
118114

119-
Examples:
115+
#### Examples
120116

121117
```
122118
utplsql run hr/hr@xe -p=hr_test -f=ut_documentation_reporter -o=run.log -s -f=ut_coverage_html_reporter -o=coverage.html -source_path=source
@@ -133,7 +129,37 @@ utplsql run hr/hr@xe
133129

134130
Invokes all unit test suites from schema "hr". Results are displayed to screen using default ut_documentation_reporter.
135131

136-
#### Enabling Color Outputs on Windows
132+
### info
133+
`utplsql info [<ConnectionURL>]`
134+
135+
```
136+
<ConnectionURL> - accepted formats:
137+
<user>/<password>@//<host>[:<port>]/<service>
138+
<user>/<password>@<host>:<port>:<SID>
139+
<user>/<password>@<TNSName>
140+
To connect using TNS, you need to have the ORACLE_HOME environment variable set.
141+
The file tnsnames.ora must exist in path %ORACLE_HOME%/network/admin
142+
The file tnsnames.ora must contain valid TNS entries.
143+
```
144+
145+
#### Examples
146+
147+
```
148+
utplsql info
149+
150+
> cli 3.1.1-SNAPSHOT.local
151+
> utPLSQL-java-api 3.1.1-SNAPSHOT.123
152+
```
153+
```
154+
utplsql info app/app@localhost:1521/ORCLPDB1
155+
156+
> cli 3.1.1-SNAPSHOT.local
157+
> utPLSQL-java-api 3.1.1-SNAPSHOT.123
158+
> utPLSQL 3.1.2.1913
159+
```
160+
161+
162+
## Enabling Color Outputs on Windows
137163

138164
To enable color outputs on Windows cmd you need to install an open-source utility called [ANSICON](http://adoxa.altervista.org/ansicon/).
139165

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package org.utplsql.cli;
2+
3+
import org.junit.jupiter.api.Test;
4+
5+
public class CliHelpTest {
6+
7+
@Test
8+
public void showBasicHelp() {
9+
TestHelper.runApp("help");
10+
}
11+
}

0 commit comments

Comments
 (0)