Writing a Simple JMeter Script

I need to write a script that does the following (it doesn’t matter which website I only do this to learn and practice):

  • Simulates HTTP requests (method: get)
  • Reads parameters from a document and uses them in a script
  • Saves the expression from the query response and uses it as a parameter in the next query
  • Saves output to a file

After hours of reading the documentation and watching some video tutorials, I can easily control step 1. I have a small idea on how to do steps 2 and 4, although it is likely that I will not do them effectively. And unfortunately, I have no idea how to do step 3.

Can someone help me in these steps, please, or at least give me good links to tutorials that might help me (I found the official guide is too confusing)?

Here are some links that I used to learn this tool: For step 1 and for step 2 they helped a little, but more is welcome.

+8
performance automation jmeter load
source share
3 answers

The best Jmeter documentation sources that I know of are found in the Documentation section of the JMeter website: user guide and best practices (for starters), Component Link and Function Link (as soon as you are comfortable with the basic capabilities of Jmeter) .

Especially you should read 4th , 5th and 6th in the “User Guide” section, which will give you answers to those and other questions that you have.

Nevertheless, I have to give the answers myself:

  • Use HTTP Request Sampler
  • Use CSV data configuration
  • Use PostProcessor. I think the most useful would be a Regular Expression Extractor, which will extract data into a variable, and then you can use this variable as ${variable} in your test
  • I assume that you are referring to test results by conclusions. If so, use Listeners. In my experience, the most useful listeners are Simple Data Writer, View Tree Tree (for debugging only), Time -delayed response from Jmeter plugins. Please note that in order to minimize resource usage, only Simple Data Writer should be activated when you eventually run your test against SUT.

Once you are comfortable with the capabilities of JMeter, note that it does not have useful functionality, but exists in JMeter plugins :

+7
source share

Use post processors such as regular expression extractors, JSON extractors to extract any values.

Add these mail processors as a child of the samplers and the name http, enter the regular expression, pattern ...

http://regex101.com/ - the best site for testing your regular expressions

To use the extracted value in your script, use $ {variable_name}

For more information, please read this article.

0
source share

For simpler steps, you can refer to the following blog: 3 Simple JMeter Script Ways

-one
source share

All Articles