A number of tests performed to determine whether websites reach the desired performance values before interacting with real users and to determine the usability limits are called functional test, load test, stress test and performance test. With JMeter, it is possible to measure the performance of your web application by applying these tests and receiving reports.
User scenarios simulated with JMeter, the inputs requested by the web application can be differentiated and constructed to create the desired load on the system.
JMeter tests the application by using it as a virtual user. It uses the HTTP protocol to appear as a virtual user. The test plan given to JMeter determines which page is called, when and with what information. If the test plan is processed in line with this information, JMeter will connect to the application via HTTP protocol and start travelling your web pages with the requested data.
The application is tested with more than one different test scenarios for proximity to reality, and the reports are analysed with the test results obtained such as http response times, the amount of increase and decrease of the resources used, memory leak impression.
After JMeter is opened, we change its name from the "Test Plan" page according to our example. In our example, since we will test the home page of drupart.com.tr, we changed its name to "Drupart Test Plan".
Right click on "Drupart Test Plan" and select Add->Threads (Users)->Thread Group.
In the "Thread Group" tab, we set the number of users, the test second interval, the number of repetitions and the decision to be taken when a sampler error is encountered.
Right click on "Thread Group" and select Add->Config Element->HTTP Request Default.
"HTTP Request Default" is an element added to use the same settings on all pages to be requested. We fill the server name and protocol fields according to our scenario.
Right click on "Thread Group" and select Add->Sampler->HTTP Request.
"HTTP Request" is the element used to make a request to the page. In the "HTTP Request Default" element, we can leave this field blank because we assign drupart.com.tr as default to the "Server Name or IP" field.
Since we will not post data on the page to be requested, the "Method" in the Basic tab is set to GET. Since the page to be requested is the homepage, the "Path" field is entered as /. In the Advanced tab, Retrieve All Embedded Resources is selected.
Right click on "Thread Group" and select Add->Listener->View Results Tree.
"View Results Tree" is one of the most used result screens where we can follow and record the test results. "Sampler Result" under this field returns test results related to request time, number of errors and many request pages. "Request" returns the request information sent. "Response Data" is the field that will allow us to see the source code of the page returned as a result of the request according to the selection type. We can enter the file name to be recorded in the "Filename" field and specify the fields to be recorded with "Configure".
The relevant sample and format are selected according to how we want the response to be returned from the server.
Right click on "Thread Group" and select Add->Listener->View Results in Table.
We can run it with the Start button and see our results in a table and record them at the same time. We can enter the file name to be saved in the "Filename" field and specify the fields to be saved with "Configure".