junit5 support? #94

Closed
FunThomas424242 opened this Issue Oct 9, 2016 · 4 comments

Comments

Projects
None yet
4 participants
@FunThomas424242

FunThomas424242 commented Oct 9, 2016

Feature-Request
Hello, is there a way to reallize parameterized tests with JUnitParams at junit 5?

@ledoyen

This comment has been minimized.

Show comment
Hide comment
@ledoyen

ledoyen Feb 21, 2017

Hello,

An issue already exists for parameterized tests support in JUnit5 project
junit-team/junit5#14

It is apparently waiting for @TestTemplate to be merged : https://github.com/junit-team/junit5/tree/issues/14-test-template

ledoyen commented Feb 21, 2017

Hello,

An issue already exists for parameterized tests support in JUnit5 project
junit-team/junit5#14

It is apparently waiting for @TestTemplate to be merged : https://github.com/junit-team/junit5/tree/issues/14-test-template

@woprzech

This comment has been minimized.

Show comment
Hide comment
@woprzech

woprzech Apr 8, 2017

Contributor

After last milestone JUnit5 supports parametrized tests :
http://junit.org/junit5/docs/current/user-guide/#writing-tests-parameterized-tests

Contributor

woprzech commented Apr 8, 2017

After last milestone JUnit5 supports parametrized tests :
http://junit.org/junit5/docs/current/user-guide/#writing-tests-parameterized-tests

@woprzech woprzech closed this Apr 8, 2017

@kibertoad

This comment has been minimized.

Show comment
Hide comment
@kibertoad

kibertoad Jul 19, 2017

JUnit 5 parametrized tests are terrible, you cannot have parameter pairs (e. g. to specify both input and asserted value) without boilerplate code in the form of provider method.

It's not a good replacement for JUnitParams, so we still need a JUnit 5-compatible version of them.

JUnit 5 parametrized tests are terrible, you cannot have parameter pairs (e. g. to specify both input and asserted value) without boilerplate code in the form of provider method.

It's not a good replacement for JUnitParams, so we still need a JUnit 5-compatible version of them.

@ledoyen

This comment has been minimized.

Show comment
Hide comment
@ledoyen

ledoyen Jul 19, 2017

JUnit5 parameterized tests provides a pretty simple solution to give parameter tuples by annotation:

@DisplayName("Display name of container")
@ParameterizedTest(name = "{index} ==> first=''{0}'', second={1}")
@CsvSource({ "foo, 1", "bar, 2", "'baz, qux', 3" })
void testWithCustomDisplayNames(String first, int second) {
}

ledoyen commented Jul 19, 2017

JUnit5 parameterized tests provides a pretty simple solution to give parameter tuples by annotation:

@DisplayName("Display name of container")
@ParameterizedTest(name = "{index} ==> first=''{0}'', second={1}")
@CsvSource({ "foo, 1", "bar, 2", "'baz, qux', 3" })
void testWithCustomDisplayNames(String first, int second) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment