0

I am running 4 Vugen scripts in loadrunner Controller for which i have 10000 users, Some users are getting failed after logging in(404 page/TCP Error Page) for which development asking me to delete those users from the dat file. I know we can get the users list from individual log files but i want to know is there is any specific method to export the failed users into a file. So that in the next run i will eliminate those users in my next run.

Hussain
  • 1
  • 1
  • Are you talking about Vuser Id or relevant user names in a parameter file to log in your AUT? – tedyyu Feb 23 '21 at 06:48
  • Yes..Relevant User names in a Parameter files...Out of 10000 users some 2000 users are failing due to application issues. – Hussain Feb 23 '21 at 13:07

2 Answers2

0

This is a coding issue within your test code for how you handle errors. You can either elect to have LoadRunner kill your use upon error, or you can select [continue on error] and handle it yourself. You can log the errant parameters to the output window, lr_output_message().

But there is likely a far easier path, one which your application owners should have brought up rather than make you fish through your data with another test:

  • Go to the HTTP Error log on your web server
  • Search for the page in question, with a status of 404
  • Take a look at the parameters for the request, beyond the ? in the request. You are likely to find the errant parameters here.
James Pulley
  • 5,606
  • 1
  • 14
  • 14
0

There is no built-in way to export failed transactions with custom data currently in LoadRunner.

One approach I can conceive is to use VTS feature provided by LoadRunner. It requires some extra work to install the VTS component as a HTTP(S) service to manage your parameters for scripts e.g. user names and paswords, as well as to persist any custom data you are intrested in via lrvtc-* serires API.

In your vuser_init script, prepare the VTS connection via lrvtc_connect_ex API.

Then in code where you detect a login error, use lrvtc_send_message to keep all failed user names, e.g.

Action()
{
    int rand = 0;
    lr_output_message("login user %s", lr_eval_string("{LoginUserName}"));
    rand = atoi(lr_eval_string("{RandomNum}"));
        
    if(rand < 60) {
        //mock a http login failure by possibility
        lrvtc_send_message("FailedLoginUser", lr_eval_string("{LoginUserName}"));
    }
    
    return 0;
}

Note: Strings in {} are LR parameters I created in VuGen. To simplify the script, I used a random value to mimic the possible login error in your case.

After each test run, you can open VTS management portal to browse the values you saved.

Advanced usage: add a new column to your user name parameter table in VTS, e.g. "Valid", then directly update its status in the same row according to validity of the login result.

tedyyu
  • 587
  • 6
  • 12