maven-surefire-plugin

maven surefire: when are we forced to set reuseForks=false?

雨燕双飞 提交于 2021-02-19 01:35:33
问题 In my project when I set reuseForks=true then i have to increase the forkCount to number of test classes. Otherwise, It is throwing illegalargument exception. Also, If I set reuseForks=false then it also work fine. Currently I have following configuration because number of test classes are less than 10. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> <configuration> <reuseForks>true</reuseForks> <forkCount>10<

Skip single test with maven with command line options

我只是一个虾纸丫 提交于 2021-02-18 05:10:46
问题 I would like to skip a single test (e.g. com.example.MyTest ) when building a project with Maven from the command line. I'm aware of similar questions like this one, but they all require either modification of source code or pom.xml . I would like to do without modifications. How can I exclude a test using command line options only? What I've tried so far after reading some documentation is mvn clean install -Dtest="*,!com.example.MyTest" but the test is still not skipped. I'm using surefire

Skip single test with maven with command line options

拥有回忆 提交于 2021-02-18 05:10:36
问题 I would like to skip a single test (e.g. com.example.MyTest ) when building a project with Maven from the command line. I'm aware of similar questions like this one, but they all require either modification of source code or pom.xml . I would like to do without modifications. How can I exclude a test using command line options only? What I've tried so far after reading some documentation is mvn clean install -Dtest="*,!com.example.MyTest" but the test is still not skipped. I'm using surefire

Skip single test with maven with command line options

纵然是瞬间 提交于 2021-02-18 05:10:17
问题 I would like to skip a single test (e.g. com.example.MyTest ) when building a project with Maven from the command line. I'm aware of similar questions like this one, but they all require either modification of source code or pom.xml . I would like to do without modifications. How can I exclude a test using command line options only? What I've tried so far after reading some documentation is mvn clean install -Dtest="*,!com.example.MyTest" but the test is still not skipped. I'm using surefire

Disable HTML karate test reporting

别来无恙 提交于 2021-02-17 03:11:42
问题 I have a karate test-suite that fail for GC overhead when generating the HTML report on a system with limited resources. The report is not required, so I would like to disable the generation, but so far I didn't find how to do it. Any advice? 回答1: i see your pain mate. Have you gone far about this topic? i have tried everything mentioned on the issues and i think it's about a bug in karate framework which mentioned here https://github.com/intuit/karate/issues/1199 Btw, this error occurs when

Disable HTML karate test reporting

寵の児 提交于 2021-02-17 03:08:01
问题 I have a karate test-suite that fail for GC overhead when generating the HTML report on a system with limited resources. The report is not required, so I would like to disable the generation, but so far I didn't find how to do it. Any advice? 回答1: i see your pain mate. Have you gone far about this topic? i have tried everything mentioned on the issues and i think it's about a bug in karate framework which mentioned here https://github.com/intuit/karate/issues/1199 Btw, this error occurs when

Disable HTML karate test reporting

家住魔仙堡 提交于 2021-02-17 03:05:33
问题 I have a karate test-suite that fail for GC overhead when generating the HTML report on a system with limited resources. The report is not required, so I would like to disable the generation, but so far I didn't find how to do it. Any advice? 回答1: i see your pain mate. Have you gone far about this topic? i have tried everything mentioned on the issues and i think it's about a bug in karate framework which mentioned here https://github.com/intuit/karate/issues/1199 Btw, this error occurs when

How to disable jar creation in commandline in a maven project?

允我心安 提交于 2021-02-11 16:32:05
问题 I have a maven project for which I'm running two separate builds. In one build I want to save the build time by disabling the jar creation of maven modules in it.(There are 45 maven modules). There is a Maven-Jar-Plugin that is being used to create the jars. I want to conditionally disable the jar creation at the command line, that is, looking for something similar to -Dskiptests used to skip the unit tests though there is a surefire plugin by default. 回答1: The maven-jar-plugin does not

How to disable jar creation in commandline in a maven project?

不问归期 提交于 2021-02-11 16:31:22
问题 I have a maven project for which I'm running two separate builds. In one build I want to save the build time by disabling the jar creation of maven modules in it.(There are 45 maven modules). There is a Maven-Jar-Plugin that is being used to create the jars. I want to conditionally disable the jar creation at the command line, that is, looking for something similar to -Dskiptests used to skip the unit tests though there is a surefire plugin by default. 回答1: The maven-jar-plugin does not

How to add data to testcase with JUnit and Maven Surefire Plugin

…衆ロ難τιáo~ 提交于 2021-02-11 14:27:30
问题 I have a running maven project with JUnit tests. The Maven Surefire Plugin drops xml files after the tests. These xml files include, besides properties and logprints, following information: <testcase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="methodNameForTest" classname="com.my.test.project.Testclass" time="20.931"> <error type="java.lang.NullPointerException">java.lang.NullPointerException</error> </testcase> Can someone explain me the usual way how data gets written from