@ is not getting decoded to @ in Jmeter

后端 未结 3 1305
猫巷女王i
猫巷女王i 2021-01-25 03:20

I\'m trying Jmeter tool for load testing where i\'m feeding the data through a csv file which has all the emails and passwords for login request. But while passing the parameter

相关标签:
3条回答
  • 2021-01-25 03:31

    It should be totally expected.

    If you're logging in via GET request %40 is correct way of encoding @ symbol.

    If you're sending a POST request, JMeter should automatically send @ symbol (at least my JMeter 2.10 does)

    You might wish to try one of following:

    1. Add View Results Tree listener, switch to HTTP tab and see what's actually being sent.
    2. Make sure that Encode? box is unchecked for email parameter
    3. Explicitly tell JMeter to decode email via __urldecode() function
    4. Use a Beanshell Pre Processor to properly encode/decode your email

      import java.net.URLDecoder;
      import java.net.URLEncoder;
      
      String email = "someone@example.com";
      String encoded = URLEncoder.encode(email, "UTF-8");
      String decoded = URLDecoder.decode(encoded, "UTF-8");
      
    0 讨论(0)
  • 2021-01-25 03:42

    For the HTTP Request, Change the Client implementation to Java

    1. Select the Advanced tab from the HTTP Request
    2. In Client Implementation > Choose Java in Implementation

    0 讨论(0)
  • 2021-01-25 03:43

    This is coming when we do via Parameters, If we do using "Body Data" that would work fine.

    I used this way. {"password":"${password}","emailId":"${emailId}"}

    0 讨论(0)
提交回复
热议问题