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.

Jmeter Interview Questions

Most Important Jmeter Interview Questions


Explain what is a timer in JMeter and what are the types of it?

A JMeter thread by default will send requests continuously without any pause. To get a pause between the request, Timers are used. Some of the Timers used are Constant Timer, Gaussian Random Timer, Synchronizing Timer, Uniform Random Timer and so on.


Explain what is Test Fragment?

Test fragment is also a type of element like Thread Group element. The only difference is test fragment is not implemented unless it is referenced by either a Module controller or an Include controller.


Explain what is Assertion in JMeter? What are the types of assertion?

Assertion helps to verify that your server under test returns the expected results

Some commonly used Assertion in JMeter are

  • Response Assertion
  • Duration Assertion
  • Size Assertion
  • XML Assertion
  • HTML Assertion

Explain how you can reduce the resource requirement in JMeter?

To reduce the resource requirements in JMeter

Use non-GUI mode: jmeter –n –t test.jmx –l test.jtl
During the load, a test doesn’t use “view results tree” or “view results in table” listeners, use them only during the scripting phase
Don’t use functional mode
Instead of using lots of similar samplers, use the same sampler in a loop and use the variable to vary the sample.


Explain how you can perform spike testing in JMeter?

By synchronizing, timer JMeter spike Testing can be achieved. Synchronizing timer blocks thread until a specific amount of threads has been blocked and then release them all together thus creating large instantaneous load.


Explain how you can capture the script of the authentication window in JMeter?

Normally, you can capture script by recording.

First, you have to Threadgroup in Testplan and then make HTTPProxyServer in Workbench
After that, set port number in the Global Setting box (e.g., 8911) and modify your connection setting in IE as localhost in address 8911 as in port Then you can start http proxy server in JMeter and run your application for login


List out few JMeter Listeners?

Some of the JMeter Listeners are

  • Spline Visualizer
  • Aggregate Report
  • View Result Tree
  • View Result in Table
  • Monitor Results
  • Distribution Graph
  • BeanShell Listener
  • Summary Report and so on

In JMeter is it necessary to call embedded resources explicitly?

You can eliminate all embedded resources from being explicitly called. Requests have a checkbox at the bottom that says “retrieve embedded resources.” It would grab all CSS, JPG, etc. It is a brilliant way to find resources and broken link in a web App.


Explain what is the role of Timer in JMeter?

With the help of a timer, JMeter can delay the time between each request, which a thread makes. It can solve the overload problem of the server.


Explain what is Post-processor?

To perform any action after making a request, Post-processor is used. For example, if JMeter sends an HTTP request to the web server, and if you want JMeter to stop sending the request if the web server shows an error, then you will use post-processor to perform this action.


What are the benefits that JMeter offers for performance testing?

JMeter offers benefits on Performance Testing like

  • Can be used to test performance for both, static resources as well as dynamic resources
  • Handles a maximum number of concurrent users then your website can handle
  • It provides the graphical analyses of performance reports

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.