Drop down values checking using ATF

phani24
Tera Contributor

How  to check whether a field has all required drop down values as mentioned by the customer using ATF

For example on incident form ,State has Open,Resolved ,WIP,Pending etc .

So how to check using ATF that the respective field has proper mentioned drop down values by the customer .

Setting each value and validating each value is making the test case too long if there are too many values in drop down.

Please let me know a simplified value

3 REPLIES 3

vandna
Tera Guru

Hi Phani,

 

Use field value validation and give the condition like: status = new or status = pending... etc.

 

Thanks

Luke Van Epen
Tera Guru

This sounds like a perfect scenario to use Parameterised Tests:

https://docs.servicenow.com/bundle/madrid-application-development/page/administer/auto-test-framework/concept/parameterized-tests.html

The short version is, you set up a parameter, i.e. your Drop Down field with it's possible values, then you run the same Test multiple times, and it picks a different value from that Parameter every time it runs the test.

For example, your drop down has 4 states:

Open, Resolved, WIP, Pending

You create a Parameter for "State" with possible values: "Open, Resolved, WIP, Pending"

In the test, when you do Set Field Values, set the State field to use the Parameter Input. Then when you run the test, it will execute 4 times in a row, changing the drop down value it uses each time.

Hi,

What steps i have to include to create this test please help by giving the example,

Thanks,

Divya