[
https://issues.apache.org/jira/browse/SUREFIRE-1920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Slawomir Jaranowski closed SUREFIRE-1920.
-----------------------------------------
Resolution: Duplicate
Please follow SUREFIRE-2033 there are more comments.
> After adding junit-platform-runner dependency, Junit 5 test cases are ignored
> -----------------------------------------------------------------------------
>
> Key: SUREFIRE-1920
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1920
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Surefire Plugin
> Affects Versions: 3.0.0-M5
> Reporter: Rich M
> Priority: Major
>
> I want to run Junit 4 and 5 test cases in same project. Some of the JUnit5
> test cases also have @RunWith(JUnitPlatform.class) annotation to run with
> Junit4.
> To successfully compile class having above annotation, I would need to add
> "junit-platform-runner" dependency in pom.xml, but the moment I add it, Maven
> ignores JUnit 5 test cases.
> I have tried various combinations but nothing seems to work. Note that if I
> remove the class having above annotation and remove "junit-platform-runner"
> dependency from pom, then Maven is able to run the remaining Junit 4 and 5
> test cases successfully. Problem seems to be only with
> @RunWith(JUnitPlatform.class) annotation and "junit-platform-runner"
> dependency.
> Note that when I use maven-surefire-plugin version 3.0.0-M4, then everything
> works fine. Seems to be a bug with 3.0.0-M5.
> Source code - [https://github.com/niajthat/junit45]
--
This message was sent by Atlassian Jira
(v8.20.1#820001)