TestResults.io
  • What is TestResults.io
  • System Architecture
  • Regulated Markets
    • Health Care Industry
    • Financial Services Industry
  • What's new?
    • Update Instruction
      • Update of the Designer extension in Visual Studio
      • Update the Execution Engine
      • Update the Base- and Environment Models
    • Migration to new project file
  • Designer
    • Overview
    • First Steps
    • Installation
    • TestResults.io solution
    • The development environment
      • Tool Window Overview
        • Test Environments
          • Steps to configure a SUT VM
          • How to access files on the system under test
        • Remote Viewer
          • Control Mode
          • Capture Mode
          • Screen Editor
          • Capture Single Image
        • Screen Explorer
        • Test Case Designer
        • Image Explorer
        • API Testing
        • TestResults.io options
          • Engines
          • Servers
    • Test Cases
      • Adding Test Cases
      • Test Case structure
      • Simple Test Case (Example)
      • Executing your Test Case
      • Generating Test Containers
      • Publishing Test Cases
      • Execution Variables
    • Software Models
      • Adding SW Models
      • Referencing the Model in the Test Case
      • Generating Test Containers
      • Publishing SW Models
      • Screens and Screen Elements
        • Tables
        • Visual Sense
        • Custom Screen Elements
    • Installers
      • Adding Installers
      • Generating Test Containers
      • Publishing Installers
    • Automation Framework Reference
      • Attributes
      • Enumerations
      • Filters
        • IImageFilter Interface
        • Select
        • Resize
      • GlobalEngineParameters
      • ImageDetectionParameters
      • ImageReference
      • Interfaces
        • ITester Interface
          • ITester Methods
          • ITester Properties
        • ITestee Interface
          • ITestee Methods
        • IConnections Interface
          • IConnections Methods
          • IConnections Properties
        • IDebug Interface
        • IEngineResult
        • IHelpers Interface
        • IImageHelper Interface
          • IImageHelper Methods
        • IKeyboard Interface
          • IKeyboard Methods
        • IMouse Interface
          • IMouse Methods
          • IMouse Properties
        • IReport Interface
          • IReport Methods
        • ISUTConnection Interface
      • OcrEngineParameters
        • Best practise
        • IronOcrEngineParameters
        • LEADOcrEngineParameters
        • OcrEngineRelatedCharacters
        • OcrPreprocessingParameters
      • ResultRectangle
      • SutNotReadyException
      • TestStepAbortedException
    • FAQ
      • Two-factor authentication (2FA) and One Time Passwords (OTP)
      • Receive and verify Emails
      • Using Excel as test data source
      • Verify PDF Content
  • Portal
    • Overview
    • First Steps
    • User's Guide
      • Login
      • Projects
      • Dashboard
      • Test Cases
      • Software & Environments
      • Test Sets
      • Job Queue
      • Management
      • Notifications Summary
    • Automation Engineer's Guide
      • Test Automation Workflow
      • Automating a test case
      • Enabling Software & Environments
    • REST API Reference
      • Authentication
      • Projects
      • Test Sets
      • Test Cases
      • Test Plans
      • Test Reports
      • Files
      • Software
      • Environments
      • Untitled
      • Executions
      • Favorites
      • Statistics
      • User Management
      • Customer Management
      • Notifications
      • Configurations
      • Invoicing
  • Models
    • Overview
    • Base Model
      • BaseScreen
        • BaseScreen Properties
        • BaseScreen Methods
      • OnScreenElement
        • OnScreenElement Methods
        • OnScreenElement Properties
      • Primitives
        • Button
          • Button Methods
          • Button Properties
        • Checkbox
          • Checkbox Methods
        • ContextMenu
          • ContextMenu Methods
          • ContextMenu Properties
        • Dropdown
          • Dropdown Methods
          • Dropdown Properties
        • DropdownMenu
          • DropdownMenu Methods
          • DropdownMenu Properties
        • GenericScroller
          • GenericScroller Methods
          • GenericScroller Properties
        • HorizontalScroller
        • IconButton
          • IconButton Properties
        • Label
        • LabelWithButton
          • LabelWithButton Properties
        • LabelWithCheckbox
          • LabelWithCheckbox Properties
        • LabelWithValue
          • LabelWithValue Methods
          • LabelWithValue Properties
        • PwTextBox
          • PwTextBox Methods
        • TextBox
          • TextBox Methods
          • TextBox Properties
        • Tables and lists
          • Column
            • Column Methods
            • Column Properties
          • ItemList
            • ItemList Methods
            • ItemList Properties
          • Row
            • Row Methods
            • Row Properties
          • TableBase
            • TableBase Methods
            • TableBase Properties
        • LabelWithElementBase
          • LabelWithElementBase Properties
      • Enumerations
      • Extensions
        • EngineResultExtensions Methods
        • EnumExtensions Methods
        • ReportExtensions Methods
        • StringExtensions Methods
        • TesterConnectionExtensions Methods
        • TesterDebugExtensions Methods
        • TesterHelperExtensions Methods
        • TesterMouseExtensions Methods
        • TesterOnScreenElementExtensions
        • TesterSelectExtensions Methods
      • Helper Classes
        • BaseModelHelpers
          • BaseModelHelpers Methods
          • BaseModelHelpers Properties
        • Attributes for Designer
        • ListHelpers
      • Exceptions
        • ElementNotFoundException
        • InteractionFailedException
        • ScreenNotFoundException
      • Interfaces
        • IAppBasics Interface
          • IAppBasics Methods
          • IAppBasics Properties
        • IBrowser
        • ICommandLineWindow
        • IScroller Interface
          • IScroller Methods
          • IScroller Properties
        • ISutLocale Interface
          • ISutLocale Methods
          • ISutLocale Properties
        • ISystemHelpers
        • ISystemInteractions
        • IWindow
    • Environment Model
      • Windows
        • Screens
          • CmdWindow
            • CmdWindow Methods
            • CmdWindow Properties
          • FileDialog
            • FileDialog Methods
            • FileDialog Properties
          • FileExplorer
            • FileExplorer Properties
          • RunWindow
            • RunWindow Methods
            • RunWindow Properties
          • Window
            • Window Methods
            • Window Properties
        • SutLocale
          • SutLocale Methods
          • SutLocale Properties
        • SystemHelpers
          • SystemHelpers Methods
          • SystemHelpers Properties
        • SystemInteractions
        • WebBrowser
          • Browser
            • Browser Methods
            • Browser Properties
          • BrowserScroller
            • BrowserScroller Methods
            • BrowserScroller Properties
          • AuthenticationDialog
            • AuthenticationDialog Methods
            • AuthenticationDialog Properties
          • DownloadDialog
            • DownloadDialog Methods
            • DownloadDialog Properties
        • EnvironmentModel Enumerations
        • Interfaces
          • IWebAppBasics
            • IWebAppBasics Property
