Registry / testing / junit-dataprovider

junit-dataprovider

JSON →
library1.13.1javamavenunverified

TestNG-like data provider runner for JUnit, enabling parameterized tests with external data sources.

<dependency> <groupId>com.tngtech.java</groupId> <artifactId>junit-dataprovider</artifactId> <version>1.13.1</version> </dependency>
INSTALL
IMPORT
SIG · JUNIT-DATAPROVIDER
J
junit-dataprovider
testingjavav1.13.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DataProvider
com.tngtech.java.junit.dataprovider.DataProvider

Use @DataProvider to supply test data to parameterized JUnit tests.

import com.tngtech.java.junit.dataprovider.DataProvider; import com.tngtech.java.junit.dataprovider.DataProviderRunner; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(DataProviderRunner.class) public class MyTest { @DataProvider public static Object[][] data() { return new Object[][] {{1, "one"}, {2, "two"}}; } @Test @UseDataProvider("data") public void test(int number, String word) { // test logic } }
Debug
Known issues
breakingRequires JUnit 4; not compatible with JUnit 5 without additional adapter.
fix
Use JUnit 4 or migrate to JUnit 5 with a compatible extension.
affects: all
Upgrade
Version history
1.13.1latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
junit-dataprovider — mvn dependency:get junit-dataprovider · libregistry