JUnitFactory

It is allow to create JUnit tests dynamically how the annotation @Factory in TestNG does

License

License

Categories

Categories

JUnit Unit Testing
GroupId

GroupId

org.jmmo
ArtifactId

ArtifactId

junit-factory
Last Version

Last Version

1.1
Release Date

Release Date

Type

Type

jar
Description

Description

JUnitFactory
It is allow to create JUnit tests dynamically how the annotation @Factory in TestNG does
Source Code Management

Source Code Management

https://github.com/Megaprog/JUnitFactory

Download junit-factory

How to add to project

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

Dependencies

compile (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

#JUnitFactory

JUnitFactoryRunner and @JUnitFactory allow you to create JUnit tests dynamically how the annotation @Factory in TestNG does.

How to get it?

You can download the latest build at: https://github.com/Megaprog/JUnitFactory/releases

Or use it as a maven dependency:

<dependency>
    <groupId>org.jmmo</groupId>
    <artifactId>junit-factory</artifactId>
    <version>1.1</version>
    <scope>test</scope>
</dependency>

How to use it?

import org.junit.runner.RunWith;
import org.jmmo.testing.JUnitFactoryRunner;
import org.jmmo.testing.JUnitFactoryRunner.JUnitFactory;

@RunWith(JUnitFactoryRunner.class)
public class SomeSuite {

    @JUnitFactory
    public static ATest test1() {
        return new ATest("abc", 2);
    }

    @JUnitFactory
    public static BTest test2() {
        return new BTest();
    }
}

Versions

Version
1.1
1.0