How I may help
LinkedIn Profile Email me!
Call me using Skype client on your machine

Reload this page LoadRunner Error Message Lister

Here is a classic ASP script to list error messages from the output.mdb Ms-Access database created by LoadRunner as part of performance testing. This is a companion to my pages on Vu Scripting, performance monitoring, and performance tuning.

 

Topics this page:

  • The Annoyance
  • My Solution
  • How it works
  • Get It
  • Make It Your Own
  • Table Schema
  • Your comments???
  •  

    RSS XML feed for load testers RSS preview for load testers Site Map List all pages on this site 
    About this site About this site 
    Go to first topic Go to Bottom of this page


    Set screen The Annoyance

      One of the annoyances with LoadRunner is that Report.html files created by LoadRunner Analysis do not have a link to error messages like those displayed by the Controller.

      Thankfully, LoadRunner creates an output.mdb file to hold error messages. But, alas, the html report does not refer to it.

      Because the output.mdb file is in MS-Access format, some "DBA" skills are necessary to connect the various code tableson this page before the information becomes intelligible.

      The database schema changed with v8.1. Reports in v7.8 have different formats than v8.0 and v8.1.

    Set screen My Solution

      So I wrote an ASP script that links the tables together with a SQL query, then displays two views of the output.mdb database: a Summary and Detail view.

      I have it running on my IIS server at Javascript feature http://www.wilsonmar.com/asp/lrerrlist.asp

      Let me know what you think right away.

      Get it and use it ... while it's still free during its beta period ending soon.

     

    "Wall of Light Light" by Sean Scully

    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen How it works

      The script uses several Javascriptanother page on this site and ASPanother page on this site coding tricks. Here's a tour though the program:

    1. When you first invoke lrerrlist.asp, you need to specify a file path such as C:/wherever/output.mdb . This program only works with files named output.mdb.

    2. The ASP program saves the filepath as a cookie on the client, then retrieves it upon every subsequent invocation.

    3. The script shows two diffent views: Sum'ry and Detail. By default, it shows the Summary report upon entry:

    4. Click on the blue number under the #Mes-sages column heading. Notice that the Error Code is automatically filled in.

    5. To display all lines, click on the Error Code field to clear it out.

    6. The Detail view shows a default of 5 rows per page. This behavior can be controlled by changing the number under the R: heading.

    7. The default From and To dates are the maximum values that can be stored. Change it and press "Go" to filter the report more.

    8. The color of report headings and detail lines mimic, by default, the Report.html generated by version 8.0 of the LoadRunner Analysis program. Click on "v7" to change the display to the purple and yellow color of version 7.8.

    9. All the selections are reflected in a field within the Address line at the top of your internet browser. This string can be copied and pasted .


    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Get It

      Since it's an ASP file, this script needs to reside on the IIS server which hosts the Report.html files generated by LoadRunner Analysis program.

      So, on the hosting machine:

      1. Invoke a text editor such as Notepad.
      2. click here for the ASP source.
      3. Click on the text, then press Ctrl-A and Ctrl-C to copy the whole file into your Windows clipboard.
      4. Click on the text editor and press Ctrl-V to paste the clipboard's contents in your file.

      Caution! You must save the file as "lrerrlist.asp" because it refers to itself.

      For help in selecting the file path on the same machine, copy and paste my Javascript ActiveX program Javascript feature lrerrpick.htm so that when you're logged on that machine, you can run Microsoft Internet Explorer to click your way to select the Filepath: needed by lrerrlist.asp.

       

     
    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Make It Your Own

      To make this work for you:

      1. At your Internet browser's Address bar, type in http://localhost/lrerrlist.asp, but substitute "localhost" with the IP address or name hosting the Report.html files generated by LoadRunner Analysis.
      2. When the screen appears, specify the full path of the output.mdb file.
      3. Click the version of LoadRunner you want to display for.
      4. Click "Go" for the listing.

      5. Invoke the Report.html file generated by LoadRunner.
      6. Right click on the links frame at the left and select "View Source" for the contents.html file.
      7. Copy the line(s)on this page associated with the last item on the list.
      8. Paste the line(s) to create an additional line.

      9. Copy the contents of the LRErrList.asp Address Bar (http://...)
      10. Highlight the URL.
      11. Paste the URL from LRErrList to replace the URL.
      12. Save (replace) the file to where you found it.
      13. Invoke the Report.html again and test the new link.

       

     
    Go to Top of this page.
    Previous topic this page
    Next topic this page

      Set screen Put It in Report.html

      Each LoadRunner version generates HTML Reports using a different format within file contents.html:

      For LoadRunner 8.1, duplicate the block of code such as:

        <tr>
          <td width="1%"></td>
          <td><a class="treelink" href="Report11.html" Target="Main_Frame"><span class="text_em">Windows Resources</span></a></td>
        </tr> <tr>
          <td width="1%"></td>
          <td class="sp_10px_row"></td>
        </tr>

      LoadRunner 8.0 (the default), is similar:

        <tr>
          <td width="10"></td>
          <td><a class="treelink" href="Report11.html" Target="Main_Frame"><span class="text_em">SiteScope</span></a></td>
        </tr> <tr>
          <td width="10"></td>
          <td class="sp_10px_row"></td>
        </tr>

      For 8.0, add the lines highlighted here (but replace "loadreportserver" with your own server's IP or server name):

        <tr>
          <td width="10"></td>
          <td><a class="treelink" href="http://loadreportserver/LRErrList.asp?D=..." Target="Main_Frame"><span class="text_em">Error Messages</span></a></td>
        </tr> <tr>
          <td width="10"></td>
          <td class="sp_10px_row"></td>
        </tr>
      </table>

      For LoadRunner 7.8, in file contents.html such as this:

      <p><a href="Report3.html" Target="Main_Frame"> ...</a><p>
      <p><a href="Report4.html" Target="Main_Frame"> ...</a><p>
      </body></html>

      add the line highlighted here:

      <p><a href="Report3.html" Target="Main_Frame"> ...</a><p>
      <p><a href="Report4.html" Target="Main_Frame"> ...</a><p>
      <p><a href="http://loadreportserver/LRErrList.asp?D=..." Target="Main_Frame"> ...</a><p>
      </body></html>

     
    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Output.mdb Internals (Tables and Columns) for V7.8 and v8.x

      Within the output.mdb database are 8 related tables. The Main table has column values that are keys to id's in the other 7 tables.

      Table Columns
      Actions Action_ID, Action_Name (such as vuser_Init)
      ErrorHelp ?
      ErrorMessages Message_ID, Message_String
      ErrorSummary Type, Error_Code, Error_Template, Total_Messages, Area, #Vusers, #Scripts, #Generators
      Injectors Injector_ID, Injector_Name (such as IP number)
      Main Row_ID, Iteration, Area, Line, Script_ID, Vuser_ID, Injector_ID, Action_ID, Type, Time, Message_ID, Error_Code
      MaxSize cMaxSize, cDeletionQuota
      Scripts Script_ID, Script_Name
      VusersID Vuser_ID, Vuser_ID_Name

      strSQL = 
      "SELECT Main.Row_ID , Main.Time, Main.Type, Main.Iteration " & _
      " , Main.Message_ID ,Main.Error_Code ,ErrorMessages.Message_String " & _
      " , Main.Action_ID , Actions.Action_Name " & _
      " , Main.Injector_ID, Injectors.Injector_Name " & _
      " , Main.Vuser_ID, VusersID.Vuser_ID_name  " & _
      " , Main.Script_ID, Scripts.Script_Name " & _
      " FROM ((((Main INNER JOIN ErrorMessages ON Main.Message_ID = ErrorMessages.Message_ID) " & _
      	" INNER JOIN Actions ON Main.Action_ID = Actions.Action_ID) " & _
      	" INNER JOIN Injectors ON Main.Injector_ID = Injectors.Injector_ID) " & _
      	" INNER JOIN VusersID ON Main.Vuser_ID = VusersID.Vuser_ID) " & _
      	" INNER JOIN Scripts ON Main.Script_ID = Scripts.Script_ID "
      

      Set screen Tables for V8.1

      Within the output.mdb database for v8.1 are 2 tables for error messages. The ErrorMessage table has an "Error Message" column that is keyed by the "Error ID" column, which is referenced by the "Error_meter" table:

      Column Sample Value Description Joint Table
      Event Instance ID - - nil
      Event ID 0 - Event_map
      End Time 1211.906 # days from ... nil
      Group ID - - VuserGroup
      Error ID - 0... ErrorMessage
      Vuser ID - - VuserId
      Host ID - - Host
      Script ID - - Script
      Result ID - - Result
      Line Number - - nil
      Parent Handle - - nil
      Action ID - - ScriptActions
      Father ID -1 - nil
      Iteration Number 1 - nil
      Amaximum 1 - nil
      Aminimum 1 - nil
      AsumSq 1 - nil
      Account 1 - nil
      Value 1 - nil

      The "Join Table Name" was obtained from the "MetaData" table.

      Since the Time is stored as a number of days since an epoch, it must be converted into human-readable text.

      The new schema has a "MastersMap" table that contains the SQL query used to create the "T" tables.

      strSQL = 
      "SELECT Main.Row_ID , Main.Time, Main.Type, Main.Iteration " & _
      " , Main.Message_ID ,Main.Error_Code ,ErrorMessages.Message_String " & _
      " , Main.Action_ID , Actions.Action_Name " & _
      " , Main.Injector_ID, Injectors.Injector_Name " & _
      " , Main.Vuser_ID, VusersID.Vuser_ID_name  " & _
      " , Main.Script_ID, Scripts.Script_Name " & _
      " FROM ((((Main INNER JOIN ErrorMessages ON Main.Message_ID = ErrorMessages.Message_ID) " & _
      	" INNER JOIN Actions ON Main.Action_ID = Actions.Action_ID) " & _
      	" INNER JOIN Injectors ON Main.Injector_ID = Injectors.Injector_ID) " & _
      	" INNER JOIN VusersID ON Main.Vuser_ID = VusersID.Vuser_ID) " & _
      	" INNER JOIN Scripts ON Main.Script_ID = Scripts.Script_ID "
      


    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Portions ©Copyright 1996-2010 Wilson Mar. All rights reserved. | Privacy Policy |

    Related Topics:
    another page on this site LoadRunner Scripting 
    another page on this site Performance Testing 
    another page on this site NT Perfmon / UNIX rstatd Counters 
    another page on this site Performance Tuning 
    another page on this site WinRunner 
    another page on this site Rational Robot 
    another page on this site Free Training! 
    another page on this site Tech Support 


    How I may help

    Send a message with your email client program


    Your rating of this page:
    Low High




    Your first name:

    Your family name:

    Your location (city, country):

    Your Email address: 



      Top of Page Go to top of page

    Thank you!