Testing for null in variables in ATF test

Weston Adams
Tera Contributor

I'm running an ATF test where I am running this test.  INCIDENT MGMT: Incident creation - Self-service _Computer Hardware Issue.

Location is a required field on the form, but my location value for users is 'null'.  Short of requiring this data when creating new users, and populating this data in our database.  I was wondering if there was a way to test if this value is null and populate it with a specific value, and pass that value in the test?  I've used the data pill to pass the field value when it's present.  When it's null, that's when it times out and fails.

 

I'm new to ServiceNow ATF, so I've plenty to learn.  I can get my test to work if the value is populated before the test.  

So I'm looking for guidance on possibilities and where the knowledge is located, so I can teach myself.

 

Thanks, 

2 REPLIES 2

Sardash
Giga Guru

@Weston Adams  - 

In many cases, Incident form auto-populates Location from user profile. If the impersonated user doesn't have location then the field will set to Empty while submitting Incident. So please add Location while creating a new user as shown in below screenshot.

Sardash_1-1766380815740.png

-----------------------------------------------------------------------------------------------------------------------

If my response helped, please mark it by selecting "Accept as Solution" and " Helpful."

 

@Weston Adams  -  Did my reply answer your question?

----------------------------------------------------------------------------------------------------

 If my response helped, please mark it by selecting "Accept as Solution" and " Helpful."