How to use Analysis in LoadRunner

The Analysis component in HP LoadRunner is used to analyze the results from the load test. The Analysis components provides numerous graphs which can be used to understand the results of the load test conducted. In this section of the tutorial , we will see in detail how we can use the Analyze component.

In this tutorial, you will learn:

  1. How to use the analysis
  2. Types of analysis graphs
  3. How to view the scenario settings
  4. How to export results to HTML
  5. How to merge graphs
  6. How to save a session
  7. How to open an existing session

How to use the analysis

If you have an existing Analysis file, you can open the Analysis application and browse for the analysis file.

When the HP suite of testing tools is installed, you can see the Analysis icon as part of the installation.hp_loadrunner_analysis_tutorial_analysis_icon

Double click the Analysis to start the application. When the application launches, you will get the below main window to work with.hp_loadrunner_analysis_tutorial_main_window

From here, you can use the File menu option to browse for the Analysis file.

Another way to use the Analysis and probably the most common way is to open the file from the Controller after the load test is completed.hp_loadrunner_analysis_tutorial_open_analysis

When the load test in the Controller is completed, you can use the File menu option Results->Analyze Results. This will then open the Analysis application and load the results automatically as shown below.hp_loadrunner_analysis_tutorial_analysis_dashbaord

Now let’s go through all the graphs that the Analysis application has to offer.

Types of analysis graphs

Summary Report

The summary report gives you key information on the overall summary of the load test results. Over here you can view the below mentioned information.

  1. The maximum number of virtual users that ran in the test
  2. The number of bytes which were transferred to the application.
  3. The number of bytes which were transferred to the application per second.
  4. The total number of hits to the application
  5. The total number of hits to the application per second.
  6. The number of errors encountered in the applicationhp_loadrunner_analysis_tutorial_summary_report

SLA Summary

If Service Level Agreements were defined in the Controller as part of the load test, they would be shown up here. Remember that in the previous section, we had defined an SLA for the 90%. The response time for that would be displayed here.hp_loadrunner_analysis_tutorial_sla_summary

Running VUsers

This graph would give the number of Virtual users that were incremented during the course of the load test.hp_loadrunner_analysis_tutorial_running_vusers

Number of hits per second

This graph would provide the number of hits by the load test against the application. This graph is good to see if the load test was consistent in hitting the application with requests at the right intervals.hp loadrunner analysis tutorial number of hits per second

Number of Bytes

This graph would provide the number of bytes that was received by the Web server. This graph gives a good indication of the throughput of the application. If the throughput decreases as the user load increases then that can signal an issue in the application.hp_loadrunner_analysis_tutorial_number_of_bytes

Transaction Summary

This chart is good in understanding the ratio of passed to failed transactions. The green bar represents the number of passed transactions and the orange one the number of failed transactions. So if you see a larger number of failed transactions, this would give an indicationhp_loadrunner_analysis_tutorial_transaction_summary

Drilled Down Transaction Summary

If you want to have a further drill down on the number of transactions per user, you can do so by using the drill down option available for the graph. To enable the drill down you need to right click on the graph and choose the Drill down option.hp_loadrunner_analysis_tutorial_drill_down_option
Then in the next dialog box, ensure to choose the Group by to Virtual User ID.hp_loadrunner_analysis_tutorial_drill_down_userid

Once you click on the OK button, you will get the Transaction Summary by Virtual User.hp_loadrunner_analysis_tutorial_drill_down_transaction_summary

Average Transaction Response time

This graph gives the average transaction response time for all transactions executed by all users. This is a good graph to get an indication of how the application is performing. There can be a spike during the beginning of the load test in terms of response time, because initially the application needs time to scale its resources as per the load. But you should then start to see a gradual decrease and stabilization of the transaction response time. If you don’t then this can be an indication that there is an issue with the application.hp_loadrunner_analysis_tutorial_average_transction_response_time
If you want to see the Transaction Response time for all transactions, because the above graph just shows the ones for passed transactions, then you need to change the graph filter as shown below.hp_loadrunner_analysis_tutorial_transaction_filter

Then change the filter for Transaction End Status to include all possible type of transactions.hp_loadrunner_analysis_tutorial_change_filter

Once you do this, the graph will be updated to include all possible transactions.hp_loadrunner_analysis_tutorial_all_transaction_summarry

Transaction summary per action

If you want to view the transaction summary per Action, then you need to perform the following steps.
Click on the Filter and Group option.hp_loadrunner_analysis_tutorial_filter_and_group

For the Filter option, choose the Transaction Name and ensure to choose all Action types available.hp_loadrunner_analysis_tutorial_filter_all_transactions

In the Group By filter, ensure that the selected groups has the “Transaction Hierarchical Path” chosen.hp_loadrunner_analysis_tutorial_transaction_hierarchical_path

Once you enable the above options, you will then get the Transaction Summary per Action.hp_loadrunner_analysis_tutorial_transaction_summary_action

HTTP Response per second

