-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
junit5 console launcher doesn't run Junit4 tests #76
Comments
Thanks for creating this new issue and providing more details. One more question: what is the file/class name of you JUnit 4 test? |
CalculatorJunit4Tests.java |
Okay, the <junitlauncher haltOnFailure="true" printSummary="true">
<classpath refid="test.classpath"/>
<testclasses outputdir="build/test-report">
<fileset dir="build/test">
<include name="**/*Tests.class"/>
<include name="**/*Test.class"/>
</fileset>
... Now to the content of |
Looks like |
package com.example.project; import org.junit.Test;
class CalculatortJunit4Tests{
@Test(expected = AssertionError.class)
public void assertErrorOldStyle() {throw new AssertionError(); }
} |
JUnit 3 and 4 classes need to be |
Thanks! that worked..but a quick question |
Yes, we are, and we do. Via the JUnit 5 standalone distribution "all-deps-are-in" happy jar being copied to the
This standalone jar contains all what it is needed to run Jupiter and Vintage (JUnit 3 + 4) tests. |
Great! Thanks |
You're welcome. |
I've forked this https://github.com/junit-team/junit5-samples/tree/master/junit5-jupiter-starter-ant
I then added a sample Junit4 test under test junit5-jupiter-starter-ant/src/test/java/com/example/project/
Launcher o/p:
Ran the build.sh expecting the vintage engine to show the run o/p.
My new class is not being picked by vintage
The text was updated successfully, but these errors were encountered: