Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

<sonar.organization>utplsql</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>

<coverage.html.version>1.0.1</coverage.html.version>
<coverage.html.download.dir>${project.build.directory}/coverage-html-download</coverage.html.download.dir>
</properties>

<licenses>
Expand Down Expand Up @@ -117,6 +120,49 @@
</resource>
</resources>
<plugins>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.8.1</version>
<executions>
<execution>
<id>download-coverage-html-assets</id>
<phase>generate-resources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://github.com/utPLSQL/utPLSQL-coverage-html/archive/refs/tags/${coverage.html.version}.zip</url>
<outputDirectory>${coverage.html.download.dir}</outputDirectory>
<outputFileName>coverage-html.zip</outputFileName>
<unpack>true</unpack>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-coverage-html-assets</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}/CoverageHTMLReporter</outputDirectory>
<resources>
<resource>
<directory>${coverage.html.download.dir}/utPLSQL-coverage-html-${coverage.html.version}/assets</directory>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down
11 changes: 11 additions & 0 deletions scripts/sql/simple/scripts/tests/APP.TEST_PKG_TEST_ME.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,16 @@ CREATE OR REPLACE PACKAGE BODY TEST_PKG_TEST_ME AS
UT.EXPECT(VEXPECTED).TO_(EQUAL(VACTUAL));
END;


PROCEDURE TEST_THAT_FAILS IS
BEGIN
UT.FAIL('Tis test is meant to fail to demonstrate failure');
END;

PROCEDURE TEST_THAT_RAISES_EXCEPTION IS
l_num number;
BEGIN
l_num := 1/0;
END;
END;
/
5 changes: 5 additions & 0 deletions scripts/sql/simple/scripts/tests/APP.TEST_PKG_TEST_ME.pks
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,10 @@ CREATE OR REPLACE PACKAGE TEST_PKG_TEST_ME AS
-- %tags(cursor)
PROCEDURE TEST_PR_TEST_ME_CURSOR;

-- %test( This is a failing test)
PROCEDURE TEST_THAT_FAILS;

-- %test( This is a test that raises an exception)
PROCEDURE TEST_THAT_RAISES_EXCEPTION;
END;
/
4 changes: 0 additions & 4 deletions src/test/java/org/utplsql/api/TestRunnerIT.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.utplsql.api;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.function.Executable;
import org.utplsql.api.compatibility.CompatibilityProxy;
Expand Down Expand Up @@ -65,7 +64,6 @@ void runWithManyReporters() throws SQLException {
/**
* This can only be tested on frameworks >= 3.0.3
*/
@Disabled
@Test
void failOnErrors() throws SQLException, InvalidVersionException {
Connection conn = getConnection();
Expand All @@ -82,8 +80,6 @@ void failOnErrors() throws SQLException, InvalidVersionException {

@Test
void runWithRandomExecutionOrder() throws SQLException {
CompatibilityProxy proxy = new CompatibilityProxy(getConnection());

new TestRunner()
.randomTestOrder(true)
.randomTestOrderSeed(123)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.utplsql.api.reporter;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
Expand All @@ -25,7 +24,6 @@ private void testFileExists(Path filePath) {
assertTrue(f.exists(), () -> "File " + f + " does not exist");
}

@Disabled("No idea why this ever worked")
@Test
void writeReporterAssetsTo() throws RuntimeException {

Expand Down
Loading