ATF Record not appearing in list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2023 05:21 AM
Hello all, I am testing a catalog item that generates a request for a laptop. When I manually test this item, after submitting the form, the record is saved in the Requests [sc_request] table successfully.
However, when I recreate this process using ATF, the error I get is: "FAILURE: Failed to open the record with id '' in the 'Request' list. Record is not present in the list". Below are the steps of my test
1. Create a User (HR, not impersonated)
2. Create a User
3. Open a catalog item
4. Set variable values
5. Validate variable values
6. Order a catalog item
7. Impersonate (HR approver)
8. Navigate to Module ('Requests' module in 'Service Catalog' Application)
9. Open a record in a list (Error)
Does anyone know how I can resolve this issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 12:04 AM - edited 11-22-2023 12:28 AM
The table name is sc_request.
I find it strange that the error is not filling out the id number that I have referenced from the 'Order a catalog item' step.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 01:22 AM
The table is sc_requests.
I find it strange that the error message is not including the sys id that I have referenced from the step 'order a catalog item'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 06:21 AM
@adaomoji I was able to create my own ATF Test Suite to mimic yours and was able to execute without issues.
Make sure your open record in the list step looks like below.
From looking at your test steps again I think the issue is that the 'Test Laptop' user is not being set as the Requested for user on the sc_request record that gets created. Because the user is not the Requested for on the sc_request record, they cannot see it in the list. Your impersonation step of the user should probably be before you try to open the item - that way the user you are impersonating will be the 'Requested for' user on the sc_request. You can test easily if it is because of the impersonation or not by deactivating the impersonation step you have, I think it would run through the execution just fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2023 08:55 AM
@adaomoji please mark one of the answers posted by a community member for your question as correct. It will help others who have a similar question/issue find the answer in the future 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 02:26 AM
Hello @Ethan Davies thanks for the feedback. I had to rework my test because when I would save the request, it changed my "requested for" field to the approver - even though I initially changed it in the Set Variable Values step. Otherwise your solution would have worked 🙂 Below are my revised steps.