Test Automation
5.1 Introduction to QuickStart Tutorials
In this Quality Modeller 101 Tutorial, you’ll get an overview of the QuickStart frameworks for test automation available in Quality Modeller. The aim of providing these frameworks in the tool is to get you quickly up and running with your test automation journey.
In the following clip you will see an overview of the 5 main automation frameworks and associated applications including Web, API, Mobile, Dynamics 365 and Mainframe.
5.2 Overlaying Test Automation
In this Quality Modeller 101 tutorial on Overlaying Test Automation, you’ll discover how to effectively integrate automation into a model, regardless of the automation framework in use. For demonstration purposes, we’ll be utilizing QuickStart Web automation, which is based on Java Selenium.
When creating a model from scratch, the recommended approach is to import assets through the Project Explorer pane. These assets may include scanned objects, imported objects, or pre-defined action packs in Quality Modeller. Pre-defined action packs come with ready-to-use automation tasks such as AssertURL, Enter Email, and Click Sign-In Button.
Alternatively, users can manually overlay automation onto pre-existing models, even before finalizing the automation itself. This is done via the Automation pane, where you can select an automation reference from a comprehensive list. In our example, we’ll be working with an action from the 'WebGeneralActions' module.
5.3 Code Templates
In this Quality Modeller 101 tutorial on Code Templates, you’ll explore how they integrate with an automation framework and how they enable you to define code in any language within Quality Modeller. Once set up, you can easily publish the generated automation assets to a Git repository, making them accessible for integration into a CI/CD pipeline.
In the example provided, you’ll explore the Project Configuration wizard, which features pre-defined frameworks. However, Quality Modeller also offers the flexibility to create and configure your own code templates, either by cloning them from an existing repository or starting from scratch.
A key advantage of using Code Templates in Quality Modeller is the separation of templates into Page Objects, which generate classes, and Test Case Templates, which create descriptive test scripts. To simplify navigation, keywords are displayed, and it’s important to note that all templates are fully customizable to align with any custom framework. In our example, you'll see options for C# Selenium, Cypress, Desktop Automation, Dynamics 365, and more.
5.4 Custom Code Snippets
In this Quality Modeller 101 tutorial on Custom Code Snippets, you’ll learn how to use importers to quickly populate Quality Modeller with existing automation and classes. Similar to how Code Templates can be imported from a Git repository, Custom Code Snippets can also be imported directly. This process pulls in relevant objects and functions from a connected repository, setting them up seamlessly within Quality Modeller. Repositories from UFT, Ranorex, and Swagger are fully supported in Quality Modeller.
Beyond importing Custom Code Snippets, you may find that certain functions, such as a Sleep or Wait function, are better created as custom functions tailored to your specific needs. In the tutorial, you’ll see how these custom functions can be classified under various categories such as Abstract, Page Object, Pending Automation, Embedded Code, Custom Code, or Function Map.
The tutorial also showcases the Function Custom Code feature, where the Code Editor allows you to paste any code for embedding into your models. A variety of importers, including Swagger Specification, can be used to bring in specific code. Additionally, you have the ability to import a zip file containing existing page objects or connect directly to a Git repository for seamless integration.
5.5 Code Generation and Execution
In this Quality Modeller 101 tutorial on Code Generation and Execution, you’ll learn how to utilize a pre-built Automation Model to create and execute automation scripts. You’ll also explore how to export automation code through the Run wizard. It’s important to note that this automation can be triggered either by one of the QuickStart Automation frameworks provided in Quality Modeller or by any custom framework you’ve set up yourself.
In the example, you’ll see an automation model for an HR system, which includes references to several subprocesses. The model consists of multiple blocks, with specific waypoints such as "Go to page" and "Positive Enter username" representing key automation actions. By clicking the Run button in the Scenarios pane, you can access advanced settings to manage how and where the automation results are displayed.
The first two settings involve Source Control, which determines the repository you’re committing to, and Test Data, which allows you to specify whether data will be fetched from an external source, such as an SQL Server database or an Excel spreadsheet. The final two settings are focused on executing and publishing the automation tests. Once you click Execute, Quality Modeller runs the job, displaying what has passed and what has failed.
A key advantage of using the QuickStart framework is that the execution settings are pre-configured. If you’re working with a custom framework, there are three main settings to configure: Directory (the target machine), Command (to trigger a batch file), and Parameters. This setup is done under Workspace > Configuration. When configuring these settings, you’ll also need to choose the appropriate Code Template for your automation framework. Once there, you can configure the Directory, Command, and Parameters, as well as set up source control. This process gives you everything needed to run automated tests in Quality Modeller efficiently.
5.6 Test Plans and Scheduling
In this Quality Modeller 101 tutorial on Test Plan and Scheduling, you’ll learn how to review tests in two key areas: at the Model level within the Automation pane, and in the Quality Modeller results portal, where tests can be filtered and tracked. The results portal offers a sequential view and summary of passed and failed tests, making it especially useful in a CI/CD pipeline. This allows for setting up Regression Suites that can be scheduled to run at regular intervals inside Quality Modeller. You’ll also see how to create and name a test suite for publishing.
In the previous tutorial on Code Generation and Execution, we explored the Source Control, Test Data, and Execution tabs. Alongside these, the Publish tab plays a vital role in setting up Test Plans and Scheduling. To regularly publish a test suite, you’ll need to assign a name in the Test Plan tab.
In the example, you’ll navigate to the Tests tab from the main menu, which displays a Results Summary. This provides detailed information with links to specific models and runs for deeper insights. A key advantage of having a scheduled test plan is the ease of analyzing test runs over time. Additionally, if needed, you have the option to run the entire test plan in isolation or simply re-run any failed tests.