# Test Case Building¶

When you build a test case, you’re creating a set of visual templates that can be matched against your app interfaces in real time, allowing Alyvix to interact with those interfaces just like a person would.

There are three main tools for building test cases:

1. Alyvix Designer: Define individual test case objects to be dynamically matched against the visual components of your app’s interface, and assign GUI actions that are carried out when those matches are detected

2. Alyvix Selector: Easily manipulate (inspect, copy, edit, delete) large numbers of test case objects created with Designer, as well as view, filter and sort their properties

3. Alyvix Editor: Create scripts using test case objects (as sequential execution units, conditionals, and loops) to interact with any app according to complex behaviors you define

For most use cases, Alyvix Editor (which includes Designer and Selector) is all you’ll need. But if required, Designer and Selector can also be run as separate modules.

Once you’ve built a test case, you can let it interact with your chosen app either by using Alyvix Robot, or testing it directly within Editor.

The Test Case Data Format page provides technical details on how Alyvix test case files are organized and what they contain, while the Getting Started section includes detailed mini-tutorials on how to use Alyvix Editor.

All three of these applications can be launched from the Windows Command Prompt or PowerShell. They inherit the permissions of the shell they were launched from.

Alyvix Designer

Alyvix Designer lets you select graphic components on a captured screen to use as test case objects, whether they’re images, rectangles, or text. You can then define triggers and actions to apply when those templates are recognized later in a live interaction with an application.

Designer will save the set of templates, called the component tree , as a single test case object, which you can then use as a building block to compose more complicated objects and scripts using Alyvix Editor.

The following sections of the guide present further information on Alyvix Designer:

• The Designer Interface Overview page provides a high-level overview and describes the general layout of the interface

• The Component Tree page describes the specific test case object types available, including what they can do and how to interact with them

• You can find more detailed information about the available options for test case objects and components on the Interface Options page

Alyvix Designer can be run as follows:

C:\Alyvix\testcases> alyvix_designer


with the following command line options:

 Option Alias Argument Description --delay -d Wait n seconds before grabbing the screen, giving you time to move windows around --filename -f Supply the file name with no extension --object -o Supply the Object name --verbose -v Set the verbosity level for debugging output ranging from 0 (min) to 2 (max)

Alyvix Selector

Alyvix Selector is used to centralize the management of all of your test case objects, such as exporting them to other Alyvix files. It also provides options to view, copy, edit and delete test cases objects.

Selector is organized as a set of tabbed panels representing one or more test case files, and a list of test case objects within each tab. This allows you to quickly switch between them and filter, search and edit within a single file, or copy test case objects across opened test case files.

Alyvix Selector can be run as follows:

C:\Alyvix\testcases> alyvix_selector


with the following command line options:

 Option Alias Argument Description --filename -f Supply the file name with no extension --verbose -v Set the verbosity level for debugging output ranging from 0 (min) to 2 (max)

Alyvix Editor

Alyvix Editor helps you create scripts using the individual test case objects in a single test case file, and allows you to create more complex interactions compared to using Designer alone.

The following sections of the guide present further information about Alyvix Editor:

• The Editor Interface Overview page describes the layout of the panels and how to use the interface controls

• The Scripting Management page shows you how to manipulate (view, copy, edit, delete) the scripts and scripting components you have created

• The Scripting Panel page explains how to create scripted interactions between existing test cases

Alyvix Editor can be run as follows:

C:\Alyvix\testcases> alyvix_editor


with the following command line options:

 Option Alias Argument Description --filename -f The test case file name (with no extension) --verbose -v Sets the verbosity level for debugging output ranging from 0 (min) to 2 (max)