surefire

mvn test fails because of Surefire JDK version?

丶灬走出姿态 提交于 2019-12-18 06:11:57
问题 I am trying to run mvn test on my project. The project itself compiles and installs but man test fails with the following output: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18:test (default-test) on project udms-server: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18:test failed: There was an error in the forked process [ERROR] java.lang.UnsupportedClassVersionError: some/project/Event : Unsupported major.minor version 52

How do I get my Maven Integration tests to run

你离开我真会死。 提交于 2019-12-17 03:22:12
问题 I have a maven2 multi-module project and in each of my child modules I have JUnit tests that are named Test.java and Integration.java for unit tests and integration tests respectively. When I execute: mvn test all of the JUnit tests *Test.java within the child modules are executed. When I execute mvn test -Dtest=**/*Integration none of the Integration.java tests get execute within the child modules. These seem like the exact same command to me but the one with the -Dtest= /*Integration** does

Failing TestNG unit test from a callback I don't own in my code

折月煮酒 提交于 2019-12-13 18:26:27
问题 I previously asked how to fail a unit test from a thread pool. @Test public void foo() throws Exception { ScheduledThreadPoolExecutor stpe = new ScheduledThreadPoolExecutor(1); stpe.submit(new Runnable() { @Override public void run() { // does not make this unit test fail :( Assert.AssertEquals(1, 2); } }); } The solution I accepted was to block on the returned Future and get. But in my actual setting I own neither the threadpool nor the submit call - it's a callback that ultimately

How to set LOCALE in Windows console

99封情书 提交于 2019-12-13 17:26:26
问题 I need to set locale for a single console. I want to build Apache Wicket framework (Maven-based build), but it fails on test which relies on en_US locale. I don't want to skip tests. I don't want to skip the particular failing tests. Is it possible? Or is changing the system-wide locale the only way? Thanks 回答1: Nothing Wicket specific and I have not done this myself. But, a little bit of google led me to this: Re: maven-surefire-plugin and default locale which again leads to Surefire Plugin

Surefire is not picking up Junit 4 tests

巧了我就是萌 提交于 2019-12-13 12:24:10
问题 I cannot get Maven Surefire to execute my JUnit 4 tests even after I tried all the advices from another post. My POM: <project> <modelVersion>4.0.0</modelVersion> <groupId>maven-test</groupId> <artifactId>maven-test</artifactId> <version>0.0.1-SNAPSHOT</version> <dependencies> <dependency> <groupId>org.junit</groupId> <artifactId>com.springsource.org.junit</artifactId> <version>4.4.0</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache

A required class was missing while executing org.apache.maven.plugins:maven-surefire-plugin:2.14.1:test: org/junit/runner/notification/RunListener

梦想与她 提交于 2019-12-13 00:24:31
问题 I have a project which is packaged as an ear. For the past month or so system tests have been disabled. We turned them back on and have been fixing problems with failed tests and the build script. I have not been able to crack the latest problem: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.14.1:test (default-test) on project systemTest: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.14.1:test failed: A required class was

@RunWith causes Maven to ignore my Test running with my own runner

扶醉桌前 提交于 2019-12-12 17:14:49
问题 I am moving from using only Intellij to manage my build system to Intellij/Maven. When I run my integration test "MapSimulationTest" with my own runner via @RunWith(KmlParameterizedRunner.class) Intellij correctly handles the situation, the directory specified by the system property "user.dir" is scanned for .kml files and each is tested. The problem seems to be that Surefire ignores @RunWith, any suggestions? Here is what the maven log shows... -----------------------------------------------

Is there a way to force Maven Surefire or JUnit to indicate the name of the failing test class when executed from a Test Suite?

纵然是瞬间 提交于 2019-12-12 10:50:15
问题 My question: Is there a way to force Maven Surefire (or JUnit?) to indicate the name of the failing test class when this class has been executed from a Test Suite? Now, the long story. Imagine you have a JUnit test suite that launches two JUnit tests. Examples of test classes: public class TestOne { @Test public void foo() { assertTrue(false); } @Test public void bar() { assertTrue(false); } } @UnitTest public class TestTwo { @Test public void foo() { assertFalse(true); } } and the test suite

Unable to send email after tests run using Maven Postman plugin

安稳与你 提交于 2019-12-12 10:12:37
问题 I've been trying all morning but have not had any success sending emails after running my Selenium test suite from the command line using Maven. Here is how we run the suite from the command line. mvn surefire:test This is using the Surefire plugin to run a suite of TestNG/Selenium tests. This works great and we want to keep using it. What I need is a way to email the results after each running of the suite. I came across the Postman plugin and it looks perfect. Only problem is I can't get it

ClassFormatError - Surefire?

心已入冬 提交于 2019-12-11 23:51:51
问题 When I attempt to deploy artifacts, I get a ClassFormatError for my projects that do have tests: [INFO] --- maven-surefire-plugin:2.5:test (default-test) @ ssh-exec --- [INFO] Concurrency config is {threadCount=10, parallel=methods, configurableParallelComputerPresent=false} [INFO] Surefire report directory: /home/walterjwhite/storage/projects/software/active/stable/task/impl/ssh-exec/target/surefire-reports org.apache.maven.surefire.booter.SurefireExecutionException: Incompatible magic value