If you want to see the HTTP Responses per second, you need to go to the Summary Screen and click the ‘HTTP 200’ link in the HTTP Response Summary section. The HTTP Responses should be consistent throughout the load test. If the responses starts to decrease even though the number of users is high, that would indicate that there is an issue with the application.hp_loadrunner_analysis_tutorial_http_response_summary
You will then be presented with a detailed graph of the HTTP Responses per second.hp_loadrunner_analysis_tutorial_http_responses_per_second

Connection retries per second

This is when the client has to re-establish a connection during the load test. This could be because the server has closed the connection or if the connection was refused from the server. If the number of re-tries is high that means there is an issue with the application.

You need to go to the Summary Screen and click the ‘View Retries per second graph’ option.hp_loadrunner_analysis_tutorial_connection_retries_per_second_summary

You will then be presented with a detailed graph of the number of Retries per second.hp_loadrunner_analysis_tutorial_retries_per_second

Throughput (MB)

This gives the amount of data received from the Web server during the load test.

Note: – If you cannot see this graph, then please follow the below steps to add a graph to the Analysis session. Click on the Menu option Graph > Add New Graph.hp_loadrunner_analysis_tutorial_add_new_graph

Then in the next Dialog box, select the desired graph and click on the button ‘Open Graph’.hp_loadrunner_analysis_tutorial_open_new_graph

The throughput graph will then be visible in the Analysis.hp_loadrunner_analysis_tutorial_throughput

Transaction response time (Percentile)

This graph helps you understand whether your response time meet the accepted criteria.

The graph will then be displayed as shown below when you add this to the Analysis session.hp_loadrunner_analysis_tutorial_transaction_response_time_percentile

Transaction Performance Summary

This gives a summary of the minimum, average and maximum time of transactions in the load test.

The graph will then be displayed as shown below when you add this to the Analysis session.hp_loadrunner_analysis_tutorial_transaction_performance_summary

Connections

This graph gives the number of connections during the elapsed time of the load test. Obviously during the beginning of the load test, it should increase and decrease towards the end of the load test.

The graph will then be displayed as shown below when you add this to the Analysis session.hp_loadrunner_analysis_tutorial_connections

Connections per second

This graph gives the number of new connections and the number of connections which were shut down during the course of the load test.

The graph will then be displayed as shown below when you add this to the Analysis session.hp_loadrunner_analysis_tutorial_connections_per_second

Page Component breakdown

This is a useful graph for finding any response time issues per page. In this the response time for each page over the duration of the load test is provided.

The graph will then be displayed as shown below when you add this to the Analysis session.hp_loadrunner_analysis_tutorial_page_component_breakdown

Page Download time

This graph gives the time each page took to download from the server. If the time is high, then this is a cause of concern for the application.hp_loadrunner_analysis_tutorial_page_download_time

How to view the scenario settings

If you want to know what are the run settings which were used in the Controller for the load test, you can do that in the Analysis as well. Sometimes you may open an existing session file and want to know what the scenario settings used in the load test were.

Use the file menu option of File > View Scenario Runtime settingshp_loadrunner_analysis_tutorial_scenario_runtime_settings

Once you do this, you will get the below screen which will provide details on the Run Scenario settings. If you click on the Scenario Schedule, you will get the required details about the Schedule which was used in the Controller module.hp_loadrunner_analysis_tutorial_scenario_schedule

How to export results to HTML

The results in the Analysis can also be exported to HTML if required. To export the results to HTML, follow the below steps. Click on the file menu option of Reports->HTML Report.hp_loadrunner_analysis_tutorial_html_report_option

You can actually see the progress of the report being generated.hp_loadrunner_analysis_tutorial_generating_html_report

You will then be able to see the HTML Report in the browser.hp_loadrunner_analysis_tutorial_html_report

How to merge graphs

Merging graphs can be useful when you want to view the information in 2 graphs at the same time. This can be useful for comparing results. Ensure that when you are merging graphs that at least one graph is open.

Let’s choose the Hits per second graph and then choose the Merge Graphs option from the Context menu.hp_loadrunner_analysis_tutorial_merge_graphs

Then choose the option to merge the graph with the Running VUsers and then click the OK button.hp_loadrunner_analysis_tutorial_merge_graph_option

You will then get the complete picture of the number of hits per second as per the virtual users. The sample result is shown below.hp_loadrunner_analysis_tutorial_merge_graph_result

How to save a session

To save an Analysis session, you can do this from the file menu.hp_loadrunner_analysis_tutorial_save_a_session_menu_option

In the dialog box, choose the location and enter a name for the session and then click the Save button.hp_loadrunner_analysis_tutorial_save_dialog_box

How to open an existing session

To open an existing Analysis session, you can do this from the file menu.hp_loadrunner_analysis_tutorial_open_analysis

Then go to the desired file location and choose the required analysis session file.hp_loadrunner_analysis_tutorial_open_session

Next we will learn what is Correlation. Its benefits, along with examples.