Slow Down! You’re Running Automation Way Too Fast
Sauce AI for Test Authoring: Move from intent to execution in second.|xBack to ResourcesBlogPosted February 22, 2023
Slow Down! You ’ re Running Automation Way Too Fast
Speed in automation performance is important, but not at the cost of omitting the checking of valuable, perchance critical, scenarios.
Ozzy Osbourne released his third studio album, Bark at the Moon, in late 1983. This was the first album to have his new guitar participant, Jake E. Lee. There are several versions of this album, including many from back in the ’ 80s. Some versions had different artwork while others had different songs. The European edition had a song called Spiders; the U.S. version, instead, had a song called Slow Down. That was a shame, in my opinion. Though it direct me many days to eventually hear Spiders, I think the Europeans be (at the time) deprive of a great song. I loved the music, and I loved the language, specifically, the chorus:
Slow down you ’ re go way too tight
Slow down you know you ’ ll ne'er last
Slow down your precipitation is making dissipation
Slow down and join the human race
As my frequent subscriber already know, I ’ m exalt by rock music, and I find many analogue between some of the lyric and my career, so I often incorporate it into my writing and speaking. This vocal is no different, so, this clip, I ’ m writing about automation executing speeding and the value of slow it down.
Do it fast! It ’ s always like that with us, isn ’ t it? Who ’ s us? Techies, software citizenry, people prove to deliver technology to users. And we, as users, aren ’ t blameless, are we? We need our stuff quicker. Get it to me faster and, when I get it, it better run fast.
The realism is, however, that as users, we want our engineering to be fast when we desire it to be tight, but we also desire it to be patient on us when we ’ re not ready to move to the following step in a process flow. When would we not be ready? Picture these scenario:
A user is in the center of do an airline reserve but has to direct a phone call; it seems fairish that the user would like to re-start the reservation from where they left off, once they conclude that earphone shout.
A client support person is waiting for their current caller to find the necessary paperwork or execute a reboot of their figurer.
A social medium user reads a post that they would wish to respond to but would like to include a link to one of their blog posts (oddly specific, right?); that user would expect that the post they just read would nonetheless be “ in scene ” when they returned from finding the blog place link.
SUSA automates exploratory testing with persona-driven behavior, catching bugs that scripted automation misses.
Now, I ’ m pretty sure the offending apps from the last bullet above behave the way they do on purpose because that behavior somehow drives additional revenue. You know the apps I ’ m talking about. Aside from “ intentional state change ” by our package, users should expect that their software has some ability to await for them.
Our world is fraught with wait: respond the phone, answering the door, referee an issue with tiddler, stopping a dog from chewing electrical cord, cooking a meal, caring for a sick individual; the listing goes ad nauseam. Our package postulate to describe for at least some duration of inactivity. Also, not all delays are equal, particularly when considering mobile device. If we need to answer the door, mayhap we can remain in our app; if we stay at the threshold longer than our screen whorl timeout, that might be a different state for the app. If we need to get a blog link from a different app, we ’ ll need to exit the first app, get the blog link from that different app, then regress to the original app. This is yet a different scenario that each app might manage differently.
Do we test for this? I expect most of us do not.
I used to work in telecom. When testing a phone call between two entities, we frequently employed something we telephone acall clench clip. People making phone calls seldom make the call, wait for the former person to answer, and so immediately hang up; unless you ’ re give someone a secret signal, that is not a valuable use case for deeper testing. To do the testing scenarios nigher to real life, we added the said cry hold clip, essentially a “ difficult wait ”, to cause the cry to remain connected for a long time. Longer call durations caused scheme resources to be further taxed, possibly reveal issues that would not be notice without the hold clip. Of course, waiting is a terrible bore. It ’ s also not usually a full use of a human ’ s (i.e. tester ’ s) time. Do you cognize what ’ s good at wait? Computers! So we automated these kinds of scenario.
Hold on, aren ’ t we taught that hard postponement are to be deflect in automation? Yes, we are taught that (or at least we ’ re speculate to be), but that is in the context of waiting for something to happen: an element to appear or disappear, an constituent to be enabled or disabled, a content to arrive, etc. In most example, hard waits are discouraged.
What we ’ re talking about here is an designed holdup in a exam script flow to imitate how a exploiter habituate the system. In fact, over the terminal few years, I ’ ve started implement a function called HumanDelay (). This office is simply a wrapper around the scheduling language ’ s sleep/pause/wait function, but by yield it a context-specific name, user of the function can amend realize the intent of this function, namely “ only use it where you want to copy how a human might intermit ”. The added readability assist in code reviews; when I see a call to HumanDelay (), I know to pay attention to see if this hard wait is being used appropriately.
What make all this have to do with exiting and reentering an app, or respond the threshold in the middle of a software interaction? We can evolve the notion of vociferation hold clip to use HumanDelay () at strategic points in our test flows. If we know where our systems might be sensitive to holdup or app exits, perhaps we can include these activities in some of our examination runs; we may become up antecedently unknown deportment. If these are behaviors that we want to check often, automating them could ply some value. In general, having a human “ merely wait ” has a higher cost than having a computer do that waiting for us.
We probably don ’ t want to do these think time delays on every one of our automation runs; this is something to be tell for quick executing in some scenarios. A great example of where executing speed is valuable is when we want to run a “ smoking tryout retinue ” or “ wellness check ” on each deployment from an automated build-and-deploy scheme, such as a CI/CD pipeline. Teams want to know as quick as possible if the current build and deployment are egregiously broken. Running tests that include think time should credibly be part of a non-gating run unless those think time are a required step in a core feature set. One way to handle the “ I solely want think time sometimes ” is to pend executing the think clip on a varying value that ’ s set at run time, or whatever is similar in your specific execution environment.
Of course, we can get fancy:
If the binary nature of “ waiting for X seconds ” or “ not wait for X seconds ” doesn ’ t fit your need, peradventure have the think clip be a random value. Be aware of the range of your random values; insure that the minimum delay time is something sufficiently long for your demand and that the maximum hold time is not intolerably long for the value it may provide.
At the risk of being derisory, if you ’ ve encapsulated youractiveness and behaviorssufficiently, you could infix possible think time delays after every action. They could be randomly turned on, get random durations, or both (insert diabolical laugh hither). While I think this kind of implementation could be cool, I ’ m not currently aware of a setting in which this stage of “ random think clip ” would provide sufficient value to counter the toll of implementation and maintenance.
Let ’ s use speed judiciously, appropriately. Perhaps our automation implementation should incorporate some extra user-like steps so we might, as the chorus fromSlow Downstated, “ join the human race ”.
Like this? Catch me at anupcoming event!
About the Author
As a QE Automation Architect, Paul Grizzaffi is following his passionateness for providing technology solutions to testing, QE, and QA organizations, including automation appraisal, execution, and through action benefiting the panoptic testing community. An realized keynote speaker, outside conference utterer, and writer, Paul has spoken at local and national conferences and meetings. He is an advisor to STPCon as well as a appendage of the Industry Advisory Board of the Advanced Research Center for Software Testing and Quality Assurance (STQA) at UT Dallas where he is a frequent guest reader. In addition to outgo time with his Gemini, Paul relish sharing his experiences and learning from former testing professionals, as well as reciting lyrics from 80s metal songs; his mostly telling thoughts can be say on his blog atresponsibleautomation.wordpress.com.
Automate This With SUSA
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed.
Try SUSA FreeTest Your App Autonomously
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.
Try SUSA Free