简体   繁体   English

Jmeter Testing显示api链接的空消息

[英]Jmeter Testing shows null message for api links

在使用JMeter进行记录时,如何处理":/some/api/link"数据,当我再次尝试时,它在“查看结果树”中显示“空”消息。

In the majority of cases you won't be able to record and replay you test as modern applications and web APIs normally use dynamic parameters for authentication and security purposes. 在大多数情况下,由于现代应用程序和Web API通常将动态参数用于身份验证和安全目的,因此您将无法记录和重放测试。 So most probably your Test Plan should look as follows: 因此,很可能您的测试计划应如下所示:

  • 1st request 第一个要求
  • 2nd request where you should replace hard-coded recorded values with the variables defined in the previous step 第二个请求,您应该用上一步中定义的变量替换硬编码的记录值

The easiest way to detect the dynamic parameters is recording your test 2 times and compare the generated requests, you will need to correlate parameters which differ. 检测动态参数的最简单方法是记录两次测试并比较生成的请求,您将需要关联不同的参数。

See API Testing With JMeter and the JSON Extractor for more details. 有关更多详细信息,请参见使用JMeter和JSON Extractor进行API测试

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM