QuickStart Web Automation Tutorials:
Watch the 4 tutorials to guide you in using QuickStart Web Automation in Test Modeller.
Objectives: By the end you’ll be able to:
QuickStart Web Automation
Web Automation Overview (2min 52secs)
1 Create a Web Automation Project (1min 50secs)
2 Scan an Existing Application (1min 30secs)
3 Build a Model (1min 45secs)
Web Automation Overview
1 Create a Web Automation Project
We'll be going over how to Create a Project for Web Automation in Test Modeller. Initially having created a Workspace you will be able to Add a Project from the Project and Releases Menu by clicking New Project, selecting Quickstart Web from our different types of Automation, in particular here we’re selecting Web Automation.
After the creation of your Project, you'll see that we've created all automatically three folders. The first folder here is related to two Scenarios, evidently useful for managing the end-to-end Scenario models. Then you've got the Components folder for model Components of the application along with any Automation Modules.
One layer into the Components folder we've automatically created an Actions folder, where a series of default Web Actions are to get you started with modelling and automating using Test Modeller.
2 Scan an Existing Application
Now to create a model using our Magento.testmodeller.io demo website, along with our Testmodeller.io scanner web extension easily added to a Chrome browser. Once installed it can be used to scan the different elements of your webpage that you want to automate. The Test Modeller UI scanner is an Accelerator for scanning existing web applications to quickly assemble and create Page Objects which can be consumed directly in your Automation framework.
Once we've scanned everything we need, we can come through, hit pause and upload this into our Workspace. As we upload this, we can select if we want to create a model automatically. Upon upload, we've created three items within our workspace.
First, we have the Object Identifier for the page. Then we have our Automation Code for the page, and then we have our model for our Customer Login page of which we open that up and see an initial model has been created. In the next clip we'll be going through how to edit this model.
3 Build a Model
To edit and augment a model that has already been automatically created using our scanner, first, we need to take a look at our demo website and you'll see that we have some demo credentials. One as a value for Email and also a particular value for Password, and these values are what we want to consider when we're creating our model. Start creating a model of the system under test (SUT), from which we can Generate the Test Cases and Run Automation scripts.
So pick up the Password field, and now inside of our model make an edit to one of the Data Assignments. To do so click on the Valid Password block, click on the Test Data Assignment and paste in that value from the website, which now represents a Valid Scenario. Now, similarly for the Email field, we have a particular value that we need to input. So again copy this over.
This now leaves us with a simple but representative model of our system under test (SUT) which we’ll use next see how to Generate and Execute Test Cases from this model.
4 Generate and Execute Automation
Now to Generate and Execute Test Cases from our model with the first step being to set the Coverage and naming convention, and we’ll hard code a Login, include the path number, which is the index of our path. Additionally, inside these settings, we can set varying Coverage Levels. Test Cases are equivalent to paths, or User Journeys through the model of a system under test (SUT).
In this example for simplicity we’ll set the level to medium Coverage and then in the top left hit Generate. This prompts Test Cases to get generated, and here it’s created two paths: a negative Scenario and one for a positive Scenario. Hit Run and click on our Automation Code button to Create our Automation which Executes that Web Automation against that website.
Looking at the Run Results attached to our paths you'll see that we've got all of the relevant screenshots associated with that Test Case. Where there’s a failure we see exactly what has gone wrong and why it's gone wrong.
Coverage techniques also help Generate the smallest set of Test Cases with the required level of rigour, from which these Test Cases are used to Run Automation Scripts, or trigger an execution.
If you want to find out more about generating test cases, or how to implement different test case coverage techniques, review this How to Generate Test Cases in Test Modeller.