Spike Testing

Spike Testing

Spike testing is done to check if the application can handle, if there is any sudden spike of user on the application. And it will let the customer know if the system will crash or it will handle the spike with some  degradation on the application behavior.

Difference between Spike and stress testing?

Spike Test :

  • And Spike Test is done on the system to check the behavior of the application with sudden spike.
  • So if the load is spiked up sudden the application the behavior of the infrastructure can be tested.
  • And also the Spike Test will let the customer know how spike it can handle with the current infrastructure.
  • So this type of testing important to check negative scenarios on the application.

Stress Test :

  • Stress Test is used to test the breaking point of the application.
  • And also check how many concurrent Vuser can a application handle.
  • So large data will be loaded into the application.

Tools recommended for Spike Test in performance testing.

Jmeter Listener

Jmeter Listener

There are different type of listeners present in Jmeter. We will see all the listeners and there usage one by one.

Aggregate Graph :
Aggregate Report :
Assertion Results
Backend Listener
BeanShell Listener
BSF Listener
Comparison Assertion Visualizer
Generate Summary Results
Graph Results
JSR223 Listener
Mailer Visualizer
Monitor Results
Response Time Graph
Saves Responses to a file
Simple Data Writer
Summary Report
View Results in Table
View Results Tree

Load Testing

Load Testing

It will help to check the application's  behavior to perform under anticipated loads on application. The objective is to identify performance bottlenecks of the application under expected load. Load Test will determine the maximum operating capacity of an application. And also determine whether current application infrastructure is sufficient or we need increase to run the application. It also give the stability of application with respect to maximum number user load. It will also determine the number of concurrent users that an application can support with any degradation of the application.

Difference between load and stress testing?

Load Test :

  • And load Test is to test the system behavior under normal workload conditions, and it is just testing or simulating with the actual workload.
  • So the load Test will not be tested with loading of data into database.

Stress Test :

  • Stress Test is used to test the breaking point of the application.
  • And also check how many concurrent Vuser can a application handle.
  • So large data will be loaded into the application.

Tools recommended for Load Test in performance testing.

How to do parameterization in Ajax TrueClient Script?

Parametrization in Ajax TrueClient Script.

Adding Parametrization to the script in Ajax TrueClient Script.

Step 1 :

  • Launch the trueclient protocol in the Vugen.
  • And click on Develop script option in the script.
  • And record the flow , after that we can add the parameter for the script.

Ajax TrueClient Adding Transactions

Click Here to see how to record the script in Ajax TrueClient.

Step 2 :

  • Once you have recorded the flow completely. Then one can add the parameter to the scripts.
  • So select the step in the flow for which you want to add the parameter.
  • Click on the step. Then select click on Js option in the step.

Parameterization in Ajax TrueClient Script

Step 3 :

  • Select the word or the variable which you want to parameterize.
  • Right click on the word.
  • And select the Create a New Parameter from the selection.

Parameterization in Ajax TrueClient Script

Step 4 :

  • Enter Parameter window will be displayed.
  • Enter the Name of the parameter.
  • And then Click on OK Button.

Step 5 :

  • And so the Original value will be replaced with parameter.
  • And Click on OK button of the editor.
  • Function used for parameter is TC.Param("P_BaseURL");
  • Now the value in the Step will be replaced with parameter as shown below.

Ajax TrueClient LoadRunner Tutorials

Ajax TrueClient LoadRunner Tutorial

Training Summary

Ajax TrueClient protocol in the loadrunner.  Ajax TrueClient protocol is mainly used to do the user side testing or the behavior of the browser side. So it is a heavy protocol due to which the number of load generator for the execution will be more compared to web scripts.

Syllabus


1. Tutorial  -> How to record Ajax TrueClient script in Loadrunner.


2. Tutorial -> How to add Parametrization in Ajax TrueClient script.


3. Tutorial -> How to Capture the values in Ajax TrueClient script.


4. Tutorial -> How to add Transactions in Ajax TrueClient Script.


5. Tutorial -> How to Call external C- Function in Ajax TrueClient Script.


6. Tutorial -> Adding VTS Functions to the Script.


7. Tutorial -> Different Vuser Function present in Ajax TrueClient Script.


8. Tutorial-> Interview Questions for Ajax TrueClient Script.


9. Tutorial-> Quiz related Ajax TrueClient Script.

Stress Testing

Stress Testing

