Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to test redirects in JMeter

We have changed our web servers. Now, I want to test if the redirects that we've put into are working properly. I've a csv file that lists all these redirects. For example, "url-prev, url-next".

Is there a way I can use JMeter to do this. I'm guessing I can use some assertions to check this.

Thanks in advance for your replies.

--Ishtiaque

like image 433
Ishtiaque Hussain Avatar asked Dec 06 '25 08:12

Ishtiaque Hussain


1 Answers

To do that you'll use:

  • CSV Data Set to load the CSV rows into 2 Variables url-prev,url-next

CSV Config

  • HTTP Request to call the URL but NOT follow redirect

HTTP Request using pre-url

  • Response Assertion working on Response Header and checking location is ${url-next}

Response assertion on location

  • Response Assertion working on Response Code and checking it is equal to 301, 302

Response assertion on code

like image 112
UBIK LOAD PACK Avatar answered Dec 07 '25 20:12

UBIK LOAD PACK