zoukankan      html  css  js  c++  java
  • 玩转----jmeter函数助手

    ##常用函数的介绍

    __time 函数

    获取系统的当前时间 image_1cs6ok13j1ru1nsg1e2t1ormuep9.png-52.6kB

    函数参数描述
    Format string for SimpleDateFormat (optional)格式 设置时间所采用的格式
    Name of variable in which to store the result (optional)变量名 存储结果的变量名称

    如果省略了格式字符串,time函数会返回当前时间的毫秒级时间戳。 time函数包含以下时间格式

    • YMD = yyyyMMdd。 image_1cs6p31gv4531l2461pe741k511j.png-16.1kB
    • HMS = HHmmss。 image_1cs6p48d31h8corv1c671gaf1mkk20.png-13.8kB
    • YMDHMS = yyyyMMdd-HHmmss。 image_1cs6p259ffc1624j1ccpq1sv016.png-18.2kB
    • 也可以加入字符修改样式 image_1cs6p7spd19lu1lt31bim1rlkftr2d.png-17.3kB
    • 用户可以通过修改JMeter属性来改变默认格式,例如,time.YMD=yyMMdd。

    time毫秒时间戳转秒时间戳 image_1cs6phinrnj31cs91d6k8nabib3a.png-93kB

    __Random 函数

    生成随机数

    函数参数描述
    FThe minimum value allowed for a range of value 随机数取值范围的最小值
    The maximum value allowed for a range of values 取值范围的最大值
    Name of variable in which to store the result (optional) 存储结果的变量名称
    • 在1000-10000之间生成随机数

    image_1cs6pv0thi0fdko692rgfqqs3n.png-91.7kB

    __RandomString

    随机生成字符串

    函数参数描述
    Random string length 随机字符串的长度
    Chars to use for random string generation 用来生成随机字符串的字符
    Name of variable in which to store the result (optional) 存储结果的变量名称

    __RandomDate

    随机生成日期

    函数参数描述
    Format string for DateTimeFormatter (optional) (default yyyy-MM-dd) 日期格式 默认yyyy-mm-dd
    Start date (optional) (default: now) 随机日期的开始日期,默认为现在
    End date 结束日期
    String format of a locale (ex: fr_FR , en_EN) (optional) 语言区域
    Name of variable in which to store the result (optional) 存储结果的变量名称

    image_1cs815tao97jpdaut453g12h4p.png-69.1kB

    __threadNum

    返回当前线程的编号

  • 相关阅读:
    C#中类与结构体的区别
    计算机快捷键
    ArcSDE简单介绍
    SQLServer存储过程
    (ArcGIS Server10.0)Windows无法启动ArcGIS Server Object Manager服务(位于本地计算机上)。错误1067
    安装arcgis10.0出现localhost上运行的许可管理器版本不正确
    地理空间数据获取(二)
    地理空间数据免费获取(一)
    angular实现对百度天气api跨域请求
    angular实现跨域
  • 原文地址:https://www.cnblogs.com/zsplovezsp/p/12055248.html
Copyright © 2011-2022 走看看