Avoiding the UI: Why and How to Run Tests With Scripts
Sauce AI for Test Authoring: Move from intent to execution in moment.|xBack to ResourcesBlogPosted October 4, 2016
Avoiding the UI: Why and How to Run Tests With Scripts
There & # x27; s no doubt about it: a user interface (whether it & # x27; s graphic or text-only) can be very nice, at least when you want to get decisions in real clip or enter data on the spot. But when you cognize precisely what you & # x27; re travel to do and how you & # x27; re going to perform each step, and you receive a set of tasks that you & # x27; re likely to perform more than once or doubly, any sort of user interface can slow you down, get in the way, and finally become a maddening, time-wasting botheration.
There & # x27; s no doubt about it: a user interface (whether it & # x27; s graphic or text-only) can be very nice, at least when you need to make decisions in real time or enter data on the place.
But when you know exactly what you & # x27; re going to do and how you & # x27; re proceed to perform each stride, and you have a set of tasks that you & # x27; re belike to execute more than once or twice, any sort of user interface can retard you down, get in the way, and eventually become a maddening, time-wasting annoyance. This is nowhere more true than with testing, where complex and extremely repetitive labor are the average, and there is nothing to be gained by waiting to enter an episodic dictation or piece of datum.
This clause explains the value of test script, and the lot under which you should consider use them to perform software tests.
How Do You Test?
I & # x27; ll get by ask a really canonic question: How are you currently prove? Are you still essay manually? For most people, the response is probably & quot; yes, sometimes. & quot; There are position in which you ask to do at least some examination by manus (for example, if you & # x27; re dealing with specialised hardware or package that does not lend itself to automated testing, or you want to test physical exploiter input).
But sometimes, testing is done manually simply because that & # x27; s the way that it has invariably been make, and nobody has gotten around to changing the process. Needless to say, this kind of manual examination is well-nigh ever serial as well, in part because there & # x27; s really no sane way to manually conduct genuine parallel tests, but mostly because & quot; that & # x27; s how we & # x27; ve always execute it. & quot;
There & # x27; s really no point in that kind of testing these days. This is the second decade of the 21st century -- not the questionably good old days of the IBM 360, punch card machines, and three-day turnarounds. You can automate just about any sort of tryout these days -- put it in a script once, and after that, all you have to do is run the script. And while you & # x27; re at it, you can parallelize most of your tests. Just think of all the time you & # x27; ll save -- you might even be able to live a normal life!
Basic Automation
Pro tip: Tools like SUSA can handle this autonomously — upload your app and get results without writing a single test script.
Test scripts are the nigh key level of test automation. Once you position a sequence of test measure in a script, you no longer need to execute them manually. Any farther change to the test simply becomes a change to the script itself. But scripted tests are only the beginning of test mechanisation. With a full set of hand for individual tests, you can notwithstanding find yourself stick to the keyboard and monitor, entering the commands to run each script as it comes up, and watching for the yield. This is mechanisation, but only a half-measure kind of automation. You can do better.
Automating Test Infrastructure
The next level of tryout automation is the exam regime itself. When you make a hand with a sequence of test operations, the exam itself becomes code, and you can run the examination in the same way that you would run any kind of code. This includes running the codification from a script.
So, you create test playscript for each set of tryout that you desire to perform as a group. These book simply run the individual test scripts in the proper sequence. This is the point where you can script such thing as parallel examination (which must be script-driven to accomplish much), and the automatic creation of virtual machine or containers for testing (also a basic part of most parallel testing).
At this point, you & # x27; ve reached the basic infrastructure level of testing automation. Your tests run from scripts, and for the most part, those scripts are run from other script, which also curb the test environment and at least the basic tryout yield. But even at this level, you may find yourself spending too much time managing your test system by means of some form of user interface. How much more can you automate?
Integrating Test Automation With CD
A lot. With the rightfield tools, you can in fact automate examination to the point where under most lot, your main user-interface contact with your test system will lie of viewing automatically generated test reports. Everything else can be handled by the same package that negociate your uninterrupted bringing system.
Consider, for exemplar, theJenkins Sauce OnDemand plugin. Testing by means of the Sauce Labs cloud-based test service can be (and very often is) fully automatise at the test infrastructure level, of course. The Sauce Connect™ proxy server allows you to connect your test site to the Sauce trial installation when that website is behind a firewall (a process that, only by the nature of proxy connections and firewall, can be technically complex). You can use the Firefox-based Sauce Connect Launcher to take care of the connection operation. This is the UI-based approach, which can be useful under a diverseness of circumstances.
You can avoid the UI, notwithstanding, by adding Sauce Connect to your Selenium test scripts. This is automation at the level of the test infrastructure. It is still contained within the infrastructure of the exam system itself, however, and not integrated with the overall uninterrupted delivery base.
This is where the Sauce OnDemand plugin makes its appearing. If you are using Jenkins to manage your uninterrupted delivery/continuous integration chain, the plugin allows you to automate the process of setting up (and tearing down) Sauce Connect, as well as integrate Sauce reports with Jenkins. Jenkins initiate the Sauce Connect link, and Jenkins displays Sauce yield. This effectively integrates your Sauce tests with your continuous bringing infrastructure in a way that can be fully script-driven, with virtually no UI interaction on your part.
Can you avoid the UI when it comes to screen? Yes, you can. Will it create your job easier? Yes, it will. So what are you waiting for? Start automating, and start integrating!
Michael Churchman started as a scriptwriter, editor, and producer during the anything-goes former years of the game industry. He spent lots of the & # x27; 90s in the high-pressure compact software industriousness, where the move from falls to faster release was good under way, and near-continuous release round and automated deployment were already de facto standards. During that time he developed a semi-automated scheme for managing fix in over fifteen languages. For the past ten age, he has been involved in the analysis of software development processes and related engineering management issues.
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