Testing for null in variables in ATF test
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
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.
-----------------------------------------------------------------------------------------------------------------------
If my response helped, please mark it by selecting "Accept as Solution" and " Helpful."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Weston Adams - Did my reply answer your question?
----------------------------------------------------------------------------------------------------
If my response helped, please mark it by selecting "Accept as Solution" and " Helpful."
