
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2022 05:06 PM
I'm setting up ATF for Service Catalog. In my 2nd test I using the UI 16 interface to open a request using the service catalog test steps. Up to step five seems to work fine when watching the client test running.
My Steps Are:
- Create a user.
- Create a user and assign step one user as the manager (this is for approval in the workflow)
- Open a Catalog Item
- Set Variable Values
- Order Catalog Item
- Record Query - This is done on the sc_req_item table with request = document id from step 5.
My test keeps failing at step 6 "FAILURE: No records matching query: Request = (empty)". In the first test I built I used the same record query as the only difference was the step was Order a Catalog Item (SP) and it worked fine. Any idea why it is not working when using UI 16 to order the item? It’s almost like step 5 is not working even though I get a success message from it, and it looks fine when watching the client test runner.
I have tried deleting and re-adding step 6.
Solved! Go to Solution.
- Labels:
-
Automated Test Framework

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2022 12:36 PM
As a work around after submit I used a click custom component. So I could click the checkout button on the shopping cart page. Then for my record query since I don't get a document id from the custom component I did created on today and request.requested_for is step 2 user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2022 10:44 PM
Hi,
Order Catalog Item does give output as Req SysId
Are you sure the user you are using has valid table level READ Access to sc_request?
Any query business rule on sc_request is blocking the user from the Record Query?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2022 10:00 AM
So, in my first test I did I used the Service Portal to submit the request. I was able to get the sys_id of the request from Open a Catalog Item (SP) but from what you said the equivalent test step in the standard UI does not give the sys_id of the request. Screenshot below when you configure the record query it shows like the Oder Catalog item is going to give you the request document id. Seems like there might be a logic issue there if that is the case.
When it does the record query it is acting as the person who initiated the test which is my admin account so ACL for the sys_id should not be an issue.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2022 03:00 PM
It seems even though I'm getting success from Order catalog Item that is where the failure is. I tried doing a record query using created today and it still fails to find anything.
.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2022 11:28 PM