Skip to content
Advertisement

Tag: maven-surefire-plugin

JUnit 5 and Test Suites

We have a pure JUnit-5 project and we want to categories our unit tests. To do so, what I understand is we need to include the JUnit-4 @RunWith(JUnitPlatform.class). In Intellij-Idea I can run all or just test suites without problems but I get an error on the execution with maven: in Intellij-Idea some test cases fail on the console I

How to print exceptions on console? I am using TestNG and Maven

I want to see the exceptions on console. I am using TestNG with Maven as a build tool. I have defined my testng.xml in the Maven surefire plugin. Answer https://www.javadoc.io/doc/org.testng/testng/latest/org/testng/reporters/VerboseReporter.html you should use above reporter , but the constructor expects a string so you cannot initialize it using testng.xml ( if any one knows how to pass string argument to

Integration test fails when upgrading failsafe but passes within intellij

I have a multi maven module project. The project runs fine and everything passes, but if I upgrade failsafe plugin from 2.22.2 to the latest version 3.0.0-M5 the integration test within two of the maven modules(client and server-with-jersey) fails. I have tried different configuration, but I am not quite sure what to do anymore… So I am hoping that the

how to pass –add-opens JDK module configuration to maven test

I’m upgrading java version in our production code from java 8 to java 11. I have to add the below JDK module configuration in the application java start command due to usage of third party libraries like flume, zookeeper etc. –add-opens java.base/java.lang=ALL-UNNAMED –add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED After adding this configuration and java application is starting fine. But when I run the tests

Problem running tests with enabled preview features in surefire and failsafe

I’m trying to migrate a project to Java 12, with –enable-preview. I added –enable-preview in compiler settings: And also added it in argLine for surefire and failsafe: And do a mvn clean verify results in: I also tried adding argLine directly to surefire/failsafe configuration, but the result is same. What am I missing here? I this a bug in surefire/failsafe?

Advertisement