Examples of IftTestCase


Examples of cn.baiweigang.qtaf.ift.testcase.IftTestCase

    String[] argKey = readCase.readArgKey();// 获取参数key
    // 设置测试集名称,Excel中未存储,从判断传入的path为excel时设置
    // casesetName=readcase();
    // 获取用例数据
    for (int j = IftConf.paramStartRow; j < readCase.getRowNum(); j++) {
      IftTestCase tempcase = new IftTestCase();
      tempcase.setArgCount(getArgcount());
      tempcase.setHttpMethod(getHttpMethod());
      tempcase.setUrl(getUrl());
      tempcase.setCookie(this.cookie);
      // 读取【j+1】行的数据
      String[] argValue = readCase.readArgValue(j);
//      System.out.print("行:"+j+"    参数个数"+argValue.length+argValue[1]+"\n");
      if (!argValue[IftConf.isRunCol].equals("Y")) {
        continue;
      } else {
        // 把数据和标题一一对应存入LinkedHashMap有序键值对中
        LinkedHashMap<String, String> mycase = new LinkedHashMap<String, String>();
        for (int i = 0; i < argKey.length; i++) {
          // 判断此条记录是否有cookie参数,如果有且不为空替换全局cookie
          if (null != argValue[i] && argKey[i].equals("cookie") && argValue[i].length() > 0) {
            tempcase.setCookie(argValue[i]);
          }
          mycase.put(argKey[i], argValue[i]);
        }
        arrCase.add(mycase);
        tempcase.setCaseMap(mycase);
        tempcase.setCaseId(mycase.get("CaseID"));
        tempcase.setTestPoint(mycase.get("TestPoint"));
      }
      this.testCase.add(tempcase);
    }
  }
View Full Code Here

Examples of cn.baiweigang.qtaf.ift.testcase.IftTestCase

    String[] argKey = readCase.readArgKey();// 获取参数key
    // 设置测试集名称,Excel中未存储,从判断传入的path为excel时设置
    // casesetName=readcase();
    // 获取用例数据
    for (int j = IftConf.paramStartRow; j < readCase.getRowNum(); j++) {
      IftTestCase tempcase = new IftTestCase();
      tempcase.setArgCount(getArgcount());
      tempcase.setHttpMethod(getHttpMethod());
      tempcase.setUrl(getUrl());
      tempcase.setCookie(this.cookie);
      // 读取【j+1】行的数据
      String[] argValue = readCase.readArgValue(j);
//      System.out.print("行:"+j+"    参数个数"+argValue.length+argValue[1]+"\n");
      if (!argValue[IftConf.isRunCol].equals("Y")) {
        continue;
      } else {
        // 把数据和标题一一对应存入LinkedHashMap有序键值对中
        LinkedHashMap<String, String> mycase = new LinkedHashMap<String, String>();
        for (int i = 0; i < argKey.length; i++) {
          // 判断此条记录是否有cookie参数,如果有且不为空替换全局cookie
          if (null != argValue[i] && argKey[i].equals("cookie") && argValue[i].length() > 0) {
            tempcase.setCookie(argValue[i]);
          }
          mycase.put(argKey[i], argValue[i]);
        }
        arrCase.add(mycase);
        tempcase.setCaseMap(mycase);
        tempcase.setCaseId(mycase.get("CaseID"));
        tempcase.setTestPoint(mycase.get("TestPoint"));
      }
      this.testCase.add(tempcase);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.