I want to do load testing with 100 users. Please let me know what are the components to use in jmeter. Please suggest me the best way to achieve the best results.
You should use the following components in JMeter for creating and running you script:
- Test Plan
- Thread Group
- HTTP Request Default
- Cookie Manager (if your application have any cookies or your script uses any kind of session)
- Cache Manager (for managing the caching, if there is any)
- Controllers (Simple or Recording or Transaction, depending upon your need)
- HTTP Samplers (if you are using recording option then you don't need to add it manually, these samplers will get automatically recorded). If testing a Soap WebService or Database then you need to add Soap or JDBC Sampler respectively.
- Timers (should be added if you want to achieve a more realistic scenario, as in actual end user interface, each user will think for 2-4 seconds before clicking on any new link, also known as 'Think Time')
- Post-Processors (Regex or Xpath, if you have any dynamic parameters like ViewState, CSRF Token etc. which is required and unique for every user)
- CSV Data Set Config (for providing different input values for different users)
- Assertions (only for debugging just to check if your script is working fine or not, Disable them during actual execution)
- Listeners ('View Results in Tree' listener for validating the script and for saving results and analyzing them later use 'Aggregate Report' or 'Simple Data Writer')
- 'PerfMon Metrics Collector' listener for collecting data about server resource monitoring like CPU, Memory, Network I/O and Disk I/O etc. (JMeter Plugins)
First of all I would start with creating a test "skeleton" - basically record your test scenario using JMeter's built-in HTTP(S) Test Script Recorder. Check out Apache JMeter proxy Step-by-step guide to get started.
Once you have initial test script you can parametrize it, add external data sources, perform correlation if needed add virtual users, run the test and analyze results.