Skip to content

JUnitFactoryRunner and @JUnitFactory allow you to create JUnit tests dynamically. Like annotation @factory in TestNG.

Notifications You must be signed in to change notification settings

Megaprog/JUnitFactory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 

Repository files navigation

#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();
    }
}

About

JUnitFactoryRunner and @JUnitFactory allow you to create JUnit tests dynamically. Like annotation @factory in TestNG.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages