在jmeter中设置整个请求网址 [英] Set the whole request url in jmeter

查看:200
本文介绍了在jmeter中设置整个请求网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个请求,该请求将上传网址作为响应正文.

I have a request, which gives upload url as response body.

{
    "uploadUrl": "https://test.com:9000/sample_uploadurl"
}

我能够使用JSON提取器提取uploadUrl.

I'm able to extract the uploadUrl using JSON extractor.

我想在下一个http请求中使用以上上传网址.如何在此处设置新请求?

I want to use above upload url to in next http request. How to set the new request here ?

直接添加可做的工作,因为JMeter在请求之前会先添加http/https,在这种情况下,我们已经有了https.

adding directly doent work, because JMeter prepends http/https before request, in this case we already have https.

失败了,因为它有https://[https://test.com:9000/sample_uploadurl]

推荐答案

离开 HTTP请求字段(路径除外)为空,将其放在其中,变量将被执行

Leave HTTP Request fields empty except Path, put there the variable and it will be executed

在特殊情况下,如果路径以"http://"或"https://"开头,则将其用作完整的URL.

As a special case, if the path starts with "http://" or "https://" then this is used as the full URL.

示例

这篇关于在jmeter中设置整个请求网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