Skip to content

Commit

Permalink
added JUnit 5 support
Browse files Browse the repository at this point in the history
  • Loading branch information
ErwinOlie2 committed Nov 2, 2023
1 parent d049a57 commit ac05b42
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ cp /root/pom.xml $2

# Temporarily un-ignore tests
find $2/src/test/kotlin -type f -name '*Test.kt' -execdir cp {} {}.bak \;
find $2/src/test/kotlin -type f -name '*Test.kt' -exec sed -i "s/@Ignore(.*)//g;s/@Ignore//g;" {} \;
find $2/src/test/kotlin -type f -name '*Test.kt' -exec sed -i "s/@Ignore(.*)//g;s/@Ignore//g;" {} \; # for JUnit 4
find $2/src/test/kotlin -type f -name '*Test.kt' -exec sed -i "s/@Disabled(.*)//g;s/@Disabled//g;" {} \; # for JUnit 5

# See Dockerfile for details
java -jar /opt/test-runner/autotest-runner.jar $1 $2 $3
Expand Down
20 changes: 19 additions & 1 deletion examples/template/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,24 @@
<version>${kotlin.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.10.0</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand All @@ -57,7 +75,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<version>3.2.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
Expand Down

0 comments on commit ac05b42

Please sign in to comment.