zoukankan      html  css  js  c++  java
  • java编写Loadrunner脚本

    web.set_max_html_param_len("1000000");
    lr.start_transaction("red_envelop");
    web.reg_find("Text="status":"1"",
    new String[]{
    "SaveCount=before_count",
    web.LAST //"LAST"
    });

    web.submit_data("agentlogin.do",
    "Action=http://172.16.10.21:8080/hoss-society/app4/login/agentlogin.do",
    new String[]{

    "Method=POST",
    "TargetFrame=",
    "RecContentType=text/html",
    "Referer=http://172.16.10.21:8080/hoss-society/app4/login/agentlogin.do",
    "Snapshot=t8.inf",
    "Mode=HTML"
    },
    new String[]{
    "Name=nonce", "Value=123456", web.ENDITEM,
    "Name=timestamp", "Value=1430890357514", web.ENDITEM,
    "Name=user_pass", "Value=123456", web.ENDITEM,
    "Name=user_name", "Value=18911111119", web.ENDITEM,
    "Name=appKey", "Value=qqb", web.ENDITEM,
    "Name=digest", "Value=dq4ndffodLdmdHcnuuWrty4rde3n1i2rJDdneu=odLgn", web.ENDITEM,
    web.LAST});

    lr.output_message("The count value is " + lr.eval_string("<before_count>"));

    if(Integer.parseInt(lr.eval_string("<before_count>"))==0)
    {
    //lr.output_message("The phone value is " + lr.eval_string("{phone}"));
    lr.end_transaction("red_envelop", lr.FAIL);
    }
    else
    {
    lr.end_transaction("red_envelop", lr.PASS);
    }
    //System.out.println("hello world");
    //HelloWorld.main((String[])null);
    return 0;

  • 相关阅读:
    NSURLSessionDataDelegate 文件下载
    NSURLConnection 大文件下载
    全屏滑动
    qq粒子效果
    iOS 技巧
    iOS 15 新特性适配
    iOS 字符串转json 字符串转数组
    iOS 微信分享显示未验证应用2
    iOS 微信分享显示未验证应用1
    iOS 隐藏系统音量提示框
  • 原文地址:https://www.cnblogs.com/hushaojun/p/4515123.html
Copyright © 2011-2022 走看看