ATF for Service Catalog Issue?

Brian Lancaster
Tera Sage

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:

  1. Create a user.
  2. Create a user and assign step one user as the manager (this is for approval in the workflow)
  3. Open a Catalog Item
  4. Set Variable Values
  5. Order Catalog Item
  6. 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.

1 ACCEPTED SOLUTION

Brian Lancaster
Tera Sage

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.

find_real_file.png

View solution in original post

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

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

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

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.

find_real_file.png

Brian Lancaster
Tera Sage

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.

.

Hi,

it worked for me. I gave 10 seconds of Timeout for the Record Query Step

find_real_file.png

find_real_file.png

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader