In LoadRunner, How do the make the Vuser exit the iteration and start the n next iteration if an error is encounter

  • Questions
  • In LoadRunner, How do the make the Vuser exit the iteration and start the n next iteration if an error is encounter
Question ID: 105655
0
0

I am running a test with 18 scripts in it. Virtual users iterate every 5 minutes +/-60 seconds for an hour. However, once a Vuser encounters an error, they move to failed status instead of ending the current iteration and firing again in 20 or so minutes. What is it I have neglected to do? Did I just leave a checkbox unchecked somewhere

Marked as spam
Posted by (Questions: 218, Answers: 15)
Asked on October 27, 2014 5:01 pm
157 views
Answers (1)
1
Private answer

Option 1:

Try checking the '' continue on error'' in the ''design test's '' runtime setting(RTS) --> Miscellaneous error handling options

Open the test design

- Select RTS
- Miscellaneous
- Check the ''continue on error'' checkbox
- Press ''OK''
- Press ''Save''

Then re -Run the test

With the ''continue on error '' un -checked if the Vusers get an error , any error, he fails and quits the test run. If ''continue on error'' is checked the Vusers continue trying to do the next step in the iteration and then the next iteration.

Option 2:

You can add coding in the script to tell the Vusers when and if he get an error to end the iteration and start the next see the VuGen help ''Function reference '' for details on the LR command ''lr_exit''

Use these ''Continuation Options'' for the ''Lr_exit'' function, to tell the Vusers how to exit

- lr_exit(LR_EXIT_ACTION_AND_CONTINUE, LR_AUTO); Exit without any condition, and go directly to end action
- lr_exit(LR_EXIT_MAIN_ITERATION_AND_CONTINUE, LR_AUTO);Stop current action, and go to the next action
- lr_exit(LR_EXIT_ITERATION_AND_CONTINUE, LR_AUTO); Stop current iteration, and go to the next iteration. If called from within a block iteration, only the block iteration will be exited, and not the global iteration
- lr_exit(LR_EXIT_VUSER_AFTER_ITERATION, LR_AUTO); Run until the end of the current iteration and then exit
- lr_exit(LR_EXIT_VUSER_AFTER_ACTION, LR_AUTO); Run until the end of the current action and then exit

Marked as spam
Posted by (Questions: 12, Answers: 363)
Answered on October 27, 2014 5:10 pm