Stress test is one of the test done on the application to find the breaking point of the application. It will determine how much load the application can handle. How will the response time and resource behavior when the extreme load is applied on the system. Important it will give the customer the need confidence how much load the system can handle with existing resources.

Difference between stress and load testing?

Stress Test :

  • Stress Test is used to test the breaking point of the application.
  • And also check how many concurrent Vuser can a application handle.
  • So large data will be loaded into the application.

Load Testing :

  • And load Testing is to test the system behavior under normal workload conditions, and it is just testing or simulating with the actual workload.
  • So the load Testing will not be tested with loading of data into database.

Tools recommended for Stress Test in performance testing.

Volume Testing

Volume Testing

Volume Test is used to test large number of data populating in database for a period of time or for a particulate time. And check if the application is able to handle the volume of data getting loaded into the application. And also see the overall application behavior is monitored. So the objective is to check software application's performance under varying database/batch volumes.

Need for Volume Testing.

  • Volume Testing is done to check if the application can handle large data loading into the database.
  • So will test how will behaviors during the test.
  • Handling of large data loading into the database.
  • And also the utilization of CPU and memory resources.

Difference between volume and load testing?

Volume Test :

  • Volume Test is used to test large number of data populating in database for a period of time or for a particulate time.
  • And check if the application is able to handle the volume of data getting loaded into the application.
  • So large data will be loaded into the application.

Load Testing :

  • And load Testing is to test the system behavior under normal workload conditions, and it is just testing or simulating with the actual workload.
  • So the load Testing will not be tested with loading of data into database.

Tools recommended for Volume Test in performance testing.

web_reg_save_param Example

web_reg_save_param Example

Some of the examples which will cover the important attributes present in web_reg_save_param function.

Click Here to know about attributes of web_reg_save_param function.

Example 1:

<tr bgcolor=#66CCff><td align=center><input type = radio name=outboundFlight value=230;378;11/20/2003 checked >Blue Sky Air 230<td align=center>8am
<td align=center

  • We will see how we can capture the flight name which is highlighted in red color.
  • It will capture the values Blue Skg Air 230 in the C_Fightname parameter.
  • Ordinal is 1, which means the first occurrence of the value will be captured. Here the value Blue Skg Air 230 is the occurrence of the boundary.

web_reg_save_param("C_Fightname", "LB=checked >", "RB=<td align=center>", "ORD=1", LAST) ;

Example 2:

<tr bgcolor=#66CCff><td align=center><input type = radio name=outboundFlight value=230;378;11/20/2003 checked >Blue Sky Air 230<td align=center>8am
<td align=center

  • In this example, we will see how to use the Not Found and search attribute.
  • "Not Found = Warning" is specified in this example. Therefore when the response of the boundary is empty then the script will display warning but the script will stopped. But when you give as error then script will fail when the boundary values are empty.
  • Search is set "ALL" which means it will search every part of the response.

web_reg_save_param("C_Filghttime", "LB=name=outboundFlight value=", "RB=checked >", "ORD=1","NOTFOUND=Warning", "Search=ALL", LAST) ;

Example 3 :

  • In this example we will see how to use saveoffset, savelen and relframeid.
  • Savelen will save the length of the value.
  • Saveoffset will start the word as specific in the boundary.
  • Relframeid will let the boundary to search the frame where value might be found.

web_reg_save_param("C_Filghttime", "LB=name=outboundFlight value=", "RB=checked >", "SaveOffset=1", "SaveLen=1", LAST) ;

web_reg_save_param

web_reg_save_param

web_reg_save_param is the most important function used in load runner. It is used to capture the dynamic values sent by the server in the application and pass to the next request.

Syntax :

web_reg_save_param("Parameter_name", "LB=Left boundary", "RB=Right boundary", LAST);

These are the most important attributes of web_reg_save_param function which is used.

web_reg_save_param

Below are the list of all the attributes present in the function.

Parameter Name:

  • It store the dynamic values in the specified variable which is found using the attribute.

LB:

  • Left boundary of the dynamic value which we need to capture.
  • If the LB is empty, then it will capture all the characters from the starting of the boundary.
  • It is case sensitive, therefore when you are specific the boundary make sure they are exactly same as it is displayed.
  • One can further customize the search text, by using one or more text flags.
  • Its the most important attribute is mandatory.

