Home > database >  JMeter - OutSystems - Login Once Controller
JMeter - OutSystems - Login Once Controller

Time:07-16

We are testing an OutSystems application sitting on an Azure infrastructure. When performing a recording all of the requests captured are AJAX calls. And not in the traditional HTML format.

I'm trying to set up a scenario whereby if a transaction fails within the main set of transactions (outside of the login and logout), the script restarts from the beginning of the main transactions. The user shouldn't attempt to login again. The current setting for the thread group is "Action to be taken after Sampler error = Start Next Thread Loop". I have added a Only Once Controller, but when a failure occurs, the script stills attempts another login. I have also added the main transactions within a Runtime Controller. That also doesn't work.

enter image description here

In the above demo the Randomly Failing Sampler is a JSR223 Sampler which randomly fails in 50% of cases via the following Groovy code:

if (org.apache.commons.lang3.RandomUtils.nextInt(0, 10) > 5) {
    SampleResult.setSuccessful(false)
}

As you can see in case of failure the virtual user:

  1. Goes to the next iteration of the Thread Group
  2. Doesn't execute "Login Sampler", it's being run only once, during the 1st iteration of the Thread Group
  3. Doesn't execute "Always Successful Sampler" because new iteration is started as soon as failure is detected.
  • Related