Performance Testing Tutorial For Beginners | Performance Testing Using Jmeter | Simplilearn

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone welcome to simply learn's youtube channel in this session we will learn everything about performance testing we shall begin with learning the basics of performance testing and what is its relevance after that we shall see the types of performance testing then we shall see the performance testing process and performance testing metrics post that we will learn some performance testing tools and after we know all about performance testing we shall see the basics of geometer and why is it more sought after tool for performance testing finally we will have a look on hands-on demo to understand the working of meter and performance testing is performed using it but before we begin make sure that you have subscribed to our youtube channel and click on the bell icon so that you can never miss an update from simply learn so without further ado let's get started with the first topic that is what is performance testing so performance testing is one of the most important phases of any product launch as it verifies and validates the overall product performance this testing can be done in different forms depending upon the resource availability and the type and volume of the user base the main agenda behind conducting performance testing on any product is to make sure that the product's performance is as expected before it gets launched into the market so performance testing is the process of testing a software application under a specific workload performance testing is a software testing process used to test the speed response time stability reliability scalability and resource usage of a software application under a particular workload the main purpose of performance testing is to identify and eliminate performance bottlenecks in the software application performance testing mainly focuses on three factors of a software program first one is the speed here it identifies whether the response of the application is fast or not then comes scalability where the maximum user load is determined and the third one is stability where the stability of the application is checked under various workloads now we know what is performance testing let us understand why if we need performance testing the only concern of a software system is not features and functionality the response time reliability resource and scalability are also important factors so the goal of performance testing is not to find bugs but to eliminate performance glitches performance testing is performed to help the stakeholders with information about the application concerning the application speed stability and scalability furthermore performance testing reveals what needs to be improved before the product goes into the market if there is no performance testing the software might suffer from issues such as running slow while several users use it simultaneously inconsistencies across different operating systems and poor usability performance testing determines if the software or application meets speed scalability and stability requirements under expected workloads applications sent to market with poor performance metrics due to non-consistent or poor performance testing are likely to bring a bad reputation and fail to meet the expected sales goals now we know the relevance and need for performance testing let's look at the types of performance testing so there are six types of performance testing namely load testing stress testing volume testing capacity testing reliability testing and scalability testing let's have a look at all the six types of testing one after the other so the first type is load testing load testing is a type of performance testing where the application is tested for its performance on normal and peak usage an application's performance is checked concerning its response to the user request and its availability to respond consistently with an accepted endurance on different user loads here the main consideration is the maximum load the application can hold before the application starts behaving abruptly then another consideration is regarding how much data the database can handle before the system crashes the second type of performance testing is stress testing stress testing is a type in which different ways to break the system are found that is how much load a system can sustain stress testing has an incremental approach where the load is increased gradually the test started with the load for which the application has already been tested then more load is added slowly to stress the system the point at which we start seeing servers not responding to the request is considered the breaking point here the major considerations are the maximum load to a system can sustain before it breaks down then how is the system broken down and how will the system be able to recover once it has crashed we also see in how many ways a system can break and which are the weak nodes that are to be kept in mind while handling the unexpected load moving forward the next type is volume testing volume testing is the type where the performance of the system is checked with respect to the volume of the data to execute a volume test a huge volume of data is entered into the database this test can be incremental or steady test in the incremental test the volume of the data is increased gradually generally with the application usage the database size grows and it is necessary to test the application against a heavy database if we consider an example let's say there is a website of college having small amounts of data to store initially but after 5-10 years the data stored in the database of the website is much more and has become huge now comes the fourth type of performance testing the capacity testing so capacity testing is a type of testing where the application is checked for its capability to meet the business volumes capacity testing is generally done for future prospects here the main concerns are if the application would be able to support the future load if the environment is capable of standing the upcoming increased loan and what are the additional resources required to make the environment capable enough capacity testing helps in determining how many uses or transactions of a given web application is capable of supporting and will perform well during this testing resources such as processor capacity network bandwidth memory usage disk capacity etc are considered and altered to meet the goal to consider an excellent example of capacity testing we can see the case of online banking moving forward the next type of testing is the reliability testing reliability testing is a type in which the application is verified if the application would be normal again after an abnormal state it estimates the time that the system would take to return to its normal state to understand the concept let's say there is an online trading site that experiences some failure and because of which the users are not able to buy or sell shares at a certain point of the day but after a couple of hours they were able to operate their shares and the application became normal this is when it can be said that the application is reliable and can recover from its abnormal state the last type of testing is scalability testing scalability testing is a type where the application is determined if it would be able to scale up whenever needed the need for scaling up comes when there is an increase in user load now when we have learned the types of performance testing we must learn the process of performance testing so the process of performance testing is divided into eight parts that is requirement gathering selection of tools performance test plan performance test development performance test modeling execution of test test result analysis report now let's have a look at all of these processes one after the other the first step in the process is requirement gathering the requirements are identified and gathered from the clients by the performance team this includes getting information on the application's architecture technologies database used intended users functionality application usage test requirement hardware and software requirements etc the second step in the process is selection of tools after the previous step poc or proof of concept is done with the available tools the proof of concept is a sort of demonstration of real-time activity but in a limited sense the list of available tools depends on the tool's course the protocol that the application is using the technologies used to build the application the number of users we were simulating for the test etc now the third step the third step is the performance test plan in reference to the above two steps test planning and designing are conducted the process of test planning involves information on how the performance test is going to take place like the test environment workload hardware etc moving forward the fourth step is performance test development in this step the use cases for the identified functionalities are created these use cases are shared with the client for their approval once the clients approve the use case the script development begins these scripts are validated against several different users and parallel to script creation the performance team sets up the test environment the performance team also takes care of metadata through scripts if the client does not take up that activity so the next step is performance test modeling performance load model is created for the test execution this step aims to validate whether the given performance metrics are achieved during the test or not then the sixth step is execution of tests the scenario is designed according to the load model in controller or performance center initially the tests are not executed with maximum users that are in the load model the test execution is done in incremental order let's say there are thousand users then the scenario will begin testing from 100 then go to 250 then 350 and so on it will gradually increase and go up to 1000 users the next step is the seventh step in our process that is the test result analysis the test results are the most important deliverable for the performance tester this is where we can prove the return on investment and productivity that a performance testing effort can provide what makes the result analysis process more effective is that we must have a unique and meaningful name for every test result which will help us understand the test purpose in the test summary certain things must be included like the reason for failure how the performance of the application changes regarding the previous runs it is also a good practice to make a result summary after each test run so that the analysis results are not compiled every single time the results are referred then the final and the last step in performance testing process is the report the test results should be simplified so that conclusion is clearer and should not create any derivation the development team needs more information on analysis comparison of results and details of how the results were obtained the test report is considered to be good if it's brief descriptive and to the point now that we know the performance testing the next important topic to discuss is the understanding of performance testing metrics the first is processor usage which refers to the amount of time the processor spends executing the non-idle threads second metric is memory usage memory use is the amount of physical memory available to the processor on a computer system the third metric is this time which is the amount of time the disk is busy in executing read or write request the fourth metric is the bandwidth that shows the bits per second used by a network interface moving forward the next metric is the private bytes it is the number of bytes a process has allocated that can be shared amongst the other processes these are used to measure memory leaks and usage then comes the committed memory this is the amount of virtual memory used then the next metric we have is the response time it is the time between when the user enters a request to time to the first character of the response is received next metric is the throughput it is the rate at which a computer or a network receives requests per second moving forward the next metric is the hit ratios the hit ratios are concerned with the number of sql statements that are handled by caged data instead of expensive input output operations and the last metric in our list is the top weights these are monitored to determine what wait times can be cut down to make the data retrieval faster from memory apart from this some metrics like the rollback segment garbage collection thread counts heads per second cpu interruption per second disk you length etc now when we know almost everything that is needed regarding performance testing it is very important to know the tools that make performance testing possible here are the top 5 performance testing tools in the market today the first tool we have is the load runner or hp load runner as the name suggests the loadrunner is great when it comes to handling a large amount of users for testing the second tool in our list is web load web load is one of the best testing tools for stress and load testing the next tool in our list is load ui load ui is a great testing tool to map the scalability and speed of the target product the fourth tool in our list is new load it is one of the fastest testing tools with a speed of around 10 times the traditional testing tools that are integrated seamlessly into our existing software with a wide array of tests the last tool in our list is the apache j meter apache j meter is one of the best and most used testing tools in the market right now it is highly capable of creating a large number of virtual users working on web server moving forward we shall talk about jmeter and understand why jmeter is preferred over all the other performance testing tools in the market so moving forward let's see what jmeter is j meter or apache j meter is an open source software that is 100 pure java application the application is designed to load or test functional behavior and measure performance j meter is originally designed for testing web applications but has since expanded to other test functions to understand the concept of j meter let us assume that someday your team leads tell you to perform performance testing on some website like facebook or google.com for 100 users what would be the first thing comes to your mind do you think it's practically possible to arrange 100 people with computers and access to internet and accessing the same website now just imagine the infrastructure requirement when this testing has to be done for 10 000 users this is when a need for software like jmeter arises so what jmeter does is it actually simulates it will simulate the real user's behavior and perform load tests on server group of servers network or object now let's have a look at some reasons why gmeter is used for load testing we have divided these reasons into six parts the first one is it's free of cost second one is performance testing of applications next one platform independent the fourth one is customizable fifth is recording and playback and finally sixth is the community support let's see all of these one after the other the first reason we have as free of cost one of the main deciding factors in any software is its cost normally a software can range from high as six to seven figures per license here jmeter is free of cost very intuitive and has all the possibilities you need to automate your work then the second reason is performance testing of applications the application is used to perform performance testing on different types of applications like web applications web services ldap database and shell scripts jmeter can conduct load and performance tests for many different servers and server types web http and https database via jdbc ldap and jms the third reason is platform independence jmeter is written and developed using java to run on any environment or workstation that accepts java virtual machine for example windows linux mac etc the next reason we have is that the jmeter is customizable since jmeter is an open source application it enables developers to customize whenever needed jmeter has a comprehensive and user friendly graphical user interface parameters are easy to define and understand scripting is simpler and clearer and adding and defining elements is more intuitive also one screen shows everything you need the script the scenario and the analysis the samplers are highly customizable when determining which request to be sent to the host however samplers don't enable full control of test actions moving forward the following reason is recording and playback the application provides record and playback options enabled with the drag and drop feature making the application faster and easier the next and the last reason on our list is incredible community support jmeter is an open source tool with a brilliant community that keeps adding features and supports users who run into issues and problems this ensures new users always have someone to answer their questions and longtime users can improve their abilities on gmeter also having an open source tool ensures that it keeps getting better and is always in line with users needs and requirements finally let's have a look into the demo that shows the working of j meter so the first step is we shall go to the apache j meter folder in that folder go inside the bin folder and select the j meter jmeter.pat file double click on this file this might take a while and then the jmeter window will open on the screen the home window is divided into two sections on the left side all the test plan elements are added and on the right side all the configurations of that element are added as we are on the test plan element we can see the configurations of the same here the test plan is like a place or a container where all the elements we will be using to perform this test will be stored all the requests listeners and everything will be stored here i have renamed this test plan as performance testing now the first step is to add thread group right click on the performance testing go to add then go to thread or users and select thread group let's name this as perform here the thread group refers to the used or created users or needed to run this test it has several different options like the action to be taken after there is an error you can choose it the way you want then there is this number of threads where you can choose the number of users you want then there is a ramp up period in seconds option that states the time gap between the user's hits third there is a loop count where you can choose how many times the test will run for the number of users you can also choose the test to run in finite times there is also a scheduler here to help you schedule the start time and the test end time let's make the number of threads to b2 and let's make the loop count to be 100 the next step is to add an http request for that right click on the thread group go to add option and go to the sampler option in the menu that appears select the http request option here on the screen there is a server name or ipbox we have to give the server name or the ip in that let's pick up a website and place the link in the box we shall use the simply learns website here go to simply learn's website and copy the url from here then come back to the jmeter window and paste it onto the server name box keep in mind we don't need to give the http or https since these are protocols which will come in the other box and they will be automatically taken in the http request case then in the path dialog box we will leave the forward slash there since we have to access the root page and let's rename this http request as simple now to get results we shall add listeners listeners are something that are used to provide the outputs of a load test there are different types of listeners present in jmeter and many may be added using plugins we will use three different listeners here to have an idea about the representation that the jmeter provides for that right click on the thread group then go to the add select listener option and go to the view results entry option then again right click on the listener option and choose graph results and for the third listener again right click and select the view results in the table option now it's time to run the test for running the test there are three simple ways first you can simply click on the green button here to run second is you can go to the run option and choose the run the test and the third way you can right click on the first jmeter and choose to run let's simply choose the green button and run the test first we will have to save this jmeter test and then we shall go on to check the results of the test here in the view results tree we can see the test being run the same in the case of graph results we can see the throughput option then we can also see the time the test has been executing since we had put the threads to 2 and the loop count to 100 so the test will run for a while we can check the view results in the table we can see different performance testing metrics on the screen you can see the thread name label sample time per second bytes sort bytes and the latency and in the tree option when we click on the test we can see a lot of information appearing on the screen these are again several performance testing metrics and in the graph results we can see the graph coming up on the screen now which represents the test taking place with respect to the ip address thread and loop counts so what jmeter exactly does is creates a request and sends it to the server once it receives the service response it collects them and visualizes those details in a chart or graph after that it processes the service response and finally it generates the test results in several formats such as text xml json so that the tester can analyze the data and this was all for today's session hope you guys found it informative and helpful thanks for watching and stay tuned for more from simply learn hi there if you like this video subscribe to the simply learn youtube channel and click here to watch similar videos to nerd up and get certified click here
Info
Channel: Simplilearn
Views: 66,191
Rating: undefined out of 5
Keywords: performance testing tutorial for beginners, performance testing using jmeter, jmeter tutorial, jmeter tutorial for load testing, jmeter load testing, jmeter load test, jmeter install, jmeter testing, jmeter windows, jmeter reports, jmeter distributed testing, jmeter load testing tutorial, jmeter performance testing tutorial, jmeter tutorial load testing, load testing vs performance testing, load testing tutorial, software testing training, simplilearn
Id: thc14fLXU2k
Channel Id: undefined
Length: 23min 30sec (1410 seconds)
Published: Wed Mar 10 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.