Skip to content

Executing tests with User-Defined Variable Overrides in the Test Scheduler

This article is a part of the Self-paced Learning Series for the Course: First-Hand Experience of Worksoft SaaS.

Please refer to the link for more details on the Course.
 
 Mapping the Worksoft SaaS feature to the Course Context :: Lesson 6 :: Topic 2


1. Executing tests with User-Defined Variables using Test Scheduler
In the previous topic, we have seen how values can be stored in the UDV and also if we have multiple values to be tested, we have to change the values in the UDV each time and execute tests sequentially.

If we want to execute the tests simultaneously or sequentially or selectively, we can use the Test Runner/Scheduler and override the UDV values easily.

In addition, we also have one more Test Case (Test Case # 3) to include and increase test coverage.

2. Review Manual Test Case 3
Refer to TC #003 from the Test Case Repository
    
3. Understanding the Steps
  • We will update the data file rows with UDV values of Test Case 1 (state - NJ), Test Case 2 (state - NY) in the UDV Overrides column.
  • We will also add the values for Test Case 3 (state - PA).
  • The format for the UDV Override is                                                                                             

    "name":"UDVName",

    "value": "Value that needs to be overridden with"

  • Execute the Tests simultaneously (although, this can be executed sequentially as well).
4. Practice
  1. Click Menu, and Click on 'Data Files' 
  2. Click on "Edit" icon to edit "Business TestRuns Details" 
  3. Now clone Previous row and click on Save icon in action column to Create Row 4.)
Now we will update mandatory details in below-mentioned columns of Row 4. To edit any details, mouse over the cell and click on </> (Premium Editor) Icon

Note: Ensure that you are not deleting any Quotes, Brackets, Colon, Edit the details between double quotes. 

Execution Indicator
Run Definition Details:
    {
"testingContextKey": "XXXXXX",
"runDefinitionStatus": "WIP",
"runDefinitionNameMnemonicForDeveloper": "Name of Run Definition ",
"testingPlatformMnemonicForDeveloper": "true",
"userNotesForUIDisplay": "Schedule Business Test Runs of smoke test cases on production environment",
"includeUserDefinedVariablesForWorksoftAIMLOverrides": "true"
}
User_defined_variable_overrides


        4 Firstly Change the Execution Indicator to 'Yes' ("Yes"/"No" indicates the need for execution of a particular row).
        5 Now update Run definition Details column as below:

Testing Context key: Open another window -> Go to Run Definition 'Verify HICC calculations (Data-driven by UDVs) -> Click on view to see the Testing Context of the respective Run Definition -> Copy the Testing Context Key (with Functional High Volumes Testing Cloud) -> Go to (previous Browser Tab) Data Files screen -> Edit Row 4 -> Go Run Definition column -> Click on Premium Editor -> Paste the Testing Context key ( Ensure testing context key is between double quotes).

         6. Here update the name_mnemonic to 'Verify HICC calculations (Data-driven by UDVs) (This is a unique name given to the row data and will not be displayed anywhere else)

         7 Update the user_notes_override to 'Values for State-NJ' .Now we will user_defined_variable_override, Navigate to UDV column and click on Premium Editor and Paste below-mentioned Json:

[{
    "name": "Age",
    "value": "45"
},
    {
        "name": "Annual_Income",
        "value": "20000"
    },
    {
        "name": "Zip_Code",
        "value": "08817"
    },
    {
        "name": "Annual_Premium",
        "value": "$1,021"
    },
    {
        "name": "Annual_Penalty",
        "value": "$200"
    },
    {
        "name": "Calculator_Result_Header",
        "value": "You are eligible for a subsidy."
    }]

       Click on Save

      8. Clone Previous row with Run Definition 'Verify HICC calculations (Data-driven by UDVs)' and click Save. Update the below details in the row no 5

Now we will update mandatory details in below-mentioned column of Row 5. To edit any details, mouse over the cell and click on </> (Premium Editor) Icon

Execution Indicator
Run Definition Details:
      {
"testingContextKey": "XXXXXX",
"runDefinitionStatus": "WIP",
"runDefinitionNameMnemonicForDeveloper": "Name of Run Definition ",
"testingPlatformMnemonicForDeveloper": "true",
"userNotesForUIDisplay": "Schedule Business Test Runs of smoke test cases on production environment",
"includeUserDefinedVariablesForWorksoftAIMLOverrides": "true"
}
User_defined_variable_overrides

  9 Update the Run definition Details column as below:

