TestNG using multiple DataProviders with single Test method

前端 未结 3 1648
一向
一向 2020-12-30 11:34

I have been looking for a way to use multiple DataProviders in my test method. My scenario is as follows:

lets say we have a DataProvider class:

@Tes         


        
3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-30 11:57

    Great answer Segmented

    Maybe someone will need it too, I rewrote this method in a different way.

    // public static  T[] concatAll(T[] first, T[]... rest) {
    
    public static Object[] concat(Object[] first, Object[] second) {
            Object[] result = ArrayUtils.addAll(first, second);
            return result;
    

提交回复
热议问题