Reusable tests in service now
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I’m trying to build a reusable test in ServiceNow and running into limitations around dynamically setting catalog item variables.
What I want to achieve -Create a reusable ATF test which will
Impersonate a user (passed as input parameter)
Open a catalog item (passed as input parameter)
Set form values dynamically using a JSON input (key-value pairs)
Submit/order the catalog item
What I tried
Problems
g_form is not available in server-side steps
- Not able to fetch the input of reusable test in run server side script.
I don’t see a way to execute client-side scripts within a custom ATF step
In Custom Step Configuration:
Step Environment = UI is not allowed to use .
Category = Form is also not allowed to use.
Main Questions
How can I dynamically set catalog item variables in ATF using a JSON input?
Is there any way to execute client-side logic (g_form) within ATF or a custom step?
In a reusable ATF test, how do I access the input variables inside a Run Server Side Script step?
Goal
A reusable ATF test where I can pass:
User
Catalog Item
JSON of variable values
…and the test:
Impersonates the user
Sets variables dynamically
Orders the catalog item
Any guidance, best practices, or sample implementations would be greatly appreciated.
