zoukankan      html  css  js  c++  java
  • jmeter beanshell postprocessor 使用

    String newtoken=bsh.args[0];
    print(newtoken);
    ${__setProperty(newtoken,${token},)};

    String newcompanyId=bsh.args[1];
    print(newcompanyId);
    ${__setProperty(newcompanyId,${companyId},)};

    String newuserId=bsh.args[2];
    print(newuserId);
    ${__setProperty(newuserId,${userId},)};

    String newuserName=bsh.args[3];
    print(newuserName);
    ${__setProperty(newuserName,${userName},)};

    String neworgCode=bsh.args[4];
    print(neworgCode);
    ${__setProperty(neworgCode,${orgCode},)};

    String newcostCenterName=bsh.args[5];
    print(newcostCenterName);
    ${__setProperty(newcostCenterName,${costCenterName},)};

    String newprofitCenterName=bsh.args[6];
    print(newprofitCenterName);
    ${__setProperty(newprofitCenterName,${profitCenterName},)};

    String newcostCenterID=bsh.args[7];
    print(newcostCenterID);
    ${__setProperty(newcostCenterID,${costCenterID},)};

    parameters 写法 参数之间必须 空格 ,

    ${token} ${companyId} ${userId} ${userName} ${orgCode} ${costCenterName} ${profitCenterName} ${costCenterID}

    否则  bsh.args[0]里面没有内容会报错

    2018-12-20 00:03:24,131 ERROR o.a.j.u.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: ``String newtoken=bsh.args[0]; print(newtoken); ; String newcompanyId=bsh.args[1] . . . '' : Typed variable declaration

  • 相关阅读:
    博客转载
    OD加载dll
    异常原理
    内核与用户模式
    简单HOOK流程
    进程与线程复习知识点
    网络编程基础
    001字符串与数字的互相转换,错误处理,消息泵机制,以及回调函数,注册窗口基本流程
    002WINDOW窗口相关点 控件基础
    WINDOW编程基础 API函数 总结翻译
  • 原文地址:https://www.cnblogs.com/python-xiakaibi/p/10147186.html
Copyright © 2011-2022 走看看