This entry appears in the Mercury Interactive Knowledge Base as entry 5012. It was posted by me on 2003-11-30.

Description

It is easy to view the number and type of errors as they occur during your test from LoadRunner Controller. It is difficult to determine error information with the same level of detail after the test unless the errors are exported to a file before the Controller is closed.

Solution

All errors are written to a Microsoft Access file in the results directory (output.mdb). Knowledge Base article #4164 provides an executable that extracts this information in the same format as the LoadRunner 7.2 Controller; and article #4840 shows how to extract all errors types at once with a SQL statement in Access. This article provides SQL statements to recreate all the error views provided by the LoadRunner Controller. It should be useful to people who want detailed error information, who do not want to run an untrusted executable on client machines, and who want the ability to easily modify their queries.

Attachment

extracting_errors_from_the_loadrunner_database.doc

It is easy to view the number and type of errors as they occur during your test from LoadRunner Controller. It is difficult to determine error information with the same level of detail after the test unless the errors are exported to a file before the Controller is closed.

All errors are written to a Microsoft Access file in the results directory (output.mdb). Knowledge Base article #4164 provides an executable that extracts this information in the same format as the LoadRunner 7.2 Controller; and article #4840 shows how to extract all errors types at once with a SQL statement in Access. This article provides SQL statements to recreate all the error views provided by the LoadRunner Controller. It should be useful to people who want detailed error information, who do not want to run an untrusted executable on client machines, and who want the ability to easily modify their queries.

LoadRunner 7.8 includes some queries in output.mdb, but they have no description and do not provide the same views as the Output window in LoadRunner Controller.

To re-create the Output window with error counts for all error types, use:

SELECT
 ErrorSummary.Type,
 ErrorSummary.Error_Code,
 ErrorSummary.Error_Template,
 ErrorSummary.Total_Messages,
 ErrorSummary.[#Vusers],
 ErrorSummary.[#Scripts],
 ErrorSummary.[#Generators] FROM
 ErrorSummary
WHERE
  ErrorSummary.Type=2;

User-defined output and debug messages are also written to the database. To restrict the query to errors only, disregard entries with Type not equal to 2.
To re-create the Output window for a specific error type, use:

SELECT
 ErrorMessages.Message_String,
 Scripts.Script_Name,
 Actions.Action_Name,
 Main.Line, Main.Time,
 Main.Iteration,
 VusersID.Vuser_ID_Name,
 Injectors.Injector_Name
FROM
 ((((Main
 INNER JOIN
  ErrorMessages
 ON
  Main.Message_ID = ErrorMessages.Message_ID)
 INNER JOIN
  Scripts
 ON
  Main.Script_ID = Scripts.Script_ID)
 INNER JOIN
  Actions
 ON
  Main.Action_ID = Actions.Action_ID)
 INNER JOIN
  VusersID
 ON
  Main.Vuser_ID = VusersID.Vuser_ID)
 INNER JOIN
  Injectors
 ON Main.Injector_ID = Injectors.Injector_ID
WHERE
 Main.Type=2
 AND
 Main.Error_Code=-17999
ORDER BY
 Main.Time;

The Error_Code value should be changed to the code for the desired error.
Note that this is similar to the pre-defined query QmainErrList in the Access database.

In general, when exporting a particular type of error, the most important fields to extract are Message, Time and Vuser. Modify these SQL scripts as needed.

 

Published On: January 29, 2004Tags: ,

2 Comments

  1. Gopalakrishnan July 18, 2012 at 4:57 pm

    Stuart
    This sounds good,but i have faced a situation where am in need of detailed error statistics like type and number of error occurred in regular time interval of test duration. Say we are running a load test for 4 hours i need a report which shows count and type of error occurred in every 30minutes of test period-4 hours. its useful to track error pattern during our execution.Am bothered whether its possible or not from controller. I have a time consuming work around for this requirement from analysis,but i like to know is there a easy way to meet my requirement.

  2. Satrajit Nag August 29, 2014 at 11:50 am

    Stuart
    I have a problem regarding extracting the list of urls hit during an test execution and also the number of hits per url. Can i extract the same from output.mdb file or any other file in that case?…Please help me.

Comments are closed.