Steps to Locate Testing Context Key:

    testing_context_key: Open another window -> I am going to Run Definition 'Verify HICC calculations (Data-driven by UDVs) -> Clicking on view to see the Testing Context of the respective Run Definition -> Copying the Testing Context Key (with Functional High Volumes Testing Cloud) -> Go to (previous Browser Tab) Data Files screen -> Edit Row 2 -> Go Run Definition column -> Click on Premium Editor -> Update the Testing Context Key copied

10 Update the name_mnemonic to Verify HICC calculations (Data-driven by UDVs)
11 Update the user_notes_override to 'values for State-NY'
12 Now we will user_defined_variable_override, Navigate to UDV column and click on Premium Editor and Paste below-mentioned Json:

[{
    "name": "Age",
    "value": "45"
},
    {
        "name": "Annual_Income",
        "value": "55000"
    },
    {
        "name": "Zip_Code",
        "value": "10001"
    },
    {
        "name": "Annual_Premium",
        "value": "$6,159"
    },
    {
        "name": "Annual_Penalty",
        "value": "$550"
    },
    {
        "name": "Calculator_Result_Header",
        "value": "You are not eligible for subsidy."
    }]

       Click on Save

13 Now clone Previous row and click on Save icon in action column to Create Row 6.

Now we will update mandatory details in below mentioned column of Row 6. To edit any details, mouse over the cell and click on </> (Premium Editor) Icon

Note: Ensure that you are not deleting any Quotes, Brackets, Colon, Edit the details between double quotes.

Execution Indicator
Run Definition Details:
    {
"testingContextKey": "XXXXXX",
"runDefinitionStatus": "WIP",
"runDefinitionNameMnemonicForDeveloper": "Name of Run Definition ",
"testingPlatformMnemonicForDeveloper": "true",
"userNotesForUIDisplay": "Schedule Business Test Runs of smoke test cases on production environment",
"includeUserDefinedVariablesForWorksoftAIMLOverrides": "true"
}
User_defined_variable_overrides

14 Firstly Change the Execution Indicator to 'Yes' ("Yes"/"No" indicates the need for execution of a particular row).
15 Now update Run definition Details column as below:

Testing Context key: Open another window -> Go to Run Definition 'Verify HICC calculations (Data-driven by UDVs) -> Click on view to see the Testing Context of the respective Run Definition -> Copy the Testing Context Key (with Functional High Volumes Testing Cloud) -> Go to (previous Browser Tab) Data Files screen -> Edit Row 6 -> Go Run Definition column -> Click on Premium Editor -> Paste the Testing Context key ( Ensure testing context key is between double quotes).

16 Here update the name_mnemonic to 'Verify HICC calculations (Data-driven by UDVs) (This is a unique name given to the row data and will not be displayed anywhere else)

17 Update the user_notes_override to 'Values for State-PA'.

Now we will user_defined_variable_override, Navigate to UDV column and click on Premium Editor and Paste below mentioned Json:

[{
    "name": "Age",
    "value": "19"
},
    {
        "name": "Annual_Income",
        "value": "25000"
    },
    {
        "name": "Zip_Code",
        "value": "19019"
    },
    {
        "name": "Annual_Premium",
        "value": "$1,729"
    },
    {
        "name": "Annual_Penalty",
        "value": "$250"
    },
    {
        "name": "Calculator_Result_Header",
        "value": "You are eligible for a subsidy."
    }]

      Click on save.

18 Now click on 'Save & Exit' the Data File

3. Practice:
  1. Click vertical ellipsis to edit Test Cycle Inputs.
  2. Edit the Test_Cycle_Info
  3. Update the testcycleidentifier as Test Cycle 2
  4. Update the plannedWindowsStartTime:
  5. Update the plannedWindowEndTime:
  6. Click Save and click Save & Exit
    
Please Note:
  • By updating the new values in the Business Test Run Details, the values dynamically override original values in the Test Script, however, the original values are not replaced.


Feedback and Knowledge Base