-
Notifications
You must be signed in to change notification settings - Fork 16
Version info and info command in cli #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
fbbef6d
2772add
457625d
3236087
6326514
feff4a3
52d4368
808a2d6
554c71b
93c8e5d
d402718
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,84 +39,80 @@ export LC_ALL=en_US.utf-8 | |
| The charset-part of LC_ALL is ignored. | ||
|
|
||
| ## Usage | ||
| Currently, utPLSQL-cli knows the following commands: | ||
| - run | ||
| - info | ||
|
|
||
| `utplsql run <ConnectionURL> [-p=(ut_path|ut_paths)] [-f=format [-o=output_file] [-s] ...]` | ||
|
|
||
| ### run | ||
| `utplsql run <ConnectionURL> [<options>]` | ||
|
|
||
| ``` | ||
| <ConnectionURL> - accepted formats: | ||
| <user>/<password>@//<host>[:<port>]/<service> | ||
| <user>/<password>@<host>:<port>:<SID> | ||
| <user>/<password>@<TNSName> | ||
| To connect using TNS, you need to have the ORACLE_HOME environment variable set. | ||
| The file tnsnames.ora must exist in path %ORACLE_HOME%/network/admin | ||
| The file tnsnames.ora must contain valid TNS entries. | ||
| <user>/<password>@//<host>[:<port>]/<service> | ||
| <user>/<password>@<host>:<port>:<SID> | ||
| <user>/<password>@<TNSName> | ||
| To connect using TNS, you need to have the ORACLE_HOME environment variable set. | ||
| The file tnsnames.ora must exist in path %ORACLE_HOME%/network/admin | ||
| The file tnsnames.ora must contain valid TNS entries. | ||
| ``` | ||
|
|
||
| #### Options | ||
| ``` | ||
| -p=suite_path(s) - A suite path or a comma separated list of suite paths for unit test to be executed. | ||
| The path(s) can be in one of the following formats: | ||
| schema[.package[.procedure]] | ||
| schema:suite[.suite[.suite][...]][.procedure] | ||
| Both formats can be mixed in the list. | ||
| If only schema is provided, then all suites owner by that schema are executed. | ||
| If -p is omitted, the current schema is used. | ||
|
|
||
| -f=format - A reporter to be used for reporting. | ||
| If no -f option is provided, the default ut_documentation_reporter is used. | ||
| Available options: | ||
| -f=ut_documentation_reporter | ||
| A textual pretty-print of unit test results (usually use for console output) | ||
| -f=ut_teamcity_reporter | ||
| For reporting live progress of test execution with Teamcity CI. | ||
| -f=ut_xunit_reporter | ||
| Used for reporting test results with CI servers like Jenkins/Hudson/Teamcity. | ||
| -f=ut_coverage_html_reporter | ||
| Generates a HTML coverage report with summary and line by line information on code coverage. | ||
| Based on open-source simplecov-html coverage reporter for Ruby. | ||
| Includes source code in the report. | ||
| -f=ut_coveralls_reporter | ||
| Generates a JSON coverage report providing information on code coverage with line numbers. | ||
| Designed for [Coveralls](https://coveralls.io/). | ||
| -f=ut_coverage_sonar_reporter | ||
| Generates a JSON coverage report providing information on code coverage with line numbers. | ||
| Designed for [SonarQube](https://about.sonarqube.com/) to report coverage. | ||
| -f=ut_sonar_test_reporter | ||
| Generates a JSON report providing detailed information on test execution. | ||
| Designed for [SonarQube](https://about.sonarqube.com/) to report test execution. | ||
|
|
||
| -o=output - Defines file name to save the output from the specified reporter. | ||
| See reporters list for possible values | ||
| -o=output - Defines file name to save the output from the specified reporter. | ||
| If defined, the output is not displayed on screen by default. This can be changed with the -s parameter. | ||
| If not defined, then output will be displayed on screen, even if the parameter -s is not specified. | ||
| If more than one -o parameter is specified for one -f parameter, the last one is taken into consideration. | ||
| -s - Forces putting output to to screen for a given -f parameter. | ||
| -s - Forces putting output to to screen for a given -f parameter. | ||
|
|
||
| -source_path=source - path to project source files, use the following options to enable custom type mappings: | ||
| -owner="app" | ||
| -regex_expression="pattern" | ||
| -type_mapping="matched_string=TYPE[/matched_string=TYPE]*" | ||
| -owner_subexpression=subexpression_number | ||
| -type_subexpression=subexpression_number | ||
| -name_subexpression=subexpression_number | ||
| -owner="app" | ||
| -regex_expression="pattern" | ||
| -type_mapping="matched_string=TYPE[/matched_string=TYPE]*" | ||
| -owner_subexpression=subexpression_number | ||
| -type_subexpression=subexpression_number | ||
| -name_subexpression=subexpression_number | ||
|
|
||
| -test_path=test - path to project test files, use the following options to enable custom type mappings: | ||
| -owner="app" | ||
| -regex_expression="pattern" | ||
| -type_mapping="matched_string=TYPE[/matched_string=TYPE]*" | ||
| -owner_subexpression=subexpression_number | ||
| -type_subexpression=subexpression_number | ||
| -name_subexpression=subexpression_number | ||
| -owner="app" | ||
| -regex_expression="pattern" | ||
| -type_mapping="matched_string=TYPE[/matched_string=TYPE]*" | ||
| -owner_subexpression=subexpression_number | ||
| -type_subexpression=subexpression_number | ||
| -name_subexpression=subexpression_number | ||
|
|
||
| -c - If specified, enables printing of test results in colors as defined by ANSICONSOLE standards. | ||
| Works only on reporeters that support colors (ut_documentation_reporter). | ||
|
|
||
| --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. | ||
|
|
||
| -scc - If specified, skips the compatibility-check with the version of the database framework. | ||
| If you skip compatibility-check, CLI will expect the most actual framework version | ||
| -include=package_list - Comma-separated object list to include in the coverage report. | ||
| Format: [schema.]package[,[schema.]package ...]. | ||
| See coverage reporting options in framework documentation. | ||
| -exclude=package_list - Comma-separated object list to exclude from the coverage report. | ||
| Format: [schema.]package[,[schema.]package ...]. | ||
| See coverage reporting options in framework documentation. | ||
|
|
||
| -include=pckg_list - Comma-separated object list to include in the coverage report. | ||
| Format: [schema.]package[,[schema.]package ...]. | ||
| See coverage reporting options in framework documentation. | ||
|
|
||
| -exclude=pckg_list - Comma-separated object list to exclude from the coverage report. | ||
| Format: [schema.]package[,[schema.]package ...]. | ||
| See coverage reporting options in framework documentation. | ||
| ``` | ||
|
|
||
| Parameters -f, -o, -s are correlated. That is parameters -o and -s are controlling outputs for reporter specified by the preceding -f parameter. | ||
|
|
||
| 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. | ||
|
|
||
| Examples: | ||
| #### Examples | ||
|
|
||
| ``` | ||
| 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 | |
|
|
||
| Invokes all unit test suites from schema "hr". Results are displayed to screen using default ut_documentation_reporter. | ||
|
|
||
| #### Enabling Color Outputs on Windows | ||
| ### info | ||
| `utplsql info [<ConnectionURL>]` | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe make a separate section for the connection URL and link to it in each command. That way it is defined only once.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, came to my mind but wasn't able to come up with a good way and therefore decided to refactor later ;) |
||
|
|
||
| ``` | ||
| <ConnectionURL> - accepted formats: | ||
| <user>/<password>@//<host>[:<port>]/<service> | ||
| <user>/<password>@<host>:<port>:<SID> | ||
| <user>/<password>@<TNSName> | ||
| To connect using TNS, you need to have the ORACLE_HOME environment variable set. | ||
| The file tnsnames.ora must exist in path %ORACLE_HOME%/network/admin | ||
| The file tnsnames.ora must contain valid TNS entries. | ||
| ``` | ||
|
|
||
| #### Examples | ||
|
|
||
| ``` | ||
| utplsql info | ||
|
|
||
| > cli 3.1.1-SNAPSHOT.local | ||
| > utPLSQL-java-api 3.1.1-SNAPSHOT.123 | ||
| ``` | ||
| ``` | ||
| utplsql info app/app@localhost:1521/ORCLPDB1 | ||
|
|
||
| > cli 3.1.1-SNAPSHOT.local | ||
| > utPLSQL-java-api 3.1.1-SNAPSHOT.123 | ||
| > utPLSQL 3.1.2.1913 | ||
| ``` | ||
|
|
||
|
|
||
| ## Enabling Color Outputs on Windows | ||
|
|
||
| To enable color outputs on Windows cmd you need to install an open-source utility called [ANSICON](http://adoxa.altervista.org/ansicon/). | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| package org.utplsql.cli; | ||
|
|
||
| import org.junit.jupiter.api.Test; | ||
|
|
||
| public class CliHelpTest { | ||
|
|
||
| @Test | ||
| public void showBasicHelp() { | ||
| TestHelper.runApp("help"); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Supports souds better than knows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, thanks