1、A @Test method specifies its Data Provider with the dataProvider attribute. This name must correspond to a method on the same class annotated with @DataProvider(name="...") with a matching name.
2、使用DataProviders的方法,可能会执行多次(根据返回的数据的条数)。其它测试方法正常执行,仅执行一次。
3、DataProviders返回的参数类型要与 @Test方法接收的参数类型一致,否则转换错误,见下方截图
4、DataProviders返回参数的顺序和@Test方法接收的参数顺序一致
![](https://img.haomeiwen.com/i8779131/6a6672951ea5daaa.png)
![](https://img.haomeiwen.com/i8779131/67cfd50d32526e3d.png)
![](https://img.haomeiwen.com/i8779131/5b27963a31cfe0b6.png)
网友评论