Feature Requests & Ideas

For bug reports and questions, please use the in-app chat or support@mabl.com.

Ability to select an element from a list at random

As a QA Engineer, I would like to create a test that select an element at random from a drop down list so that we could catch potential issues that may be hiding outside of the happy path for the user.

For example, the app under test may present the following question with a list of answers in a dropdown menu:

Question: "Are you satisfied with this Application?"

Answers in a drop down

  • "Yes"

  • "No"

  • "Maybe"

It is possible to do this today with JavaScript code, but it would be much easier to have this feature included in the mabl Trainer , as our application has multiples questions/fields similar to the example above, and it could speed up the process of creating tests where randomized elements are selected.

  • Guest
  • Jun 4 2019
  • Unlikely to Implement
  • Attach files
  • Matthew Nagel commented
    05 Jun 22:47

    At the moment we have Any / First / Last option with selectors and as noted by the OP 'Any' and 'First' seem to be functionally indistinguishable.

    I agree it would be much more useful if the 'Any' option chose a pseudo random element which matches the selector.

    My use case is with selection list's. Sometimes bugs hide in obscure combinations of selections which do not appear in a normal 'happy path' test. It would be good to be able to randomize selections so that over time we get coverage of all possible selection combinations. 

  • Admin
    Anton Hristov commented
    06 Aug 13:32

    Thank you all for requesting this feature. I modified its description to capture its essence and am changing its status to "Unlikely to implement" since at this point we are focused on deterministic testing rather than non-deterministic testing. We will revisit this request when the team starts working on various approaches to non-deterministic testing. Note that introducing non-deterministic tests into your regression test suite may lead to a lot of flakiness that is hard to troubleshoot due to the randomness, and thus may lead to your team to lose trust in your entire suite of automated tests. Hence, we need to be cautious how we approach non-deterministic testing as part of an overall test automation strategy.

    Please, continue to use to the comments to share feedback and use cases relevant to this request since we review every piece of feedback we get.

  • Brent Engelman commented
    15 Aug 13:07

    If it is an random choice you want can use javascript random choice generation.

    function mablJavaScriptStep(mablInputs, callback) {
    var dStatus = ['725', 'CNF','DEJ','SQA161','WRD'];
    var status = dStatus[Math.floor(Math.random() * dStatus.length)];

    callback(status);
    }

Copyright © 2019 mabl Inc. All rights reserved.