JMeter:如何为此请求编写正则表达式提取器 URL
JMeter: How to write regular expression extractor for this request URL
(//test-clinicalpl.hee.heaelth.nz/nzty/?encryptedRequest=B3616B90E8CD11B90E99022FE7998834453B92493671C1AF3DB24346493F5364579EF1E9A9FED64B25E1593A3EF768A887B89E5A5A73EDD7BD6D88A1C4ED2D0E994820BEE64B410113603687174086C8B0FEEFF051774184&mac=6252A91F473FD4F4C66E17A7928AFAA48E0E612A&expiry=0000016954D411EC
encryptedRequest
、mac
和 expiry
是每次
的动态值变化
我写这个是因为有正则表达式提取器,如下所示:
encryptedRequest= (.*?)& mac=(.*?)& expiry=(.*?)
右键单击请求并添加post处理器:Regular Expression Extractor.
使用这个 RegExp
encryptedRequest=(.*)&mac=(.*)&expiry=(.*)
指定变量名,例如myEncryptedRequest
设置模板 - $
用于第一个匹配($
- 用于第二个 mac
,等等)。
在下一个请求中使用此值作为 ${myEncryptedRequest}
您可以添加更多正则表达式提取器来解析其他值。
请参考JMeter component reference for more details and Guide how to extract and re-use as variable
(//test-clinicalpl.hee.heaelth.nz/nzty/?encryptedRequest=B3616B90E8CD11B90E99022FE7998834453B92493671C1AF3DB24346493F5364579EF1E9A9FED64B25E1593A3EF768A887B89E5A5A73EDD7BD6D88A1C4ED2D0E994820BEE64B410113603687174086C8B0FEEFF051774184&mac=6252A91F473FD4F4C66E17A7928AFAA48E0E612A&expiry=0000016954D411EC
encryptedRequest
、mac
和 expiry
是每次
我写这个是因为有正则表达式提取器,如下所示:
encryptedRequest= (.*?)& mac=(.*?)& expiry=(.*?)
右键单击请求并添加post处理器:Regular Expression Extractor.
使用这个 RegExp
encryptedRequest=(.*)&mac=(.*)&expiry=(.*)
指定变量名,例如
myEncryptedRequest
设置模板 -
$
用于第一个匹配($
- 用于第二个mac
,等等)。在下一个请求中使用此值作为
${myEncryptedRequest}
您可以添加更多正则表达式提取器来解析其他值。
请参考JMeter component reference for more details and Guide how to extract and re-use as variable