loadrunnertruclient

LoadRunner TruClient - Dynamic Transactions with Parameters/Variables


Just wondering whether it's possible to create a dynamic transaction in TruClient like you are able to in the HTTP protocols? Whenever I try and create a transaction I am unable to add a variable to it. If anyone has any ideas/solutions, it would be much appreciated - or let me know if TruClient doesn't support this. As I'd rather have a single script doing what I want rather than 25 scripts or so.

Thanks


Solution

  • Sorry this took a while, I've figured this out.

    Create an "Evaluate JavaScript" section before the transaction and have the code:

    'LR.startTransaction(whateverYourVariableIs);'
    
    [Steps of the script here..]
    
    'LR.endTransaction(whateverYourVariableIs,"Pass");'
    

    I had some issues with the ending of the transaction and had initially used Pass without quotation marks. This expects you to call the 'Pass' variable, if you use quotes it will take it as a literal.