Powered by GitBook
On this page
  • Runtime Variables
  • Portal Execution Variables
  • Variables on a Software Version
  • Variables on a Test Case
  • Local Execution Variables
  • Set Local Variables
  • Using Variables in a Test Cases

Was this helpful?

  1. Designer
  2. Test Cases

Execution Variables

PreviousPublishing Test CasesNextSoftware Models

Last updated 8 months ago

Was this helpful?

There are multiple scenarios to use Execution Variables:

  • Variables with data that is read from the system under test during test execution and are used later on. These are called runtime variables. For example: An order number that is generated during the test and needs to be verified on the invoice.

  • Variables in a test case which you want to be configurable and change between executions. For Example: run a test case with different login information or customer numbers

  • Variables that depend on a configuration or test environment. For example: the connection string to your database

  • Variables like passwords which you want to store encrypted and not write as plain text directly in a test case

Runtime Variables

In the Test Case Designer interactions that return a string, such as TextBox.GetText or LabelWithValue.ReadValue offer the possibility to save their output to a runtime variable. You can either select an existing variable from the dropdown or create a new variable with the + symbol.

Portal Execution Variables

Test executions which you start in the portal use the execution variables set on the software versions and on the test case. If a variable with the same name is set on both the software version and a test case, the value from the test case takes priority.

If you start an execution in Visual Studio directly the execution variables from the portal are loaded and updated with local values set through the execution variables dialog (assuming a connection to the portal exists).

Variables which are used by multiple test cases should be set on the software version, for example login information. Variables which are only used by one test case can be set on the test case directly.

Variables on a Software Version

In the Software and Environments Tab click the Edit Button to Edit your Software Version

Variables on a Test Case

Execution Variables can be set and edited on a Test Case with the following Button:

Local Execution Variables

Local Execution Variables are mainly used to set Variables which are secured/encrypted on the Portal and you do not have access to it. Or if you want to try other values than the ones set on Portal in a local execution.

  • If you start an execution in the TestResults.io Designer, the execution variables from the portal are loaded and updated with local values.

  • Secured (and therefore encrypted) variables from the Portal can not be loaded. So you need to set the values for these variables locally (e.g. password).

  • Local Variables are set on Solution Level, so they apply to all Test Cases.

  • Local Execution Variables are stored in the *.trio.user.json file in your solution folder, which is ignored by git. Therefore each user needs to set them separately.

Set Local Variables

Local Variables can be configured in the "Manage Execution Variables" dialog found in the Test Case Designer. Alternatively open the dialog from the solution context menu in the Solution Explorer.

Using Variables in a Test Cases

For example to get the value of the variable with the key "model":

string modelVariable = t.GetVariable("model");

More information about about all the options of Portal Execution Variables can be found .

To use a variable as a parameterin the test case designer (e.g. select the variable value in a dropdown), first set the parameter to use variables with the icon and then select the desired variable from the dropdown list.

To access a variable in code, use .

t.GetVariable()
here
The output from the "Read value" operation will be saved to the variable "confirmationCode"
Hover over the Software Version to make the Edit Button visible
The Variables can be set in the second Tab. The "Name" will be later used as a Key to access the Value.
Click the Edit Button to set and edit Execution Variables
Manage Variables dialog with portal variables, local variables and a runtime variable
Using a variable to select a value from a dropdown