LoadRunner

Articles – Scripts – Tips – Tricks – Automation – Tools & More….

Extract Transaction Data From LoadRunner Analysis

I had a need to extract transaction response time data from a bunch of LoadRunner Analysis files, and I really didn’t want to do endless cut and paste operations from within the LoadRunner Analysis tool. I created this Python script to extract transaction response time data from the LoadRunner Analysis mdb file and output into CSV format, which can then be imported into MySQL, Excel, etc. The analysis file is a MS Access JET Database which allows the use of Python’s win32com module to access the data.
# Extracts Transaction response time data from the MS Jet database file (.mdb)
# created by LoadRunner Analysis tool
#
# Requires DAO 3.6 library.
# ——————————————————————–
# Usage: python lr_extract.py lr_analysis.mdb
import sys
import string
import pythoncom
import win32com.client
const = win32com.client.constants
daoEngine = win32com.client.Dispatch(’DAO.DBEngine.36′)
db = daoEngine.OpenDatabase(sys.argv[1])
query = “”"
select
[Result].[Start Time]+[Event_meter].[End Time] as t_stamp,
[Event_map].[Event Name] as txn_name,
[Event_meter].[Value] as resp_time,
[Result].[Result Name] as result_name
from
Result,
Event_map,
Event_meter
where
[Event_map].[Event Type] = ‘Transaction’ and
[Event_meter].[Event ID] = [Event_map].[Event ID]
order by [Result].[Start Time]+[Event_meter].[End Time]
“”"
rs = db.OpenRecordset(query)
print(”timestamp,transaction,response time,result name”)
while not rs.EOF:
print(”%s,%s,%s,%s” %(rs.Fields[0],rs.Fields[1],rs.Fields[2],rs.Fields[3]) )
rs.MoveNext()
# Extracts Transaction response time data from the MS Jet database file (.mdb)
# created by LoadRunner Analysis tool
#
# Requires DAO 3.6 library.
# ——————————————————————–
# Usage: python lr_extract.py lr_analysis.mdb
import sys
import string
import pythoncom
import win32com.client
const = win32com.client.constants
daoEngine = win32com.client.Dispatch(’DAO.DBEngine.36′)
db = daoEngine.OpenDatabase(sys.argv[1])
query = “”"
select
[Result].[Start Time]+[Event_meter].[End Time] as t_stamp,
[Event_map].[Event Name] as txn_name,
[Event_meter].[Value] as resp_time,
[Result].[Result Name] as result_name
from
Result,
Event_map,
Event_meter
where
[Event_map].[Event Type] = ‘Transaction’ and
[Event_meter].[Event ID] = [Event_map].[Event ID]
order by [Result].[Start Time]+[Event_meter].[End Time]
“”"
rs = db.OpenRecordset(query)
print(”timestamp,transaction,response time,result name”)
while not rs.EOF:
print(”%s,%s,%s,%s” %(rs.Fields[0],rs.Fields[1],rs.Fields[2],rs.Fields[3]) )
rs.MoveNext()

[via PE Blog]

A nice guide to Load runner 8.0 (old but good)

Check out all the parts Click Here –> Read the rest of this entry »

LoadRunner world!

This is the New Load Runner, I realized that my blog was getting to cluttered. So, all Loadrunner or Load testing related stuff will be posted here !

Just Enjoy ! Run Load Run ! :)

|