Dumb monkey testing
Dumb monkey testing is widely used to find broken links and edge case input field bugs. For many testers it has become a must have tool in their bag and delivers rich bug bounties. The benefits are widely accepted for finding unexpected bugs, checking reliability and can even help to break the entire system. Yet it is easy to perform out of the box with no special skills and can even handle dynamic links.
Once you get into the details, dumb monkey testing can become a bit like Python programming. Easy to learn but hard to use. That is because of the very nature of random testing where you can’t easily repeat failing tests to reproduce the many bugs found, making debugging very difficult. User frustration quickly mounts when they end up running many more tests than they need to. Because random tests will repeat themselves and produce inputs which are invalid and not wanted in the test.
Worked Selenium WebdriverIO example
This dumb monkey is looping around seven times. Each time it will generate a random indexValue created with Math.random. Each time around the loop it passes the random indexValue to a Page Object which contains the findElement code for the navbar selector as shown below.
Unfortunately, as is the way with random, the same indexValues will get repeated many times. It will also sometimes randomly produce an indexValue of 4 which for this dumb monkey test will not work. This is because the XPath “.//div[@id=’navbarSupportedContent’]/ul/li” will select the Resources link on the Navigation Bar of www.lambdatest. When we execute a “browser back” from this link selection, we navigate away from the lamdatest website. Unfortunately our dumb monkey tests will then stop working!
Intelligent Monkey Testing
Our Vitaq AI test Automation tool contains intelligent monkey testing capabilities. We can control the generation of random data in many intelligent ways. Using Vitaq AI intelligence, data values do not get repeated and unwanted test values do not get generated. Take a look at the code below where we use the Vitaq AI methods for “do_not_repeat” and “disallow_value”; “indexValues” is a defined Vitaq Test Activity variable of type integer with a range of 1 to 7.
Each time the intelligent monkey test code is executed with Vitaq AI Test Automation, it is started with a seed number. If we want to reproduce the same tests for debugging purposes, we just have to rerun the intelligent monkey test script with the same seed number. Same seed, same repeated test. Different seed, different repeated tests.
AI-assisted and coverage-driven
So next time you take your monkey testing out of you bag, make sure you don’t catch another monkey on your back. With Vitaq AI, you can easily train it to be intelligent with Artificial Intelligence. Vitaq is driven by your user journey goals to maximise test coverage whilst minimising the number of tests needed to achieve maximum QA coverage.