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 c…
Tag: maven-surefire-plugin
selenium.ScriptTimeoutException: java.util.concurrent.TimeoutException
I have Cucumber tests that run in parallel via Maven Surefire plugin. Sometimes the code throws me an error: selenium.ScriptTimeoutException: java.util.concurrent.TimeoutException which is obviously related to parallel run. But I have no idea how to avoid it. Here is the whole error log: Answer So the solutio…
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 s…
Surefire maven plugin does not execute one of the tests
I have a project with four packages. With three of them everything is fine. I have generated JUnit tests and they are executed during the build or while I am running mvn test command. But my fourth package, containing just one class. I have created a JUnit test for it, but when I am running the build, Surefir…
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…
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.manageme…
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 resul…
Maven build and maven-failsafe-plugin – The forked VM terminated without properly saying goodbye
I use Docker and https://github.com/fabric8io/docker-maven-plugin for my integration tests. On my Windows 10 (after updating to Windows 10 1709) machine I faced the following error with my Maven 3.5.0 build: Right now I have no idea what can be wrong, I don’t see any failures with my tests. What can be …
What’s the default value for maven-surefire-plugin’s forkedProcessTimeoutInSeconds?
forkedProcessTimeoutInSeconds can be set to 0 in order to prevent forked test VMs from being assumed dead after the specified time. What’s the default value for this property? The documentation doesn’t specify it, the XML autocompletion in NetBeans says undefined which doesn’t make sense bec…
Report not being generated with Maven-Surefire-Report plugin
As the title suggests, I’m trying to generate an HTML report of the JUnit results when my maven project executes. I was told to check out maven-surefire-report plugin by another person and it looks like it has what I’m wanting but I just can’t seem to get the HTML file to generate. I’m…