forked from utPLSQL/utPLSQL-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRunCommandIT.java
More file actions
55 lines (43 loc) · 1.68 KB
/
RunCommandIT.java
File metadata and controls
55 lines (43 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package org.utplsql.cli;
import org.junit.jupiter.api.Test;
import org.utplsql.api.compatibility.OptionalFeatures;
import org.utplsql.api.reporter.CoreReporters;
import java.nio.file.Paths;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* System tests for run command.
*/
public class RunCommandIT extends AbstractFileOutputTest {
@Test
public void run_Default() throws Exception {
int result = TestHelper.runApp("run",
TestHelper.getConnectionString(),
"-f=ut_documentation_reporter",
"-s",
"-c",
"--failure-exit-code=2");
// Only expect failure-exit-code to work on several framework versions
if (OptionalFeatures.FAIL_ON_ERROR.isAvailableFor(TestHelper.getFrameworkVersion()))
assertEquals(2, result);
else
assertEquals(0, result);
}
@Test
public void run_MultipleReporters() throws Exception {
String outputFileName = "output_" + System.currentTimeMillis() + ".xml";
addTempPath(Paths.get(outputFileName));
int result = TestHelper.runApp("run",
TestHelper.getConnectionString(),
"-f=ut_documentation_reporter",
"-s",
"-f=" + CoreReporters.UT_SONAR_TEST_REPORTER.name(),
"-o=" + outputFileName,
"-c",
"--failure-exit-code=2");
// Only expect failure-exit-code to work on several framework versions
if (OptionalFeatures.FAIL_ON_ERROR.isAvailableFor(TestHelper.getFrameworkVersion()))
assertEquals(2, result);
else
assertEquals(0, result);
}
}