Use modules

Modules are the main building blocks of your tests. This topic explains how to use modules in your test case:

Add a module to a test case

You can find all modules in the left pane of the test case editor:

  • Standard modules are under Standard objects. You cannot edit standard modules.

  • All other modules are under Modules.

You can find all modules in the left pane of the test case editor, under Modules. Use the search bar or to find your modules. To keep your modules organized, you can filter with tags you define.

To add a module to your test case, select the plus icon next to the one you want to use. This creates a new test step out of the module.

Fill out a test step

You just added a module to your test case, which means you have a new test step. So far, so good! Now, you need to tell Tosca Cloud what to do with it.

In essence, a test step is a form you have to fill out. Everything revolves around values, actions, and data types:

  • The value determines the actual input or interaction with your application under test. For example, if you want to insert something, should Tosca Cloud use a static value, or should it generate a dynamic value at runtime?

  • The action determines what Tosca Cloud does with a value. For example, if you want to test a text box and your value is a calculation, should Tosca Cloud enter the result into a field, or should it compare the result to what's already in the field?

  • The data type determines how Tosca Cloud interprets and treats a value. For example, is it a regular string, or is it a password that needs obscuring?

Use values

To define an input or interaction, fill out the Value column of your test step.

Here are some basics, to get you started:

  • Enter static values. For example, define that Tosca Cloud should enter I love testing into a text box. You can enter any character that the control allows. Tosca Cloud also supports wildcards and special characters.

  • Enter dynamic values. These are values that Tosca Cloud auto-generates at runtime, based on your specifications in a so-called value expression. For example, to reuse values that you've previously saved to a variable, create date and time stamps, or generate random values.

  • Define mouse operations.

  • Verify the content of tables in your application.

  • Link test data to your test case.

Use actions

To define the action, select an action from the Action Mode dropdown list.

You can choose one of the following options:

  • Input writes a value into the control. This lets you test any part of your application that requires input, such as forms or queries.

  • Insert inserts a value into an API module control.

  • Verify compares a value to a control in your application. This lets you ensure that all elements of your application show the expected data or behavior.

  • Buffer writes a buffered value into a control. This lets you use a value more than once.

  • WaitOn adds a dynamic wait time to your test case. That way, Tosca Cloud waits for a control to reach a certain state before it continues.

  • Select selects specified controls. The required control must have a unique name.

  • Constraint limits the search for a parent control in a table.

  • Output stores control data in a variable so that you can reuse it later on. For example, to insert it into another part of your application or to compare it with the contents of a different control. This lets you ensure that the overall user journey works as expected.

  • Exclude excludes specific rows or columns from tables. You can exclude rows and columns within the same test step.

Use data types

To define how Tosca Cloud should interpret or treat the value, select a data type from the Data Type dropdown list.

You can choose one of the following options:

  • String interprets the Value field as a string (default).

  • Date interprets the Value field as a date. Different notations don't affect the test.

  • Numeric interprets the Value field as a number. Different notations don't affect the test.

  • Boolean interprets the Value field as a Boolean value. The value can be either True or False.

  • Password interprets the Value field as an encrypted password.

  • Secret interprets the Value field as a key vault secret.

  • RawString interprets the Value as its literal value.

Rename test steps

If you use modules that you created with Tosca XScan, Tosca Cloud automatically uses the name of the module for the corresponding test step. This doesn't always work well in test cases. Good module names are about controls and their location.

However, in your test case, you need to know what exactly happens in this particular instance and where. Rename your test steps, so that they have this information. This gives you important facts at a glance. It's even more important when it comes to reporting and analyzing results, where you need to understand quickly what worked—and what didn't.

What's next

Check out other test design elements that help you build better test cases, faster:

You're done building? Do a trial run of your test case, so you can find and fix instabilities before you run your tests in earnest.