Application Variables


Use cases for variables

  • It becomes difficult for users to change the values in all the test cases if you have set of variables and values that have to be changed often, and the variables are in different test cases.

CloudQA gives you an option to set variables at an application level, you can change all the values of variables at one go; whenever needed

These variables let you read content from the application under test and use it as input or check in all the test cases.

Using application variable is a two-step procedure

1. Declaring variables in application settings, variables page

2. Use the declared variable in test cases

1. Declaring the variables
  • Application variable has to be declared in variables tab in the Settings

  • Define the variable name and variable value, click on plus and save

    Example:

    Local Image

2. Use the variables in test cases
  • The variables defined in it can be used in edit steps of test cases

  • Input variablename1 in place of text input step or assertions to use/compare with the values declared in the app preferences

    Syntax:

      ``` __variablename__ (Ex: __loginid__) ```
    

    Example:

    Local Image

  • If you want to use the variables in your custom script

    Syntax:

    cloudqa.variablename (ex:cloudqa.loginid)

    Example:

    Local Image

Note:

  • Changing the values in application variables will impact all the test cases where ever the variables are used
  • The application will not show any error messages or alerts to user while modifying or deleting the store variables

results matching ""

    No results matching ""