Load Testing Using JMeter | Performance Testing With JMeter | JMeter Tutorial | Edureka

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hi everyone this is shine denis from at Eureka and today we will see how load testing is performed using jmeter so in my last video about jmeter tutorial we have talked about what is jmeter and how to install jmeter testing tool and how it all works so today we will see some additional elements inside jmeter we will also see how you can perform the testing in the non GUI method we will also create reports in the dashboard so let's get started so let's have a look at today's agenda so first we will see what is jmeter and then we will see what is load testing and also we will have a look at some of the advantages of geometer that makes it the most preferable testing tool next up we will have a look at some of the elements of jmeter and finally we will have a look at how to use the dashboard and also the non GUI method finally I will show you how the load testing is performed using the jmeter testing tool in the non GUI method and also I will be creating a report in the dashboard so let's get started now software products demand excellent quality all the time now in order to ensure delivery of a quality product engineers involved in testing the product normally adopt various testing approaches now usually we tend to follow the trends in testing and forget to play importance to verify whether the product meets expected or required performance unfortunately we figure out the speed fault post delivery of the product nowadays performance is an inevitable factor especially for web and mobile applications as the user strength is very huge for each application now even if it is not to be expected all the time now in order to cope up with such situations of load we need a handy tool and that's exactly where apache jmeter comes into play so what is this jmeter it is basically a Java open source software let us used as a load testing tools for analyzing and measuring the performance of a variety of services now moving on what is load testing so basically load testing is a kind of performance testing which determines a systems performance under real-life load conditions now this testing helps determine how the application behaves when multiple users access it simultaneously now this testing usually identifies the maximum operating capacity of an application it determines whether the current infrastructure is sufficient to run the application sustained ability of application with respect to peak user load and also the number of concurrent users that an application can support and scalability to allow more users to access it now there are various tools that are available in order to perform this testing so load testing is significant in real time particularly from a point of view of customer satisfaction now there are several performance testing tools available such as the apache jmeter loadrunner web load load UI neo load and web load but jmeter is one of the most preferred tools for testing so let's have a look at some of the advantages of jmeter that makes it the most preferable one first of all it is an open source and also built in Java platform it is highly extensible and platform independent jmeter is also very user friendly now jmeter has a comprehensive GUI which helps to create test plan and configure the elements now adding elements is easy on geometer just right-click on the tree scenario and add what you need to do next up is the support now basically it is designed for performance testing but also supports other functional tests such as these stress testing distributed testing web service testing etc by creating test plans it also provides a pose for protocols such as the HTTP JDBC and FTP next up is the comprehensive documentation now this is one of the most important things to be highlighted now because of its robust documentation user can have a clear idea on each and every step starting from scratch including installation and configuration of the test settings and generating the final report next up is the recording now jmeter allows user to record the HTTP or the HTTP to create test plan using recording facility we use the proxy server that allows g-meter to watch and record your actions while you browse your web application with your normal browser finally there's this reporting now jmeter supports dashboard report generation a host of reports are generated through jmeter which helps the user to understand performance test execution results and in today's session I will teach you how to generate a report in the dashboard now in the previous jmeter tutorial I have taught you how to install jmeter and I have also showed you how it actually looks like I have also discussed about some of the important elements of jmeter here I have added another important element in the jmeter so let's revise about all these elements again first of all we have the thread group now the thread group is a collection of threads each thread represents one user using the application under test basically each thread simulates one real user request to the server the controls for a thread group allow you to set the number of threads for each group the next element is these samplers now as we know already that jmeter supports testing HTTP ftp JDBC and many other protocols we also know that thread groups emulate user requests to the server but how does a thread group know which type of request it needs to make the answer is samplers now the user request could be FTP HTTP JDBC etc we have also discussed about all of these requests next up is the listeners now listeners shows the results of the test execution they can show results in a different format such as a tree table graph or log file then we have the configuration elements which setup defaults and variables for later use by now here is another added element of jmeter for the load testing so assertion in jmeter is used to validate response of the requests that you have sent to this server now assertion is a process where you verify expected result with the actual result of the request at runtime now if you need to apply assertion on a particular sampler then add it as a child of that sampler you can view assertion results by adding assertion listener to the thread group failed assertions will be displayed in other listeners as well so here we will be using the response assertion so response assertion can be used to add and compare pattern strings against one or many values of server response so here you can verify the response by using the response assertion now these were the elements that we will be using in our load testing next up I will tell you how to generate a report on a dashboard so this is exactly how a dashboard looks like and also the report generated here now jmeter supports dashboard report generation to get graphs and statistics from a test plan the dashboard generator is a modular extension of jmeter its default behavior is to read and process samples from CSV files to generate HTML files containing graph views it can generate the report at end of a load test or on demand so in my previous G meter tutorial I have already taught you how to install jmeter and also how the test plan works so here I'll be doing the testing in the non GUI method so first of all I'll show you again how to create a test plan and then we will be running that particular test plan in our command prompt in the previous one we have done it in the jmeter itself here we will be using a non GUI method so let's see how this works so this is our apache jmeter tool and we have a test plan here so first of all I will rename the test plan to Ed Eureka and then I'll create a thread crew now inside the thread group I will put some number of threads and also increase the loop count so here I have added the number of threads or the users as 20 and increase the loop count to five now I'll add another sampler that is the HTTP request so let's open our Eddie Rekha blog website so here we go to the ID I cannot go / block so this is the website for all the anti Rekha blogs so this is our server on which we are performing the testing so we'll copy the URL and put it on the IP address now as you know that we are not supposed to put the HTTPS so we will remove this from here and also the path will be added in the path section so we'll copy it from here and put it in the path section next up I'll create another HTTP request now inside our ED Eureka blog website we have different sections such as the all videos interview questions and cheat sheet so these are the different paths that lead to different sections inside the website so I've added one path that goes to all the blogs next up I'll just add another HTTP request where I'll put the website as ed Eureka dot go slash blog and the path I'll set to the videos so I will copy the path from slash videos and put it in the path section and save it as videos I'm also saving the first one as all pages next up I'll add another HTTP request and here I'll add the path to all the cheat sheets so here I'll add the server as ed Eureka dot go slash blog so I'll add the path as the interview questions I'll also change the name of this HTTP request to interview questions so once we have added all the HTTP requests we will save this as our ed Eureka draw JMX file so I am saving it inside my load test folder so I will rename it as ed Eureka and you record or JMX and I'm saving it inside the load test folder now in order to check if the test is running properly let's add a listener where we show the results in the tree format so once I've created this view results tree and if I run this test you can see that all the tests are running perfectly and the status is okay for all of these pages so you can see that the test is running completely fine so now let's remove this and run this test in the non GUI mode and for that we have to clear this view results tree and also we have to go to the command prompt and check how we can run this test in the non GUI mode so now that our test plan is ready we will be shifting to our command prompt now inside command from the first thing that you need to do is specify the path so first you have to go inside the jmeter bin now this is the path that takes me inside my jmeter and the bin folder so now I am inside my jmeter bin folder and here I'll be running the command line for performing the test now the command for performing the load testing is jmeter - n - t now what is this - n the - n represents the non-jew iMode and the - T is used in order to specify the location for your test script so once we have specified the location for our test trip then we have - L now this - L is used to specify the test location for our output result now the - L is used for the location of the result file now here we have the - n for the non GUI - T for location for jmeter test prep and the L for the location of the result file so now here we have to specify the location for both so inside the load test folder I have my eddie record jmx so i have to copy this path and specify it after - t that is specified the test script location so here i have specified this test script location and the name of the file would be eddie record dot JMX now inside my load test I have created a dot CSV file which I will name it as load test dot CSV now this load s dot CSV file will hold all my test results so now I have to specify the location for my result file which is the load test dot CSV file so after - L I'll be specifying the location for my result file so now this is the command for running the test in a non GUI format where I'll be using the test trip file and also the result file location so now once we run this command line we can see that the tree has been successfully created and the test has started so this will take some time and the process will continue because we have used 20 users and also the loop count will go on for five times now once you see end of run it means that the test is completed now when we go back to our load test folder and open our load test dot CSV file so now here you can see that the entire test result has been generated inside our load test dot CSV so it shows that the test has been performed successfully and it's all okay so it has been completed successfully and there has been no error generated either so now this is exactly how you perform your testing in the non GUI method so we have just used our command prompt in order to run the test finally and also we have got the entire results output in the dot CSV file now in order to have a better understanding of the output of your test you would need a dashboard now in dashboard we will be creating different sorts of graphs that will help you understand the performance of your website even better so now let's move on and see how we can generate a report on our dashboard now in order to generate a report in our dashboard we follow the same procedure we go to the jmeter create a test plan here I'll be using the same test plan where I have used the add eureka blog website and also all the three HTTP requests that have created for our all pages videos and interview questions separately now these are some of the elements that we had already added now for the dashboard we will be adding another new element known as the assertion now basically it will help us to add and compare the pattern strings against one or many values of server response now in order to run the test and generate the report on the dashboard the command line is almost similar with two more added elements here so initially we had jmeter - n - t and - L now here we will be adding two more extra things that is the - E and E - OH now the - o is used for the output file now for the output file we will go back to our load test folder and create another folder suppose I am naming the folder as HTML report now this will give us my dashboard report so I'm creating this output folder here now we have to specify this path after the - oh and the command remains the same where we have jmeter - n for the non GUI then we have - T for a desk replication which is our EDI record or jmx and then we have D - L for our dot CSV file and then we have - E - oh and we specify the location for our HTML report so this is the location to our HTML report now once we run this command we can see that again we are successfully creating the tree and then starting the test now this will also take some time for the report to get generated now once we run this command line we will also get the CSV file where the report is generated in the tree format and also we will have a separate dashboard created where we will have the entire output generated in the form of graphs now the jmeter supports the dashboard report generation to get the graphs and stay the sticks from a test plan so now that the test is done successfully once we go back to our load test folder and we open our dot CSV file we can see that the report has been generated here now moving on if we go back to the folder and open our HTML report folder we can see that there is an index dot HTML created now this is the dashboard that has been generated so in this dashboard we have our entire report of our test generated in the form of graphs and statistics so you can see that we have the output of our test plan which shows that it was all ok because there was no error inside our test plan we have specified the paths correctly and thus the test plan has occurred successfully now the dashboard generator is a modular extension of the G meter its default behavior is to read and process samples from CSV files to generate HTML files containing the graph views so here you can see the graph that shows 100% ok because there has been no error in our testing we also have a statistics table providing one table a summary of all metrics per transaction and then we have the error table providing a summary of all errors and their proportion of the total requests here we do not have any particular error now not just that we also have zoomable charts where you can check or uncheck every transaction to show or hide it for like the response times over time where it includes the transaction controller sample results we also have the response times percentile over time which shows the successful responses only then we have the active threads over time by its throughput over time which ignores transaction controller sample results then we have Latin C's over time Connect time over time which includes the transaction controller sample results then we have the hits per second response codes per second and transactions per second we also have the latency versus requests per second and response time over so we have all these different forms of shots available in our dashboard that will give you a detailed report about the test that has been performed on your website this actually you a visual satisfaction of whatever tests you have performed and it's always easy to understand with the help of these graphs and statistics and you get to easily understand how well your website have been performing not just that we also have custom graphs here which will let you have the graphs the way you wanted to according to the report that has been generated so this is exactly how apache jmeter helps you in performing load testing on any such website so this was the non GUI method of flow testing with the help of apache jmeter and also we have seen how we can have a better version of outputs generated in the form of a report in the dashboard here we have graphs and statistics that will easily help you know about what kind of status you are getting after the test has been completed it completely shows you if there is any error or if the status is completely ok now in case there is any error there will be false in place of true and also you will get to see a red and green graph wherever there is an error it will show you something like this where you will also get to see the error in the test so now this was all about the forming load testing using the apache jmeter tool and you can refer to the jmeter tutorial that I have explained previously where I have given the detail steps about how to install jmeter also I have given details about all the elements involved in order to run the test plan and in my previous geometer tutorial I have also taught how to use the user interface in order to perform any testing so you can always refer to that video and learn about the installation process too and I hope this video has helped you understand how to perform the non GUI testing and also how to generate your reports so this was all about today's session do let us know about your opinion in the comment section below till then thank you and happy learning I hope you have enjoyed listening to this video please be kind enough to like it and you can comment any of your doubts and queries and we will reply them at the earliest do look out for more videos in our playlist and subscribe to any Rekha channel to learn more happy learning
Info
Channel: edureka!
Views: 89,188
Rating: 4.8672376 out of 5
Keywords: yt:cc=on, jmeter tutorial, jmeter tutorial for load testing, jmeter load testing tutorial, performance testing with jmeter, jmeter performance testing tutorial, load testing jmeter, apache jmeter load testing, jmeter load testing demo, jmeter testing, jmeter recording, jmeter performance testing, jmeter scripting, jmeter reports, jmeter selenium, software testing training, edureka, performance testing using jmeter, jmeter load testing, load testing using jmeter
Id: tTgyrSWlj5s
Channel Id: undefined
Length: 21min 35sec (1295 seconds)
Published: Thu Mar 07 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.