zoukankan      html  css  js  c++  java
  • 测试脚本

    function sleep(d){
      for(var t = Date.now();Date.now() - t <= d;);
    }
    
    mycars = new Array()
    newmycars = new Array()
    xxi=0
    
     function initte()
     {
            var i =1;
    
         while (i<8)
         {
            mycars.push(i)
            i++
         }
    
    }
    
    
     function runte()
     {
     
    
    
    
      if(mycars.length==0)
      {
            return;
      }
    
    
    
    
     xxi=mycars.pop();
     console.log('mycars[xxi]=');
     console.log(xxi);
    
       sleep(3000);
    
       commitForECMA(callbackCA,'content.jsp?tableId=25&tableName=TABLE25&tableView=境内生产药品备案信息公示&Id='+xxi,null)
      
        
     
     }
    
     function callbackCA()
     {
         console.log("mycars[xxi] end");
         console.log(xxi);
              console.log(request);
    
         if(request.readyState==4) // 重试
         {
     
             if(request.status!=200) // 重试
             {
                newmycars.push(xxi)
             }
             
             if(mycars.length==0)
            {
             sleep(3000);
            mycars=newmycars;
            newmycars = new Array(); 
            }
    
    
            if(mycars.length>0)
          {
           runte();
          }
          else
          {
           console.log('完成');
          }
    
    
         }
     }
    
     initte();
    
     runte();
    
    
    
    
    
    
    
     commitForECMA(callbackCA,'content.jsp?tableId=25&tableName=TABLE25&tableView=境内生产药品备案信息公示&Id=9',null)
      
  • 相关阅读:
    shell test条件判断
    shell 变量
    shell 流程结构
    shell 正则表达式
    shell脚本常用参数
    snmp 简单的网络管理协议
    linux
    nmap
    git 基础操作
    linux 下 svn 更新代码
  • 原文地址:https://www.cnblogs.com/CoreXin/p/14688538.html
Copyright © 2011-2022 走看看