maven-surefire-plugin

Maven separate Unit Test and Integration Tests

依然范特西╮ 提交于 2019-12-02 16:39:13
UT = Unit Tests IT = Integration Tests. All my Integration test classes are annotated with @Category(IntegrationTest.class) My goal is: mvn clean install => runs UT and not IT mvn clean install -DskipTests=true => no tests are executed mvn clean deploy => runs UT and not IT mvn clean test => runs UT and not IT mvn clean verify => runs UT and IT mvn clean integration-test => runs IT and UT are not executed mvn clean install deploy => runs UT and not IT pom properties: <junit.version>4.12</junit.version> <surefire-plugin.version>2.18.1</surefire-plugin.version> <failsafe-plugin.version>2.18.1<

JUnit Listener Configuration In Gradle

允我心安 提交于 2019-12-02 06:17:30
问题 I'm new bee to Gradle. Have custom JUnit Listener, which reads the custom annotation data and generates report and need to configure it as part of Gradle. Is there anyway to configure below surefire plugin in Gradle 4.4. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> <configuration> <properties> <property> <name>listener</name> <value>my.company.MyRunListener</value> </property> </properties> </configuration> <

Running test in parallel with surefire and displaying them properly with the TestNG Jenkins plugin

早过忘川 提交于 2019-12-02 05:04:41
I'm running tests with parallel execution using surefire, and that all seems to work fine. However, there's only one testng-results.xml generated in the target/surefire-reports/ folder which ... only contains the results of the test that ran last. I found an issue exactly for that reported for an older version of surefire, and it says "won't fix" here: http://t161727.apache-maven-issues.apacheforum.info/surefire-1018-surefire-reports-overwrite-each-other-whenusing-forking-t161727.html However, I doubt that I'm the first person on the planet who is trying to run unit tests in parallel with

JUnit Listener Configuration In Gradle

自作多情 提交于 2019-12-02 01:16:39
I'm new bee to Gradle. Have custom JUnit Listener, which reads the custom annotation data and generates report and need to configure it as part of Gradle. Is there anyway to configure below surefire plugin in Gradle 4.4. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> <configuration> <properties> <property> <name>listener</name> <value>my.company.MyRunListener</value> </property> </properties> </configuration> </plugin> I understand that, it may not possible to use maven plugin as is in gradle. I checked TestListener

JUnit 5 test case not executed

戏子无情 提交于 2019-12-02 00:12:31
问题 I created this test in a new clean Maven project in NetBeans 8.2: import static org.junit.jupiter.api.Assertions.fail; import org.junit.jupiter.api.Test; public class JUnit501Test { @Test void firstTest() { fail("epicly"); } } If I run the tests, the log shows ------------------------------------------------------- T E S T S ------------------------------------------------------- Running JUnit501Test Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec Results : Tests run: 0,

JUnit 5 test case not executed

北战南征 提交于 2019-12-01 22:32:51
I created this test in a new clean Maven project in NetBeans 8.2: import static org.junit.jupiter.api.Assertions.fail; import org.junit.jupiter.api.Test; public class JUnit501Test { @Test void firstTest() { fail("epicly"); } } If I run the tests, the log shows ------------------------------------------------------- T E S T S ------------------------------------------------------- Running JUnit501Test Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 My pom.xml contains this dependency: <dependency> <groupId>org

Maven not running JUnit 5 tests

删除回忆录丶 提交于 2019-12-01 17:05:09
Im trying to get a simple junit test running with maven but it is not detecting any tests. Where am I going wrong? The project directory Project -> src -> test-> java -> MyTest.java Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.buildproftest.ecs</groupId> <artifactId>buildprofiletest<

Surefire JUnit Testing using Native Libraries

冷暖自知 提交于 2019-12-01 16:04:31
We are using Maven in Hudson to run our Java build process and the Surefire plugin to execute JUnit tests however I've run into a problem with the unit tests for one project which requires native dlls. The error we're seeing is : Tests in error: TestFormRegistrationServiceConnection(com.#productidentifierremoved#.test.RegistrationServiceTest): no Authenticator in java.library.path Where Authenticator is the name of the dll we require. I found this SO post which suggest that the only way to set this is through argLine. We modified our config to this: <plugin> <groupId>org.apache.maven.plugins<

Surefire JUnit Testing using Native Libraries

我是研究僧i 提交于 2019-12-01 14:40:58
问题 We are using Maven in Hudson to run our Java build process and the Surefire plugin to execute JUnit tests however I've run into a problem with the unit tests for one project which requires native dlls. The error we're seeing is : Tests in error: TestFormRegistrationServiceConnection(com.#productidentifierremoved#.test.RegistrationServiceTest): no Authenticator in java.library.path Where Authenticator is the name of the dll we require. I found this SO post which suggest that the only way to

Unable to generate cucumber reports in jenkins. net.masterthought.cucumber.ValidationException: None report file was added

我怕爱的太早我们不能终老 提交于 2019-12-01 13:25:06
问题 I am using jenkins to run jobs that uses maven with cucumber . my jobs are running succesfully. I have also managed the plugin Cucumber report in jenkins. But when i view the report i am getting the message as shown in below picture. I have tried to install various plugins like Jenkins plugin, standalone but with no joy. These are shown as options in the bottom right of the report. Any clue is helpful. I have tried to check this error in stackover flow also. I didnt get any clue I could see