Wednesday, June 2, 2010

Tip #12: How to add HTTP Request sampler with dynamic URL

If you need to add HTTP Request sampler with dynamic URL that can be different each time from testing to testing you must use one of the Post-Processors offered by JMeter. I usually use Regular Expression Extractor for this purposes.

So, let's imaging that you have "Popular News" web page which contains the links to "News Story" web pages that contains the full texts of news and you want to write a test which will include both "News" page and random "News Story" page.

For this you must include "News" page HTTP Request sampler inside Simple Controller with a Regular Expression Extractor to store random "News Story" page URL to a variable:


Then use the variable with the stored random "News Story" page URL in "News Story" HTTP sampler:

17 comments:

  1. Hi Victor, my name is Santiago I´m using JMeter but I´m newer in it, and your explanations about JMeter is very short.
    Can you explain a bit more? Please help me.

    ReplyDelete
  2. Santiago, JMeter has good user manual which explains all the things and my blog is about tips and tricks only.

    ReplyDelete
  3. Hi Victor,
    can you please let me know what is the stable JMeter version ? I see 2.4 is latest and i worry it can be buggy, Is 2.3.4 is Stable ?

    Thank u ,

    -Raja

    ReplyDelete
  4. head way, 2.3.4 is stable and works good for me. I still did not use 2.4 and can't say you anything about it.

    ReplyDelete
  5. Thank Victor ur article is my life saver

    Thank again !!

    ReplyDelete
  6. Hi Victor,

    Have you worked on simulating video streaming using Jmeter.

    Ypu may refer to 'http://jmeter.512774.n5.nabble.com/How-can-we-achieve-RTMP-video-streaming-using-JMeter-td5119240.html' for additional details.

    Thanks,
    Vipul Kane
    kanevipul87@gmail.com

    ReplyDelete
  7. Exactly what I was looking for. Perfect. Thank you!

    ReplyDelete
  8. thanks Victor.This is very helped to me

    ReplyDelete
  9. you have written an excellent blog.. keep sharing your knowledge...
    JMeter Training in Chennai
    JMeter Certification

    ReplyDelete