• dataprovider testng sample


    @DataProvider      数据源,标记的方法必须返回Object[][]类型。每个Object[]可以是一个参数列表。

    参数:Name       数据源名称

    This method will provide data to any test method that declares that its Data Provider is named "test1"

    @DataProvider(name = "test1")

    public Object[][] createData1() {

    return new Object[][] {

    {
    "Cedric", new Integer(36) },

    {
    "Anne", new Integer(37)},

    };

    }

    //This test method declares that its data should be supplied by the Data Provider named "test1"

    @Test(dataProvider = "test1")

    public void verifyData1(String n1, Integer n2) {

    System.out.println(n1
    + " " + n2);

    }
  • 相关阅读:
    HTML5: HTML5 Video(视频)
    HTML5: HTML5 Geolocation(地理定位)
    HTML5: HTML5 拖放
    HTML5: HTML5 MathML
    HTML5: HTML5 内联 SVG
    HTML5: HTML5 Canvas
    HTML5: HTML5 新元素
    HTML5: 浏览器支持
    HTML5: HTML5 介绍
    HTML5: 目录
  • 原文地址:https://www.cnblogs.com/zhangfei/p/2717212.html
Copyright © 2020-2023  润新知