Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Prev Previous commit
Switch table-like to 4-space intendation
  • Loading branch information
pesse committed Jun 12, 2018
commit d4027187361fd9a0239f91f060d66581cdd5c84f
82 changes: 46 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,42 +162,52 @@ utPLSQL 3.1.2.1913
```
> utplsql reporters app/app@localhost:1521/ORCLPDB1

UT_COVERAGE_COBERTURA_REPORTER Generates a Cobertura coverage report providing information on code coverage with line numbers.
Designed for Jenkins and TFS to report coverage.
Cobertura Document Type Definition can be found: http://cobertura.sourceforge.net/xml/coverage-04.dtd.
Sample file: https://github.com/leobalter/testing-examples/blob/master/solutions/3/report/cobertura-coverage.xml.

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.
Will copy all necessary assets to a folder named after the Output-File

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.
JSON format returned conforms with the Sonar specification: https://docs.sonarqube.org/display/SONAR/Generic+Test+Data

UT_COVERALLS_REPORTER Generates a JSON coverage report providing information on code coverage with line numbers.
Designed for [Coveralls](https://coveralls.io/).
JSON format conforms with specification: https://docs.coveralls.io/api-introduction

UT_DOCUMENTATION_REPORTER A textual pretty-print of unit test results (usually use for console output)
Provides additional properties lvl and failed

UT_JUNIT_REPORTER Provides outcomes in a format conforming with JUnit 4 and above as defined in: https://gist.github.com/kuzuha/232902acab1344d6b578

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.
JSON format returned conforms with the Sonar specification: https://docs.sonarqube.org/display/SONAR/Generic+Test+Data

UT_TEAMCITY_REPORTER Provides the TeamCity (a CI server by jetbrains) reporting-format that allows tracking of progress of a CI step/task as it executes.
https://confluence.jetbrains.com/display/TCD9/Build+Script+Interaction+with+TeamCity

UT_TFS_JUNIT_REPORTER Provides outcomes in a format conforming with JUnit version for TFS / VSTS.
As defined by specs :https://docs.microsoft.com/en-us/vsts/build-release/tasks/test/publish-test-results?view=vsts
Version is based on windy road junit https://github.com/windyroad/JUnit-Schema/blob/master/JUnit.xsd.

UT_XUNIT_REPORTER Depracated reporter. Please use Junit.
Provides outcomes in a format conforming with JUnit 4 and above as defined in: https://gist.github.com/kuzuha/232902acab1344d6b578
UT_COVERAGE_COBERTURA_REPORTER:
Generates a Cobertura coverage report providing information on code coverage with line numbers.
Designed for Jenkins and TFS to report coverage.
Cobertura Document Type Definition can be found: http://cobertura.sourceforge.net/xml/coverage-04.dtd.
Sample file: https://github.com/leobalter/testing-examples/blob/master/solutions/3/report/cobertura-coverage.xml.

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.
Will copy all necessary assets to a folder named after the Output-File

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.
JSON format returned conforms with the Sonar specification: https://docs.sonarqube.org/display/SONAR/Generic+Test+Data

UT_COVERALLS_REPORTER:
Generates a JSON coverage report providing information on code coverage with line numbers.
Designed for [Coveralls](https://coveralls.io/).
JSON format conforms with specification: https://docs.coveralls.io/api-introduction

UT_DOCUMENTATION_REPORTER:
A textual pretty-print of unit test results (usually use for console output)
Provides additional properties lvl and failed

UT_JUNIT_REPORTER:
Provides outcomes in a format conforming with JUnit 4 and above as defined in: https://gist.github.com/kuzuha/232902acab1344d6b578

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.
JSON format returned conforms with the Sonar specification: https://docs.sonarqube.org/display/SONAR/Generic+Test+Data

UT_TEAMCITY_REPORTER:
Provides the TeamCity (a CI server by jetbrains) reporting-format that allows tracking of progress of a CI step/task as it executes.
https://confluence.jetbrains.com/display/TCD9/Build+Script+Interaction+with+TeamCity

UT_TFS_JUNIT_REPORTER:
Provides outcomes in a format conforming with JUnit version for TFS / VSTS.
As defined by specs :https://docs.microsoft.com/en-us/vsts/build-release/tasks/test/publish-test-results?view=vsts
Version is based on windy road junit https://github.com/windyroad/JUnit-Schema/blob/master/JUnit.xsd.

UT_XUNIT_REPORTER:
Depracated reporter. Please use Junit.
Provides outcomes in a format conforming with JUnit 4 and above as defined in: https://gist.github.com/kuzuha/232902acab1344d6b578
```

## Enabling Color Outputs on Windows
Expand Down
22 changes: 6 additions & 16 deletions src/main/java/org/utplsql/cli/ReportersCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ private int getMaxNameLength(List<ReporterInfo> reporterInfos) {
}

private void writeReporters(List<ReporterInfo> reporterInfos, PrintStream out) {
int padding = getMaxNameLength(reporterInfos)+1;
//int padding = getMaxNameLength(reporterInfos)+1;
reporterInfos.stream()
.sorted(Comparator.comparing(ReporterInfo::getName))
.forEach(info -> writeReporter(info, padding, out));
.forEach(info -> writeReporter(info, 4, out));
}

private void writeReporter(ReporterInfo info, int padding, PrintStream out) {
Expand All @@ -74,23 +74,13 @@ private void writeReporter(ReporterInfo info, int padding, PrintStream out) {
}

private void writeReporterName( ReporterInfo info, int paddingRight, PrintStream out ) {
out.print(String.format("%1$-" + paddingRight + "s", info.getName()));
out.println(info.getName()+":");

}

private void writeReporterDescription( ReporterInfo info, int paddingLeft, PrintStream out ) {
String[] lines = info.getDescription().split("\n");

boolean firstLine = true;
for ( String line : lines ) {

line = line.trim();

if ( !firstLine )
out.print(String.format("%1$" + paddingLeft + "s", ""));

out.println(line);
firstLine = false;
}

String paddingLeftStr = String.format("%1$"+paddingLeft+"s", "");
Arrays.stream(lines).forEach(line -> out.println(paddingLeftStr+line.trim()));
}
}