Running test script recorder error in JMeter

Nisha V

I have to perform load testing of a particular application and am using JMeter for that.

In my application, I have a unique access token which will be obtained on successful login and this token has to be passed to the consecutive requests to obtain the response.

Now I have added a recorder for my test plan and ran the HTTP test script recorder.all the browser action is recorded in the recorder of the test plan. the structure of my test plan and workbench is as mentioned below.

**Testplan-**  
     *Threadgroup*  
         Recorder-  
//inside the recorder   
            [Request1-login  
            Request2-To load the uploaded images by the corresponding user]  
//Outside the recorder inside the thread group,  
         View Results Tree  
HTTP Cache Manager  
HTTP Coockie Manager  
**WorkBench**  
HTTP(s) Test Script Recorder

By default, there is a header manager for each request when recorded what I did was to add the extracted token obtained using json extracter of the request1 to the header manager of the request2 in the recorded script.

The token is getting passed along with the request header as shown below but the response obtained is unauthorised.

Request Headers:

Connection: keep-alive  
Referer: http://localhost/  
Accept-Language: en-US,en;q=0.5  
Origin: http://localhost  
Content-Type: application/json;charset=utf-8
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0
Accept: application/json, text/plain, */*
Authorisation:91kLM68tdMBoDFRURArvdmwYgWV9Nr2sHYDwivTM.91kLM68tdMBoDFRURArvdmwYgWV9Nr2sHYDwivTM.Arvdm_M68-BoDFRURArvdmwYgWV9Nr2sHYDwivTM  
Content-Length: 0  
Host: http://localhost/phpmyadmin/index.php  

I have checked the same token in postman and am obtaining the correct response.

am I missing out something?Is there anything else I have to take care of before running the recorded test script?Please help

UBIK LOAD PACK

Compare exactly (Header + Body) requests :

  • sent by postman
  • vs request sent by JMeter

There must be a difference somewhere.

And in CookieManager ensure you have set Policy to "standard" if using JMeter 3.x

As per your comment:

  • Authorization was misspelled (Authorisation)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Difference between Test Script Recorder in JMeter and BlazeMeter

JMeter "Content encoding Error" when using FireFox and HTTP(S) Test Script recorder

Apache JMeter HTTP(S) Test Script Recorder not generating samples

I'm not able to save the response of view result tree under HTTP test Script recorder in JMeter)

Jmeter script recorder and recording for multiple users/threads

JMeter test not running

Jmeter Test steps recorder is not saving the steps after stop the record

Unable to test mobile application using Test Script Recorder

Running different test scripts in same file using Robotium Recorder

jmeter is not running script in the order it is written

JMeter Recorder is not working with HTTPS

When running load test for Kafka messaging with Jmeter from Jenkins server getting an error

Getting Transformer exception while running Jmeter script

When running a script - Error no test specified appears. How do I make the script run correctly?

Error when running a script

Can jmeter cli tools record a test script?

Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver' error display while running JMeter load test in VSTS

Error running sampler with http request- Jmeter

Error: Unknown option -g when running JMeter

JMeter error when generating dashboard at end of test

Jmeter test in Jenkins fails with "errorlevel=255" error

In ansible, why am I getting these error when running the script? what is the simple ansible script that i could use to test?

Error when running a python script

error when running .awk script

ModuleNotFoundError error when running script

Error while running script with nohup

Error when running script in bash

Error when running screeps Script

Error running a pygame script with python