Reputation: 1081
I have a Java Project with maven in Eclipse. This project includes several Junit5 tests.
I have configured my pom.xml
as followed:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<properties>
<configurationParameters>
junit.jupiter.execution.parallel.enabled = true
junit.jupiter.execution.parallel.mode.default = concurrent
</configurationParameters>
</properties>
</configuration>
</plugin>
I included my junit dependency as followed:
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.5.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.5.1</version>
<scope>test</scope>
</dependency>
When I click right on my project I can choose Run As -> Junit Test
. This will open the Junit View where I can see the process in a nice way and execute the tests without my maven settings.
When I click right on my project I can also choose Run As -> Maven test
. This will open the console view, take my maven settings and will run the test. But I don't like the look of the console view.
So my question is: Is it possible to excute my project via Maven test
to use my maven settings and let it run in the Junit view?
Upvotes: 3
Views: 208
Reputation: 12450
The maven test outputs test results in target\surefire-reports\
directory.
You can take the XML with test results and drag&drop it to the Test View once the test completes, and the view will load and show the test results.
Caveats:
Upvotes: 2