Lesson #5: Working with variables and expressions

Explores how constants, variables, and operations are combined to form expressions that can be included in your tests. Through careful use of variables and expressions, your tests can be flexible, modular, powerful, and compact.

Audience: Testers, Automation engineers

Time: Duration: 2 hours

Prerequisites:

  • Basic understanding of the TestArchitect user interface
  • Familiarity with the TestArchitect test editor
  • Essential understanding of TestArchitect repositories, projects, and tests
  • Basic understanding of basic computer programming concepts

What you will learn:

  • How variables are used to store different types of data
  • How expressions are formed from numeric and string operations
  • How variables, by acting as placeholders for actual values, lend reusability to expressions and actions
  • How data can be converted from one type to another
  • How wildcards can be used to add flexibility to searches and comparisons

Understanding variables and expressions
Action arguments may contain variables (symbols that hold actual values) or expressions, involving operations on variables and constants.

Using string expressions
How to use concatenation to manipulate text in action arguments.

Working with string variables
You can use variables to store text strings, which can be used in place of string literals in your cell expressions.

Performing numeric operations
Your action arguments may contain numeric operations, such as addition and division. Such operations can operate on both numeric literals as well as variables.

Mixing types
Text and numeric data types can be combined in cell expressions.

Working with mixed types
Combine numeric and string operations in single expressions, operating on both numeric and text values.

Using variables in mixed expressions
Use numeric and string variables, as well as constants, in your mixed expressions.

Wildcards
In strings that are used to test for matches with expected values, and in searches, the wildcard substring is used act as a placeholder to represent any arbitrary character or group of characters.

Using wildcards
Use a wildcard to allow a check action to match a range of dates.

Summary: What you learned


Copyright © 2024 LogiGear Corporation. All rights reserved. LogiGear is a registered trademark, and Action Based Testing and TestArchitect are trademarks of LogiGear Corporation. All other trademarks contained herein are the property of their respective owners.

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1 (650) 572-1400