JUnit Runner Spring Plugin example

Fully functional Spring plugin for JUnitRunner

License

License

Categories

Categories

JUnit Unit Testing
GroupId

GroupId

com.github.junitrunner
ArtifactId

ArtifactId

junitrunner-spring
Last Version

Last Version

0.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

JUnit Runner Spring Plugin example
Fully functional Spring plugin for JUnitRunner

Download junitrunner-spring

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.junitrunner/junitrunner-spring/ -->
<dependency>
    <groupId>com.github.junitrunner</groupId>
    <artifactId>junitrunner-spring</artifactId>
    <version>0.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.junitrunner/junitrunner-spring/
implementation 'com.github.junitrunner:junitrunner-spring:0.0.2'
// https://jarcasting.com/artifacts/com.github.junitrunner/junitrunner-spring/
implementation ("com.github.junitrunner:junitrunner-spring:0.0.2")
'com.github.junitrunner:junitrunner-spring:jar:0.0.2'
<dependency org="com.github.junitrunner" name="junitrunner-spring" rev="0.0.2">
  <artifact name="junitrunner-spring" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.junitrunner', module='junitrunner-spring', version='0.0.2')
)
libraryDependencies += "com.github.junitrunner" % "junitrunner-spring" % "0.0.2"
[com.github.junitrunner/junitrunner-spring "0.0.2"]

Dependencies

compile (2)

Group / Artifact Type Version
com.github.junitrunner : junitrunner jar 0.0.2
org.springframework : spring-test jar 3.2.3.RELEASE

test (3)

Group / Artifact Type Version
org.springframework : spring-jdbc jar 3.2.3.RELEASE
org.springframework : spring-context jar 3.2.3.RELEASE
org.hsqldb : hsqldb jar 2.3.1

Project Modules

There are no modules declared in this project.

junitrunner

JUnit Runner implementation which allows different frameworks to collaborate in the same test case.

JUnit allows to ehance test classes in a several ways. Most straigh forward and most used way is to use acustom Runner, via @RunWith annotation. And frameworks like Spring, Unitils, Mockito and others provide those custom Runners for our pleasure. Works like a charm until you want to use 2 frameworks at once. You can only have 1 runner.

So I've created a runner which supports Plugins. From test case developer perspective it should look like:

@Runwith(JUnitRunner.class)
@WithPlugins({SpringPlugin.class,UnitilsPlugin.class})
public class ATest {
...
}

It is my hope that eventually JUnit developers will eventually provide runner like this. But so far they are so enthusiastic. And I hope that framework profiders will start providing / maintaining plugins. For now, I've converted their Runners to Plugins, which should be fully functional.

Versions

Version
0.0.2
0.0.1