Junit Dataprovider

A JUnit5 Parameterized implementation (Similar to TestNG DataProvider)

Лицензия

Лицензия

Категории

Категории

IDE Инструменты разработки JUnit Тестирование компонентов Данные
Группа

Группа

com.kncept.junit5.dataprovider
Идентификатор

Идентификатор

junit-dataprovider
Последняя версия

Последняя версия

0.9.3-M6
Дата

Дата

Тип

Тип

jar
Описание

Описание

Junit Dataprovider
A JUnit5 Parameterized implementation (Similar to TestNG DataProvider)
Ссылка на сайт

Ссылка на сайт

https://github.com/kncept/junit-dataprovider
Система контроля версий

Система контроля версий

https://github.com/kncept/junit-dataprovider

Скачать junit-dataprovider

Как подключить последнюю версию

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

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.junit.jupiter : junit-jupiter-api jar 5.0.0-M6

test (1)

Идентификатор библиотеки Тип Версия
org.junit.jupiter : junit-jupiter-engine jar 5.0.0-M6

Модули Проекта

Данный проект не имеет модулей.

junit-dataprovider Build Status

This plugin is outdated. JUnit5 contains this functionality in its core

Dataprovider like functionality for JUnit5.

See ExampleUseCasesTest for a more detailed example.

Usage should generally follow the follow pattern of snippets:

import static com.kncept.junit.dataprovider.testfactory.TestFactoryCallback.instanceProvider;

@TestFactory
public Collection<DynamicTest> testFactory() {
	return instanceProvider(this);
}

@ParameterSource(name = "src1")
public static List<Object[]> src1() {
	return asList(
			new Object[]{"val1"},
			new Object[]{"val2"}
	);
}

@ParameterisedTest(source = "src1")
public void checkValue(String value) {
	assertNotNull(value);
}

The @Disabled and @DisplayName anotations from Junit5 are supported.

This plugin uses the DynamicTest functionlaity of Junit5 to replicate the old JUnit4 @Parameterized or TestNG DataProvider style of tests.

Simply ensure that the distribution jar is on the test classpath, then use it as in the example. N.B. This release is compiled against the JUnit 5.0.0-M6 Milestone release.

The jar is available on Maven Central

testCompile 'com.kncept.junit5.dataprovider:junit-dataprovider:0.9.3-M6'

<dependency>
    <groupId>com.kncept.junit5.dataprovider</groupId>
    <artifactId>junit-dataprovider</artifactId>
    <version>0.9.3-M6</version>
</dependency>

This plugin uses the same license as (most of) JUnit5 - EPL 1.0.

Enjoy.

Версии библиотеки

Версия
0.9.3-M6
0.9.2-M3
0.9-M3