TestNG: More than one @DataProvider for one @Test

后端 未结 4 1379
失恋的感觉
失恋的感觉 2021-02-02 10:27

I\'m using TestNG for Eclipse.

Is it possible to give two data providers step by step to the same test-function?

I co

4条回答
  •  梦谈多话
    2021-02-02 11:09

    Please refer to this answer:

    TestNG using multiple DataProviders with single Test method

    It is much cleaner and will work for more complex things.

    Maybe someone will need it too, I rewrote this method public static T[] concatAll(T[] first, T[]... rest) in a different way:

    public static Object[] concat(Object[] first, Object[] second) {
        Object[] result = ArrayUtils.addAll(first, second);
        return result;
    }
    

提交回复
热议问题