diff --git a/README.md b/README.md
index 89b9719..2a75182 100644
--- a/README.md
+++ b/README.md
@@ -236,6 +236,9 @@ The TNS alias used in the connect string must match the alias of the credential
Format: --coverage-schemes=schema1[,schema2[,schema3]]
--ora-stuck-timeout - Sets a timeout around Reporter creation and retries when not ready after a while. 0 = no timeout.
+
+--no-support-info - Leaves out the utPLSQL support line from the documentation, TAP and HTML coverage reports.
+ Requires utPLSQL framework 3.2.4 or newer. Default: the line is printed
```
Parameters -f, -o, -s are correlated. That is parameters -o and -s are controlling outputs for reporter specified by the preceding -f parameter.
diff --git a/pom.xml b/pom.xml
index 3d6a68b..f38500d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,7 +14,7 @@
UTF-8
17
- 3.2.5
+ 3.2.6-SNAPSHOT
5.12.2
4.7.7
diff --git a/src/main/java/org/utplsql/cli/RunAction.java b/src/main/java/org/utplsql/cli/RunAction.java
index 7433d9e..a93b554 100644
--- a/src/main/java/org/utplsql/cli/RunAction.java
+++ b/src/main/java/org/utplsql/cli/RunAction.java
@@ -171,7 +171,8 @@ TestRunner newTestRunner(List reporterList) {
.excludeSchemaExpr(config.getExcludeSchemaExpr())
.includeObjectExpr(config.getIncludeObjectExpr())
.excludeObjectExpr(config.getExcludeObjectExpr())
- .oraStuckTimeout(config.getOraStuckTimeout());
+ .oraStuckTimeout(config.getOraStuckTimeout())
+ .supportInfo(config.isSupportInfo());
}
private void outputMainInformation() {
diff --git a/src/main/java/org/utplsql/cli/RunPicocliCommand.java b/src/main/java/org/utplsql/cli/RunPicocliCommand.java
index 4285549..4369bc0 100644
--- a/src/main/java/org/utplsql/cli/RunPicocliCommand.java
+++ b/src/main/java/org/utplsql/cli/RunPicocliCommand.java
@@ -214,6 +214,13 @@ FileMapperConfig toFileMapperConfig() {
@Option(names = "--ora-stuck-timeout", description = "Sets a timeout around Reporter creation and retries when not ready after a while. 0 = no timeout.")
Integer oraStuckTimeout = 0;
+ @Option(
+ names = {"--no-support-info"},
+ description = "Leaves out the utPLSQL support line from the documentation, TAP and HTML coverage reports. " +
+ "Requires utPLSQL framework 3.2.4 or newer"
+ )
+ private boolean noSupportInfo = false;
+
private RunAction runAction;
private String[] splitOrEmpty(String value) {
@@ -281,6 +288,7 @@ public RunCommandConfig getRunCommandConfig() {
.excludeSchemaExpr(excludeSchemaExpr)
.includeObjectExpr(includeObjectExpr)
.excludeObjectExpr(excludeObjectExpr)
+ .supportInfo(!noSupportInfo)
.create();
}
diff --git a/src/main/java/org/utplsql/cli/config/RunCommandConfig.java b/src/main/java/org/utplsql/cli/config/RunCommandConfig.java
index 1bc1632..e8d5e28 100644
--- a/src/main/java/org/utplsql/cli/config/RunCommandConfig.java
+++ b/src/main/java/org/utplsql/cli/config/RunCommandConfig.java
@@ -28,9 +28,10 @@ public class RunCommandConfig extends ConnectionConfig {
private final String excludeSchemaExpr;
private final String includeObjectExpr;
private final String excludeObjectExpr;
+ private boolean supportInfo = true;
- @ConstructorProperties({"connectString", "suitePaths", "reporters", "outputAnsiColor", "failureExitCode", "skipCompatibilityCheck", "includePackages", "excludePackages", "sourceMapping", "testMapping", "logConfigLevel", "timeoutInMinutes", "dbmsOutput", "randomTestOrder", "randomTestOrderSeed", "tags", "coverageSchemes", "oraStuckTimeout", "includeSchemaExpr", "excludeSchemaExpr", "includeObjectExpr", "excludeObjectExpr"})
- public RunCommandConfig(String connectString, String[] suitePaths, ReporterConfig[] reporters, boolean outputAnsiColor, Integer failureExitCode, boolean skipCompatibilityCheck, String[] includePackages, String[] excludePackages, FileMapperConfig sourceMapping, FileMapperConfig testMapping, ConfigLevel logConfigLevel, Integer timeoutInMinutes, boolean dbmsOutput, boolean randomTestOrder, Integer randomTestOrderSeed, String[] tags, String[] coverageSchemes, Integer oraStuckTimeout, String includeSchemaExpr, String excludeSchemaExpr, String includeObjectExpr, String excludeObjectExpr) {
+ @ConstructorProperties({"connectString", "suitePaths", "reporters", "outputAnsiColor", "failureExitCode", "skipCompatibilityCheck", "includePackages", "excludePackages", "sourceMapping", "testMapping", "logConfigLevel", "timeoutInMinutes", "dbmsOutput", "randomTestOrder", "randomTestOrderSeed", "tags", "coverageSchemes", "oraStuckTimeout", "includeSchemaExpr", "excludeSchemaExpr", "includeObjectExpr", "excludeObjectExpr", "supportInfo"})
+ public RunCommandConfig(String connectString, String[] suitePaths, ReporterConfig[] reporters, boolean outputAnsiColor, Integer failureExitCode, boolean skipCompatibilityCheck, String[] includePackages, String[] excludePackages, FileMapperConfig sourceMapping, FileMapperConfig testMapping, ConfigLevel logConfigLevel, Integer timeoutInMinutes, boolean dbmsOutput, boolean randomTestOrder, Integer randomTestOrderSeed, String[] tags, String[] coverageSchemes, Integer oraStuckTimeout, String includeSchemaExpr, String excludeSchemaExpr, String includeObjectExpr, String excludeObjectExpr, boolean supportInfo) {
super(connectString);
this.suitePaths = suitePaths;
this.reporters = reporters;
@@ -53,6 +54,7 @@ public RunCommandConfig(String connectString, String[] suitePaths, ReporterConfi
this.excludeSchemaExpr = excludeSchemaExpr;
this.includeObjectExpr = includeObjectExpr;
this.excludeObjectExpr = excludeObjectExpr;
+ this.supportInfo = supportInfo;
}
public String[] getSuitePaths() {
@@ -129,6 +131,8 @@ public String[] getCoverageSchemes() {
public String getExcludeObjectExpr() { return excludeObjectExpr; }
+ public boolean isSupportInfo() { return supportInfo; }
+
public static class Builder {
private String connectString;
@@ -153,6 +157,7 @@ public static class Builder {
private String excludeSchemaExpr;
private String includeObjectExpr;
private String excludeObjectExpr;
+ private boolean supportInfo = true;
public Builder connectString(String connectString) {
this.connectString = connectString;
@@ -264,8 +269,13 @@ public Builder excludeObjectExpr(String excludeObjectExpr) {
return this;
}
+ public Builder supportInfo(boolean supportInfo) {
+ this.supportInfo = supportInfo;
+ return this;
+ }
+
public RunCommandConfig create() {
- return new RunCommandConfig(connectString, suitePaths, reporters, outputAnsiColor, failureExitCode, skipCompatibilityCheck, includePackages, excludePackages, sourceMapping, testMapping, logConfigLevel, timeoutInMinutes, dbmsOutput, randomTestOrder, randomTestOrderSeed, tags, coverageSchemes, oraStuckTimeout, includeSchemaExpr, excludeSchemaExpr, includeObjectExpr, excludeObjectExpr);
+ return new RunCommandConfig(connectString, suitePaths, reporters, outputAnsiColor, failureExitCode, skipCompatibilityCheck, includePackages, excludePackages, sourceMapping, testMapping, logConfigLevel, timeoutInMinutes, dbmsOutput, randomTestOrder, randomTestOrderSeed, tags, coverageSchemes, oraStuckTimeout, includeSchemaExpr, excludeSchemaExpr, includeObjectExpr, excludeObjectExpr, supportInfo);
}
}
}
diff --git a/src/test/java/org/utplsql/cli/PicocliRunCommandTest.java b/src/test/java/org/utplsql/cli/PicocliRunCommandTest.java
index b81e46e..e09229e 100644
--- a/src/test/java/org/utplsql/cli/PicocliRunCommandTest.java
+++ b/src/test/java/org/utplsql/cli/PicocliRunCommandTest.java
@@ -53,7 +53,8 @@ void runCommandAllArguments() throws Exception {
"-include-schema-expr=^APP$",
"-exclude-schema-expr=^APP_TEST$",
"-include-object-expr=^PKG_",
- "-exclude-object-expr=_TMP$");
+ "-exclude-object-expr=_TMP$",
+ "--no-support-info");
assertNotNull(config.getConnectString());
assertThat( config.getSuitePaths(), is(new String[]{"app.betwnstr", "app.basic"}));
@@ -62,6 +63,7 @@ void runCommandAllArguments() throws Exception {
assertEquals( "^APP_TEST$", config.getExcludeSchemaExpr() );
assertEquals( "^PKG_", config.getIncludeObjectExpr() );
assertEquals( "_TMP$", config.getExcludeObjectExpr() );
+ assertFalse( config.isSupportInfo() );
assertTrue( config.isOutputAnsiColor() );
assertEquals( LoggerConfiguration.ConfigLevel.NONE, config.getLogConfigLevel());
assertEquals( 10, config.getFailureExitCode());
diff --git a/src/test/java/org/utplsql/cli/RunCommandConfigParamsArePassedToTestRunnerTest.java b/src/test/java/org/utplsql/cli/RunCommandConfigParamsArePassedToTestRunnerTest.java
index d3b5194..59f3f66 100644
--- a/src/test/java/org/utplsql/cli/RunCommandConfigParamsArePassedToTestRunnerTest.java
+++ b/src/test/java/org/utplsql/cli/RunCommandConfigParamsArePassedToTestRunnerTest.java
@@ -9,6 +9,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.equalTo;
+import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class RunCommandConfigParamsArePassedToTestRunnerTest {
@@ -54,4 +55,21 @@ void expressionFilters() {
assertThat( testRunner.getOptions().includeObjectExpr, equalTo("^PKG_") );
assertThat( testRunner.getOptions().excludeObjectExpr, equalTo("_TMP$") );
}
+
+ @Test
+ void supportInfoIsOnByDefault() {
+ RunCommandConfig config = new RunCommandConfig.Builder()
+ .create();
+ TestRunner testRunner = new RunAction(config).newTestRunner(new ArrayList<>());
+ assertTrue( testRunner.getOptions().supportInfo );
+ }
+
+ @Test
+ void supportInfoSwitchedOff() {
+ RunCommandConfig config = new RunCommandConfig.Builder()
+ .supportInfo(false)
+ .create();
+ TestRunner testRunner = new RunAction(config).newTestRunner(new ArrayList<>());
+ assertFalse( testRunner.getOptions().supportInfo );
+ }
}