Performance Testing, LoadRunner Tips&Tricks

This site is moving to a bigger space @ LoadRunner TnT

Scripts: Starting a new transaction during iterations

Recently one of my load testing projects required us to monitor the time taken to upload a file into the application. This sounds simple and straight forward with the implementation of the lr_start_transaction and the lr_end_transaction. However, the catch is that the action block be iterated 10 times and within the 10 iterations, one of the iteration is to upload a different file of different size (thus causing different response time), which they want to measure.

What we did was implement a if-then-else to check the file and perform a lr_start_transaction when the script is uploading the different file and end the transaction with the lr_end_transaction when the submission completes. The snippet of the code is as followed:

if (!strcmp(lr_eval_string("{file}"), lr_eval_string("{set_file}")))
\\other codes
if (!strcmp(lr_eval_string("{file}"),lr_eval_string("{set_file}")))

The code detects the if the uploaded file is different and will start tracking the timing for the upload transaction. Hope it's useful to you.

Related Topics

Scripts: Duplicating Files on the Fly

Scripts: Step Download Timeout


Scripts: Auto or Manual Correlation?

Scripts: Remove Think Time

Scripts: Set Debug Mode in Script

Scripts: Replay Failure – Use Full Extended Log!

Labels: , , , , ,

Bookmark this article now! AddThis Social Bookmark Button

technorati reddit digg

0 Responses to “Scripts: Starting a new transaction during iterations”

Post a Comment

Powered by Google

Enter your email address:

Delivered by FeedBurner

Add to Technorati Favorites


Powered by Blogger

make money online blogger templates

Powered by FeedBurner

Blog Directory

Top Blogs

Software Blogs -  Blog Catalog Blog Directory

© 2007 Performance Testing, LoadRunner Tips&Tricks | Blogger Templates by GeckoandFly.
No part of the content or the blog may be reproduced without prior written permission.
Learn how to make money online | First Aid and Health Information at Medical Health