- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2019 12:09 PM
Hello,
I am trying to update the record and approve it but I am running into couple problems. I followed this tutorial from servicenow, but it is not working. I am using Kingston btw.
The TL;DR version is, how do you approve a catalog item record. What are the steps for it? The tutorial I linked did not help me.
The long version is below.
What I am trying to do:
In ATF, I want to open a catalog item, set the values, submit it and go through the multiple approval process of the record.
What I did:
First Approach
I created a test file, say Test 1. What I first tried to do in Test 1 is:
- Impersonate (as User 1)
- Open a Catalog Item
- Set Variable Values
- Order Catalog Item <-- Successful up to this point
- Impersonate (as User 2)
- Record Query <-- Failing here saying (1** see below)
- Record Update
Second Approach
I created two test files. One is Test 1 and Test 2.
In Test 1:
- Impersonate (as User 1)
- Open a Catalog Item
- Set Variable Values
- Order Catalog Item
In Test 2:
Before I start Test 2, I go to the table where the record was created from Test 1 and paste into the Replay Request Item as shown in the tutorial in Test 2. It defeats the purpose of Automation if I have to do something manually, but I just want to pass the test, but it still doesn't work.
- Replay Request Item (paste the RITM number I got from the record)
- Impersonate (as User 2)
- Record Query <-- Again, failing here (2** see below)
- Record Update
I have more approvals I need to go through, but for now, I just want only one approval working before I proceed.
Problems I am running into:
1** On my first approach, I am trying to get it approved from sysapproval_approver table. I am trying to find the record using the RITM number, but I get an error saying it couldn't find the record but it shows it was looking using the REQ number and not the RITM number. The condition I put was Approval for | is | Step 4: Order Catalog Item > Request
2** On my second approach, the problem I am running into the same problem as above. The table is same but the condition is a little different. The condition is Approval for | is | Step 1: Replay Request Item > Replayed Request Item > Request and instead of searching the record using the RITM number, it is looking it up using the REQ number.
I did more testing and I was running into more weird problems, but if I mention all that, the post will get really long and I doubt anybody will read it. So my question is, how do you get the record to approve in ATF?
Thanks
Update: Follow up post to this with more questions is here.
Solved! Go to Solution.
- Labels:
-
Automated Test Framework
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2019 11:30 AM
Here is what I would suggest as it working on my side for approval,
- Impersonate (as User 1)
- Open a Catalog Item
- Set Variable Values
- Order Catalog Item
- Record Query -> To get RITM record using Req ID from #4
- Record Validation - > to ensure that RITM exist and the stage is approval
- Record Query - > To get Approval(sys_approval) record using RITM ID from #5
- Impersonate -> impersonate approver to validate
- Open exist form -> To open approval form using Approval ID from #7
- Set Variable Values -> You can select option to Approved.
- UI action/button -> Click Save button to save the form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2019 08:35 AM
Hey bbf3562,
I opened a follow up post here where I have more questions. It would be greatly appreciated if you can help me out on that.
Thanks