JMeter:添加两个数字,一个来自函数

时间:2017-01-22 16:05:10

标签: jmeter

我试图以毫秒为单位获取当前时间并将其添加到5分钟...尝试:

BEGIN REQUEST++++++++++++++++++++++++++++++++++++
Request URL = https://polly.eu-west-1.amazonaws.com/v1/voices?LanguageCode=en-US

RESPONSE++++++++++++++++++++++++++++++++++++
Response code: 403

{"message":"The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.\n\nThe Canonical String for this request should have been\n'GET\n/v1/voices\nLanguageCode=en-US\nhost:polly.eu-west-1.amazonaws.com\nx-amz-date:20170122T160127Z\n\nhost;x-amz-date\ne3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'\n\nThe String-to-Sign should have been\n'AWS4-HMAC-SHA256\n20170122T160127Z\n20170122/eu-west-1/polly/aws4_request\n6e1004fbcc11a73baa0c7fe9ff8d5629bada5061fdc8b03fbf307696ea41728d'\n"}

尝试了更多变化,但没有一个变化..

有什么想法吗?

3 个答案:

答案 0 :(得分:1)

你也可以尝试一下。

${__groovy(System.currentTimeMillis()+5*60*1000,)}

答案 1 :(得分:0)

回答自己,与你分享......

这里的解决方案是使用:

for (int i = b; i <= a; i++) {
    String num = String.valueOf(i);
    String reverse = new StringBuilder(num).reverse().toString();
    if (num.equals(reverse)) {
        System.out.println(i);
    }
}

答案 2 :(得分:0)

另一种与常规解决方案相似的替代方法是:

${__jexl2(${__time}+900000)}