Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用JAVA为selenium功能测试生成测试数据列表_Java_Arrays_List_Selenium Webdriver_Hashmap - Fatal编程技术网

使用JAVA为selenium功能测试生成测试数据列表

使用JAVA为selenium功能测试生成测试数据列表,java,arrays,list,selenium-webdriver,hashmap,Java,Arrays,List,Selenium Webdriver,Hashmap,我正试图形成一个测试数据,用selenium验证每个测试的文本。但在如何使用selenium验证内容方面存在问题。您能否建议如何实现这一点以及如何形成测试数据。我的测试数据实际上如下所示: { "Items": [ { "Title": "Plan", "Type": "secondary", "LinkList": [ { "LinkTarget": "https:

我正试图形成一个测试数据,用selenium验证每个测试的文本。但在如何使用selenium验证内容方面存在问题。您能否建议如何实现这一点以及如何形成测试数据。我的测试数据实际上如下所示:

    {
  "Items": [
      {
        "Title": "Plan",
        "Type": "secondary",
               "LinkList": [
          {
            "LinkTarget": "https://www.yahoo.com",
            "LinkText": "Find a Bar"
          }
        ],
        "active": false
      },
      {
        "Title": "Where We Go",
        "Type": "secondary",
               "LinkList": [
          {
            "LinkTarget": "https://www.google.com",
            "LinkText": "All Restaurants"
          }],
        "active": false
      }
    ]
}

通常,我们必须检查以下标准

1.提交有效测试数据时的系统响应

2.提交无效测试数据时的系统响应

3.未提交数据时的系统响应

4.测试数据格式无效或非法时的系统响应

5.测试边界值条件的数据

6.测试数据与您的用例同步


对于所有这些,您必须编写selenium代码并执行以测试结果。更好地使用TestNG和JUnit之类的框架

谢谢Anju,您能建议使用哪些方法来形成这些数据以及如何迭代每个数据吗