There is a case to handle Square Brackets [] in Jmeter Request Ex : /api/v1/user/userlist/user[id]/7203/user[roles]/coe
How to handle this
There is a case to handle Square Brackets [] in Jmeter Request Ex : /api/v1/user/userlist/user[id]/7203/user[roles]/coe
How to handle this
I don't think you can have characters like [
and ]
in URL Path, see Characters allowed in a URL question for comprehensive information
You need to encode:
[
- to %5B
]
- to %5D
If your URL path comes from external source you can do this automatically using JSR223 PreProcessor and the following Groovy code:
sampler.setPath(sampler.getPath().replaceAll('\\[','%5B').replaceAll('\\]','%5D'))
Change the implementation type to Java in the HTTP Request Sampler
working fine.... enter image description here