- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2018 10:37 PM
Hello,
I am working on writing ATF test cases where one of the step is to hit inbound rest api which will create Request in sc_request table. I am getting response in json format which includes request number. I want to parse the response to separate REQ number and use it in Record query test step and update some fields on REQ record.
I am not sure how can i use REST response as input for next test step.
if anybody done this sort of thing before please let me know.
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2018 01:54 AM
Hi,
Check this link it has steps
https://docs.servicenow.com/bundle/london-application-development/page/administer/auto-test-framework/reference/atf-rest-steps.html
and let me know if it helpds
Mark my ANSWER as CORRECT and HELPFUL if it helped.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2018 01:54 AM
Hi,
Check this link it has steps
https://docs.servicenow.com/bundle/london-application-development/page/administer/auto-test-framework/reference/atf-rest-steps.html
and let me know if it helpds
Mark my ANSWER as CORRECT and HELPFUL if it helped.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2022 02:25 AM
Hi,
Unable to open the provided URL.
Could you plz help me with something else (facing the same issue).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2018 02:45 AM
I think you have to create you own Test Step Config for your case.
https://docs.servicenow.com/bundle/london-application-development/page/administer/auto-test-framework/reference/atf-step-config-record.html
Create the correct input variables and output variables in your step configuration.
You have to trigger the rest message per code, the easiest code generation for this is through the rest message -> http method -> Preview Script Usage
Just parse the response text body with JSON.parse, fetch your data and write them in your outputs.variables.
Look into other test step configs with "class type is script" to see how it should be used.
https://[INSTANCE]/sys_atf_step_config_list.do?sysparm_query=class_type%3Dscript