gpt4 book ai didi

jmeter - Jmeter-获取当前日期和时间

转载 作者:行者123 更新时间:2023-12-03 10:17:43 28 4
gpt4 key购买 nike

我想获取当前日期和时间作为示例日期:2014年11月10日和上午8:30或下午6:00,并将其作为参数传递给我的Jmeter测试。可以帮助我做到这一点。

最佳答案

使用__time函数:

  • $ {__ time(dd / MM / yyyy,)}
  • $ {__ time(hh:mm a,)}

  • 从JMeter 3.3开始,有两个新函数可让您计算时间:

    __timeShift
      "The timeShift function returns a date in the given format with the specified amount of seconds, minutes, hours, days or months added" and 

    __RandomDate
      "The RandomDate function returns a random date that lies between the given start date and end date values." 

    从JMeter 4.0开始:

    dateTimeConvert
    Convert a date or time from source to target format

    如果您想正确学习jmeter,此 book将为您提供帮助。

    关于jmeter - Jmeter-获取当前日期和时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27043029/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com