diff --git a/testng-junit-migrator/README.md b/testng-junit-migrator/README.md index 67198b2e87f..f04833a3da8 100644 --- a/testng-junit-migrator/README.md +++ b/testng-junit-migrator/README.md @@ -1,10 +1,10 @@ -# TestNG to JUnit migrator +# TestNG to JUnit Jupiter migrator -An automated TestNG to JUnit 5 migration tool built on top of EPS +A tool to automatically migrate TestNG tests to JUnit Jupiter. ### Example -Consider the following TestNG test: +Consider the following TestNG test class: ```java // TestNG code: @@ -30,32 +30,32 @@ public class A { This migration tool will turn this into the following: ```java -// JUnit 5 code: +// JUnit Jupiter code: @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class A { - @Test - void simpleTest() {} + @Test + void simpleTest() {} - @Test - @Order(2) - public void priorityTest() {} + @Test + @Order(2) + public void priorityTest() {} - private static Stream dataProviderTestCases() { - return Stream.of(arguments(1), arguments(2), arguments(3)); - } + private static Stream dataProviderTestCases() { + return Stream.of(arguments(1), arguments(2), arguments(3)); + } - @ParameterizedTest - @MethodSource("dataProviderTestCases") - public void dataProviderTest(int number) {} + @ParameterizedTest + @MethodSource("dataProviderTestCases") + public void dataProviderTest(int number) {} } ``` ### Installation -First edit your `pom.xml` and add `testng-junit-migrator` to the `annotationPath` of the `maven-compiler` plugin: +First edit your `pom.xml` and add `testng-junit-migrator` to the +`annotationProcessorPaths` of the `maven-compiler` plugin: ```xml - testng-migator @@ -92,11 +92,10 @@ mvn \ -Ppatch \ clean test-compile fmt:format \ -Derror-prone.patch-checks="TestNGJUnitMigration" \ - -Dfrontend.skip \ -Dverification.skip ``` -There's script to make invocating this command easier: `run-testng-junit-migrator.sh`. +There's script to make invoking this command easier: `run-testng-junit-migrator.sh`. This script will: 1. Run your TestNG tests and count the number of completed tests diff --git a/testng-junit-migrator/pom.xml b/testng-junit-migrator/pom.xml index f0b57fd56df..8c5ac8e45ce 100644 --- a/testng-junit-migrator/pom.xml +++ b/testng-junit-migrator/pom.xml @@ -35,7 +35,7 @@ ${project.groupId} error-prone-contrib - 0.8.1-SNAPSHOT + ${version} com.google.auto diff --git a/testng-junit-migrator/src/main/java/tech/picnic/errorprone/testngjunit/SupportedArgumentKind.java b/testng-junit-migrator/src/main/java/tech/picnic/errorprone/testngjunit/SupportedArgumentKind.java index 4459b90b5e3..4f5be3791e7 100644 --- a/testng-junit-migrator/src/main/java/tech/picnic/errorprone/testngjunit/SupportedArgumentKind.java +++ b/testng-junit-migrator/src/main/java/tech/picnic/errorprone/testngjunit/SupportedArgumentKind.java @@ -4,7 +4,7 @@ import java.util.Optional; -/** The annotation argument kinds that are supported by the TestNG -> JUnit migration. */ +/** The annotation argument kinds that are supported by the TestNG to JUnit Jupiter migration. */ enum SupportedArgumentKind { PRIORITY("priority", new PriorityArgumentMigrator()), DESCRIPTION("description", new DescriptionArgumentMigrator()),