Executing tests using Data Filters on Data Files
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 8:: Topic 1
1. Executing tests using Data Filters on Data Files
We will use a different Data File that contains test data of all the 3 Test Cases (States - NJ, NY, PA) and apply filters on a particular State to execute the test only for that State.
2. Practice
First, create a Data Filter for the State NJ:
Now, change the filter from New Jersey to New York and re-execute the tests, to do that, follow these steps:
- Click Menu and Click Data Filters
- Click Create on top right corner
- Select HICC - Input and Expected Outputs - WIP in Data Definition dropdown.
- In the name field update name as 'Filter on State_Code NJ' (Mandatory)
- Select the attribute as State-Code and operator as (=)
- In the value Field, Type NJ for New Jersey.
- To check if the filter is working, select the file in Data File dropdown and click on (Show Filtered Data). The filtered results should display as expected.
- Click on Save and Exit.
- Click on Clone Icon to Create another Filter
- Add description 'Filter on State_Code NY' (Mandatory)
- In the value Field, Type NY (for New York).
- To check if the filter is working, select the file in Data File dropdown and click on (Show Filtered Data). The filtered results should display as expected.
- Click on Save and Exit.
- Click on Clone Icon to Create another Filter
- Add description 'Filter on State_Code PA' (Mandatory)
- In the value Field, Type NY (for New York).
- To check if the filter is working, select the file in data File dropdown and click on (Show Filtered Data). The filtered results should display as expected.
- Click on Save and Exit.
- Update the RD name to 'Verify HICC calculations (Data Filters on Data Files)' (We will use the same Scenario, no changes needed)
- Click on Continue. In Configure Bindings field, Select the Data File "Data File with 'HICC - 1 Zipcode/state in 3 States" in the data binding screen, Click on apply Filter right next to bind data file. Select the Filter for New Jersey and click on Apply.
- Click on the proceed to testing Context Screen
- Execute the test and expect to see the test executed only for NJ
Now, change the filter from New Jersey to New York and re-execute the tests, to do that, follow these steps:
- Click on File Binding Icon on Verify HICC calculations (Data Filters on Data Files)
- Click on Change Filter right next to bind data file
- Select the Filter for New York and click on Apply.
- Click on the proceed to testing Context Screen and Select Testing Context with Functional High Volume Cloud
- Execute the test and expect to see the test executed only for NY
Please Note:
- We also recommend that you create another Data Filter for the State PA which will be used in the next topic