79694224

Date: 2025-07-08 12:25:31
Score: 0.5
Natty:
Report link

Building on @hfc's answer, if you have both JUnit and TestNG on the classpath and you don't want to remove JUnit, you can do so by declaring the surefire-testng dependency on the maven-surefire-plugin:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>3.5.3</version>
  <dependencies>
    <dependency>
      <groupId>org.apache.maven.surefire</groupId>
      <artifactId>surefire-testng</artifactId>
      <version>3.5.3</version>
    </dependency>
  </dependencies>
</plugin>
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @hfc's
  • Low reputation (0.5):
Posted by: 94621