Questions tagged [junit-vintage]
10 questions
4
votes
3 answers
IntelliJ IDEA CE 2019.1: "JUnit Vintage" test section throwing "No runnable methods" when using `@RunWith(SpringRunner.class)`
When using the annotation:
@RunWith(SpringRunner.class)
Using IntelliJ IDEA CE 2019.1, I get a Junit Vintage section in tests, and it throws this exception:
java.lang.Exception: No runnable methods
Full output:
java.lang.Exception: No runnable…

Neil
- 24,551
- 15
- 60
- 81
3
votes
2 answers
How to correctly exclude "junit-vintage-engine" in Gradle build file?
When use this configuration I receive the initializationError of the JUnit Vintage:
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test'
But with this configuration @RunWith annotation isn't…

Albert
- 131
- 2
- 6
1
vote
0 answers
Junit 5 Launcher with jupiter-vintage-engine rule not honoring JUnit4 @ParametrizedTest
I am working on porting a JUnit4 based test framework that uses JUnitCore to launch unit tests with JUnit5 launcher, junit-vintage-engine and a LauncherDiscoveryRequest with ClassSelector.
It is working for all cases except @ParameterizedTest. …

Anand S
- 87
- 1
- 10
0
votes
0 answers
Test classes annotated with import org.junit.jupiter.api.Test; are not getting recognized
Made these changes as part of java 17 and spring boot 3.0.6 upgrade.
Used these imports:
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.junit.jupiter.api.extension.ExtendWith;
import…

aami
- 1
- 1
0
votes
0 answers
Failed to resolve org.junit.vintage:junit-vintage-engine:5.7.2
I have this error qhen i try tu run the Junit Test of a project.
But it only happen with one module that doesn't have any difference with the junit dependencies.
On the other hand, my workmate can run the test of this module without problems, so i…
0
votes
1 answer
Can I use JUnit5 ClassOrderer to shuffle JUnit4 tests run via junit-vintage engine?
If I use JUnit5 to run legacy JUnit4 tests, is there any way to configure it to use ClassOrderer for those JUnit4 classes? I saw in debugger that in org.junit.jupiter.engine.discovery.AbstractOrderingVisitor#orderChildrenTestDescriptors only JUnit5…

tporeba
- 867
- 10
- 23
0
votes
0 answers
junit vintage failed to discover tests: could not find method with name xxx
Im using spockframework and junit5, below is pom:
org.codehaus.groovy
groovy
…

uncle bob
- 570
- 1
- 10
- 21
0
votes
1 answer
JUnit 5 vintage engine for JUnit 4 error: Unsupported version of junit:junit: 4.11. Please upgrade to version 4.12 or later. How to downgrade?
Internal Error occurred.
org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-vintage' failed to discover tests
at…

WesternGun
- 11,303
- 6
- 88
- 157
0
votes
1 answer
Unable to mock mongoRepository instance
import static org.mockito.Mockito.when;
import java.util.ArrayList;
import org.junit.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.platform.runner.JUnitPlatform;
import org.junit.runner.RunWith;
import…
0
votes
0 answers
Spock/VintageTestEngine - Running the selected test for a data-driven test method with several test cases
The main problem is when I use VintageTestEngine I can't search and run selected tests that are part of the data-driven test method.
For example, my test method called name LoginPageTestSuite_ # parameters.TestCaseName is fed with data in the…

Michał Cichoń
- 33
- 10