RB:

  • Right boundary of the dynamic value which we need to capture.
  • If the RB is empty, then it will capture all the characters from the starting of the boundary.
  • It is case sensitive, therefore when you are specific the boundary make sure they are exactly same as it is displayed.
  • One can further customize the search text, by using one or more text flags.
  • Its the most important attribute is mandatory.

ORD:

  • It will Indicates the ordinal position of the dynamic value or instance of the match of the value.
  • If you specify as "All," it saves the parameter values in an array.
  • Default value of the instance is 1.
  • This attribute is optional.

Search:

  • It specify where to search for the delimited value in the response.
  • It has different values such as.
    • Headers (Search only the headers).
    • Body (search only body data, not headers).
    • No resource (search only the HTML body, excluding all headers and resources).
    • ALL (search body, headers, and resources).
  • Importantly the default value is ALL.
  • This attribute is optional but generally preferred.

NOTFOUND :

  • It used to handle when the boundary is empty string in the response.
  • "Not found=error" is the the default value. It will raise the error when a boundary is not found.
  • "Not found=warning" does not raise an error. Therefore "warning" option is ideal if you want to see if the string was found and you do not want the script to fail.
  • This attribute is optional as well.

RelFrameID :

  • It specific the hierarchy level of the HTML page which is related to the requested URL.
  • Default value is ALL.
  • This attribute is optional.

SaveLen :

  • Length of the sub-string where the value is found, from the specified offset, to save into parameter.
  • Default value is -1, indicating to save to the end of the string.
  • This attribute is optional.

SaveOffset:

  • Offset of a sub-string where the value is found, to save into parameter.
  • Value must be non-negative.
  • Default value is 0.
  • This attribute is optional.

Ignore Redirections:

  • If you set the attribute "Ignore Redirections=Yes", then if the server response contains any redirection information like (HTTP status code 300-303, 307). The response is not searched. Instead, once the redirection response is received, the GET request is sent to the redirected location. And the search is performed.
  • Therefore the default value is "Ignore Redirections=No".
  • This attribute is optional.

Correlation in Load Runner

What is Correlation?

Correlation is a mechanism of handling the dynamic values passed from the server to the script. Correlation is important aspect which will let the script run end to end without any error.

Why we should handle the correlation in the script?

Lets take a example of session id generation.

Recording :

  • While Recording an application, the vugen will sends a request to the application server to start a new session.
  • Server receives the request from the Vugen and assign a new session ID ABCDF.
  • Vugen will stores the session id ABCDF in the script.
  • Start the session with ID ABCDF and send a request to a application server to allow the Vugen to record the flow.
  • Therefore Application server recognizes the ID ABCDF and allows the Vugen to record the script.

Reply :

  • While Replaying the record script, the Vugen script will sends a request to the server to start a new session.
  • Application server will receives the request, and start the new session ID XYZ.
  • But while recording the Vugen would have stored the session id as ABCDF and now the server is expecting the new session if XYZ.
  • Therefore the application server will reject the request to reply script with the old session.

Solution :

  • Capture the session id into a variable which is generated from the application server at the initialization of the application.
  • Replace the variable(Captured value variable) in the place of old session id(ABCDF) in the script.
  • Therefore when application is started, now the new session id is captured in a variable and passed to the next request. And the application will run without any error or failure.

Different types of correlation present in loadrunner?

  • Auto Correlation.
  • Manual Correlation.

Auto Correlation :

It is the easiest way of doing the correlation in the load runner application. VUGen will require you to run a recorded script at least two times so it can internally compare the varying values in the server response. Its seems the easiest way to do it but most of the time the auto correlation will not be working. Therefore it is not recommended to use this method.

One can configure automatic correlation at the time of recording using the below steps.

  • Create the rules in the Recording Option before recording the script . Click on Record =>Recording Options=>Rules.

Correlation Rules

  • Then make sure the scan for correlations applying is as per the below snap shot.

Correlation Configuration

Manual Correlation :

Its the most important  method used to capture the dynamic values in the loadrunner.  Its directly added the function into the script to capture the values and passed it.

Therefore below are the steps involved in capturing the dynamic values.

  • Identify the dynamic value in the script which need to handled.
  • Find the first occurrence of the dynamic value in the script.
  • Find the correct left and right of the dynamic values.
  • Add web_reg_save_param function to the script above the request where the first occurrence of the dynamic value was found.
  • Pass the correlated values in the script.

Click on web_reg_save_param to know the important parameters of the function.

Correlation Manual