TestNG: More than one @DataProvider for one @Test

后端 未结 4 1467
失恋的感觉
失恋的感觉 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 10:59

        @DataProvider
        public Object[][] combinedDataProvider() {
            return Stream.of(dp1(), dp2())
                    .flatMap(Arrays::stream)
                    .toArray(Object[][]::new);
        }
    

提交回复
热议问题