如何在Junit中一次性运行所有方法以进行参数化测试

时间:2018-01-22 07:47:51

标签: junit

   While using parameterized tests in Junit, if there are three test methods(method 1, method 2 and method 3) and 2 input parameters("hello","world").

    Method 1 first runs for hello than World 
    Method 2 runs for hello than world and so on.

    Example: 
    method 1 --> hello
    method 1 --> world
    method 2 --> hello
    method 2 --> world
    method 3 --> hello
    method 3 --> world

有没有办法首先为第一个参数运行所有方法,而不是第二个参数。         例如:

    method 1 --> hello
    method 2 --> hello
    method 3 --> hello
    method 1 --> world
    method 2 --> world
    method 3 --> world

1 个答案:

答案 0 :(得分:0)

不幸的是,如果不编写自己的@Parameterized跑步者,就无法实现自己的目标。

相关问题