JUnit Integration

JUnit integration allows you to execute Testerum tests from your IDE or from your Maven or Gradle build.

For a Junit integration, your Maven or Gradle project needs to depend on:
Testerum Junit Maven dependency:
For the latest com.testerum:testerum-junit version please check Maven Central

For a JUnit Integration example you can see the class src/test/java/com/testerum/JunitTesterumTests.java in our Git Sample project:
Testerum Custom Steps Sample Project

Junit Integration Example:
package com.testerum;

import com.testerum.runner.junit5.TesterumJunitTestFactory;
import java.util.List;
import org.junit.jupiter.api.DynamicNode;
import org.junit.jupiter.api.TestFactory;

public class JunitTesterumTests {

    public List<DynamicNode> testerumTestsFactory() {
        return new TesterumJunitTestFactory("tests")
For this integration your class needs to be defined as a test class and the test factory method needs to be annotated with @TestFactory.

To allow JUnit know about the Testerum tests you need to create a instance of TesterumJunitTestFactory that accepts as a parameter the location of the Testerum tests.
This location can be relative to the project root.

TesterumJunitTestFactory is a builder class that has the following methods:
One big advantage of using the JUnit integration is that you can use breakpoints in your IDE to debug your Custom Steps.

Maven/Gradle Integration

Because of the JUnit Integration you can execute the Testerum tests as part of your build process. In order to execute the test as part of your Maven process just follow the steps from the JUnit Integration and configure Surefire plugin in your Maven build:

                <argLine>-Xmx1024m -Xms128m -Dfile.encoding=UTF8</argLine>