How can Junit 5 implement unit tests with multiple environments? #3809
Replies: 3 comments
-
In Junit 4, the following implementation allows each unit test to be executed in four different environments
|
Beta Was this translation helpful? Give feedback.
-
In JUnit Jupiter, you can write a Please note, however, that Support for class-level parameterization has not yet been implemented in JUnit Jupiter (see #878). |
Beta Was this translation helpful? Give feedback.
-
A rather hacky work around would be create an JUnit Jupiter extension that reads configuration parameters and provides them to tests. Then you can use the JUnit Platform Suite Engine to create a suite for each environment, each suite configured with a a specific set of configuration parameters for that environment. |
Beta Was this translation helpful? Give feedback.
-
In Junit 4, the project implements the execution of each unit test in multiple environments through @RunWith(Parameterized.class), @Parameterized.Parameter(0), and @before. Now I want to upgrade this piece of logic to a Junit5 implementation, but I haven't found a more suitable way to transform it
Beta Was this translation helpful? Give feedback.
All reactions