3 Ways to Scale Your Automated Tests to Infinity and Beyond with mabl
3 Ways to Scale Your Automated Tests to Infinity and Beyond with mabl Chou Yang September 12, 2018 Chou is a solutions engineer proceed product marketer who loves to connect
3 Ways to Scale Your Automated Tests to Infinity and Beyond with mabl
Even if you 're full at multi-tasking and ambidextrous, you can yet exclusively do so much. While a computer is a immense step up from the old days of indite on stone tablets, it still can only run as many tasks as the number of duds it has.
But the cloud has no such limitation. While itisstill somebody else 's computer, the cloud can scale endlessly according to your needs. At mabl, our mission is to do while be able to scale to meet the high software delivery demands today.
That 's why we want to show youthree agency to easily scale your teststo infinity and beyond utilize mabl: apply Plans, employ Recyclable Flows and utilise Data-Driven Testing table.
How To Start Scaling Your Tests
Plans and Journeys Basics
Plans and journeys are mabl-speak for examination plans and exam playscript. Test creation with mabl is - we believe that test automation should focus more on theend-user journeyingrather than the test hand creation procedure. That 's why we call mabl tests,journeys.
A journey defines each measure of a user flow in your application, such as a shopping cart exploiter flow on a retail site.Below is an example journeywhich navigates to a mabl Contact Us form and fill it out:
Journeys are independent from any environment definitions, such as target URL, browser, screen-size, execution schedule, etc.
Plans package all the environmental information mentioned above, so that any number of journeys can be run against any combination of surroundings. This gives you the flexibility to run the same journeys on the same target application across different environments, such as Staging and Production, without having to recreate the journey from scratch.
Here 's an model planthat contain one journey, set to fulfil the journeying on Chrome, against the target application in Production every 4 hours. As a result of this plan, one tryout will be executed.
1. Using Plans
A nimble and easy thing we can do to spice up our test design is to just occupy out the `` new plan '' form (project above). To scale this programme up from 1 journey execution, to18 performance, we will:
a. Add additional browser to prove on(i.e., Firefox, Chrome, IE, Safari coming soon)
b. Add additional quarry environments(ex: Staging, https: //staging-mabl.com; & nbsp; Dev, https: //dev-mabl.com & nbsp;)
c. Add more journeying to the plan& nbsp; (In this example, we 'll bundle journey that test the principal functionality of mabl into one plan. Think about what your plan accomplishes on a grander scale. Is it a smoke examination? Are you testing all business-critical systems?)
And just like that, we experience ournew, more robust programme below:
Nice! That was easygoing. Now let 's locomote on to reusable flows, which will convey us to the topic of configuring journeying.
2. Using Recyclable Flows
If you have a mutual episode of stairs in your journeying, they can be bundled into reusable flows, which can then be inserted into any other journeying, too. A journeying therefore can be write of principal (non-reusable) stepsandreusable flows.
Remember that Contact Us Form journey (initiatory image) way at the top of this article? We 're going to recreate that journeying employ a reusable flow. & nbsp;
Pro tip: Tools like SUSA can handle this autonomously — upload your app and get results without writing a single test script.
I 'll start by navigating to the contact signifier we 're testing. The steps taken to navigate to the form are recorded in grey. These will be recorded as non-reusable measure. Now that I 'm at the kind, I 'llcreate a new reusable flowby clicking on the reusable flows push in the:
I 'll name the new reusable flow `` Contact Us Form '', and everything that I record while in this reusable-flow-mode will prove up in purple. & nbsp;
Once I consummate record the reusable flow and save my journey, I 'll experience a journey that contains a `` Trained Test '' subdivision (non-reusable steps) and a `` Contact Us Form '' reusable flow section, which looks like this:
Now if I needed to test a like pattern elsewhere, I couldimport the saved `` Contact Us Form '' flowwhile recording the journey:
Tada! Reusable flow are an easy way to extend your journeying to make them super flexible, and scales well with changes - if you update a reusable flow, modification will propagate to all journeys hold that flow.
3. Using Data-Driven Testing Tables
There 's a act of benefits of making your examination data-driven. Some include:- Reusability:any test script can be written and re-executed hundreds or G of clip, with different inputs each time
- Versatility:a data-driven test is usually associated with a single exam or function, but can be used in several exam example
- Efficiency:data-driven tests can generate test playscript with less codification
- Separation of logic:data-driven examination countenance for the clean distinction of test case logic from the actual trial data
- Stronger test coverage:you can continually change the input test data and cover a broad scenario of inputs
And of line, we make creating a Data-Driven Testing with mabl quick and leisurely. You can use the variables from a data table in any of the following ways:
- in affirmation
- as input value
- as URL 's to see
- in template strings to yield other variables
- in custom JavaScript steps
What we need to get depart is aData Table. There 's a few ways to do this.
Option oneis to create one during the initial recording of the journeying. Just detent on the Journey Variables button in the top left of the trainer. Here, you can set the Default values (which will be the first substitution of your journey), and you can add the relaxation of the permutation afterwards in the Data Table configuration view (demonstrate below).
Option twois to create a Data Table in the configuration panel of the mabl dashboard:
You can manually type the values into the table, copy and paste from a spreadsheet, or upload a CSV.
To use this Data Table, specify it in the Plans configuration:
Now when the programme is run, I can see every permutation of the journey kick off:
And that 's it! You can view the test output to see every action mabl takes along the journey, including input habituate. Data-Driven Testing is a great way to stay form, and keep your tests versatile. & nbsp;
We 've added thousands of words to our data tables when testing mabl 's Data-Driven Testing functionality internally. Go ahead and put us to the test with your own test suite!.
Quality Engineering Resources
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