Skip to content

Commit b8e3c9b

Browse files
committed
Added skip IT
1 parent 5f6299c commit b8e3c9b

File tree

2 files changed

+96
-0
lines changed

2 files changed

+96
-0
lines changed

src/test/java/org/utplsql/maven/plugin/UtPLSQLMojoIT.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.util.stream.Stream;
2020

2121
import static org.junit.Assert.assertEquals;
22+
import static org.junit.Assert.assertFalse;
2223
import static org.junit.Assert.assertTrue;
2324
import static org.junit.Assert.fail;
2425

@@ -135,6 +136,22 @@ public void testTagsProject() {
135136
}
136137
}
137138

139+
@Test
140+
public void testSkipUtplsqlTests() {
141+
try {
142+
final String PROJECT_NAME = "skip-project";
143+
File testProject = ResourceExtractor.simpleExtractResources(getClass(), "/" + PROJECT_NAME);
144+
145+
Verifier verifier = createVerifier(testProject);
146+
verifier.executeGoal("test");
147+
148+
assertFalse(new File("target/test-classes/" + PROJECT_NAME + "/target").exists());
149+
} catch (Exception e) {
150+
e.printStackTrace();
151+
fail("Unexpected Exception running the test of Definition " + e.getMessage());
152+
}
153+
}
154+
138155
/**
139156
* Duration is set to 1 before comparing contents as it is always different.
140157
* Path separator is set to "/" to ensure windows / linux / mac compatibility.
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<groupId>org.utplsql</groupId>
7+
<artifactId>utplsql-maven-plugin-simple-test</artifactId>
8+
<version>1.0.0</version>
9+
<packaging>pom</packaging>
10+
11+
<name>utplsql-maven-plugin IT Skip Tests</name>
12+
<properties>
13+
<!-- url, user, password are set with dbUrl, dbUser, dbPass system properties -->
14+
</properties>
15+
16+
<build>
17+
<plugins>
18+
<plugin>
19+
<groupId>${project.groupId}</groupId>
20+
<artifactId>utplsql-maven-plugin</artifactId>
21+
<version>${utplsql-maven-plugin-version}</version>
22+
<executions>
23+
<execution>
24+
<goals>
25+
<goal>test</goal>
26+
</goals>
27+
<configuration>
28+
<skipUtplsqlTests>true</skipUtplsqlTests>
29+
30+
<!-- Mandatory Attributes -->
31+
32+
<ignoreFailure>false</ignoreFailure>
33+
34+
<paths>
35+
<path>app</path>
36+
</paths>
37+
38+
<reporters>
39+
<reporter>
40+
<name>UT_COVERAGE_SONAR_REPORTER</name>
41+
<fileOutput>utplsql/coverage-sonar-reporter.xml</fileOutput>
42+
<consoleOutput>true</consoleOutput>
43+
</reporter>
44+
<reporter>
45+
<name>UT_SONAR_TEST_REPORTER</name>
46+
<fileOutput>utplsql/sonar-test-reporter.xml</fileOutput>
47+
<consoleOutput>true</consoleOutput>
48+
</reporter>
49+
</reporters>
50+
51+
<sources>
52+
<source>
53+
<directory>scripts/sources</directory>
54+
<includes>
55+
<include>**/*bdy</include>
56+
<include>**/*spc</include>
57+
</includes>
58+
</source>
59+
</sources>
60+
61+
<tests>
62+
<test>
63+
<directory>scripts/tests</directory>
64+
<includes>
65+
<include>**/*bdy</include>
66+
<include>**/*spc</include>
67+
</includes>
68+
</test>
69+
</tests>
70+
71+
</configuration>
72+
73+
</execution>
74+
</executions>
75+
76+
</plugin>
77+
</plugins>
78+
</build>
79+
</project>

0 commit comments

Comments
 (0)