Automate Change Request and Approval Process using ATF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 10:06 AM
So I'm trying to develop an ATF that automates the change request process through all of the necessary steps until the request is closed in the end.
So far, I have been able to impersonate a user to open a change request form, fill in all necessary fields, and submit the form for approval. Now the next step would be to impersonate the necessary approver and open up the record to approve the request. I have tried multiple different test steps to try to simulate this step but keep running into issues. The problem is is figuring out a way to simulate the approver to open up the same change record that was submitted in the previous process. Does anyone have any experience doing something similar to this? I figured that with request approval being so neccessary, someone in the community has to of figured out how to simulate this whole process, Thanks!
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2018 06:54 AM
I am struggling with this, I would be interested in what you did to resolve the issue. For some reason I only get to choose the impersonate user and not a record.
Thank You
Troy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2018 01:46 AM
Hi Troy,
Where is it going wrong for you?
Have you read through my previous post on how to get this to work?
Regards
Dos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2018 07:18 AM
HI,
I found the solution.
please follow the below steps. You will understand.
Impersonate | Impersonate the user: Beth Anglin with user Id: beth.anglin | 1 | true | ||||
Open a New Form | Open a new 'Change Request' form |
Change Request [change_request] | 2 | true | |||
Set Field Values | Set the values on the form as follows: Test plan = ATF CHG test and Implementation plan = ATF CHG test and Planned end date = 08/03/2018 05:30:00 PM and Short description = ATF CHG test and Planned start date = 08/02/2018 05:30:00 PM and Backout plan = ATF CHG test and Justification = ATF CHG test and Risk and impact analysis = ATF CHG test |
Change Request [change_request] | 3 | true | |||
Submit a Form | Submit the current form and confirm form submitted to server | 4 | true | ||||
Open an Existing Record | Open the 'Change Request' form with id '{{Step 4: Submit a Form.Record}}' |
Change Request [change_request] | 5 | true | |||
Record Update | Update a record in 'change_request' with the following values: State = Assess and Assignment group = Software Confirm the record was successfully updated |
Change Request [change_request] | 6 | true | |||
Open an Existing Record | Open the 'Change Request' form with id '{{Step 4: Submit a Form.Record}}' |
Change Request [change_request] | 7 | true | |||
Record Update | Update a record in 'change_request' with the following values: State = Authorize Confirm the record was successfully updated |
Change Request [change_request] | 8 | true | |||
Open an Existing Record | Open the 'Change Request' form with id '{{Step 4: Submit a Form.Record}}' |
Change Request [change_request] | 9 | true | |||
Field Values Validation | Validate that the form matches the following condition: Active = true With a failure timeout of 5 Seconds |
Change Request [change_request] | 10 | true | |||
Record Query | Validate there is at least one record in 'sysapproval_approver' matching query: Approving = {{Step 4: Submit a Form.Record}} and State = Requested and Approver = {{Step 1: Impersonate.User}} With a failure timeout of 5 Seconds |
Approval [sysapproval_approver] | 11 | true | |||
Open an Existing Record | Open the 'Approval' form with id '{{Step 11: Record Query.First record}}' |
Approval [sysapproval_approver] | 12 | true | |||
Click a UI Action | Confirm that browser submits 'Approval' form to server when clicking UI Action 'Approve'. |
Approval [sysapproval_approver] | 13 | true | |||
Record Query | Validate there is at least one record in 'sysapproval_approver' matching query: State = Approved and Approving = {{Step 4: Submit a Form.Record}} With a failure timeout of 5 Seconds |
Approval [sysapproval_approver] | 14 | false | |||
Click a UI Action | Confirm that browser submits 'Approval' form to server when clicking UI Action 'Approve'. |
Approval [sysapproval_approver] | 15 | false | |||
Record Query | Validate there is at least one record in 'sysapproval_approver' matching query: Approver = Howard Johnson and Approving = {{Step 4: Submit a Form.Record}} and State = Requested With a failure timeout of 5 Seconds |
Approval [sysapproval_approver] | 16 | true | |||
Impersonate | Impersonate the user: Howard Johnson with user Id: howard.johnson | 17 | true | ||||
Open an Existing Record | Open the 'Approval' form with id '{{Step 16: Record Query.First record}}' |
Approval [sysapproval_approver] | 18 | true | |||
Click a UI Action | Click UI Action 'Approve' on 'Approval' form. |
Approval [sysapproval_approver] | 19 | true | |||
Record Update | Update a record in 'change_request' with the following values: State = Implement Confirm the record was successfully updated |
Change Request [change_request] | 20 | true | |||
Record Update | Update a record in 'change_request' with the following values: State = Review Confirm the record was successfully updated |
Change Request [change_request] | 21 | true | |||
Record Update | Update a record in 'change_request' with the following values: State = Closed and Close code = Successful and Close notes = test 1 Confirm the record was successfully updated |
Change Request [change_request] | 22 | true | |||
Open an Existing Record | Open the 'Change Request' form with id '{{Step 4: Submit a Form.Record}}' |
Change Request [change_request] | 23 | true |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2018 05:41 AM
This is really helpful. It's the kind of documentation/scenario that ServiceNow should be providing. There documentation is pretty light and will just show you how to create a ticket.
The frustrating part for me so far is that ATF will pick up any client script or error that you wouldn't normally see while logging tickets in a browser, but it's enough to make ATF error out and fail. I opened one HI ticket already and now came across another bug which seems to be a known issue that causes my tests to fail.
https://hi.service-now.com/kb_view.do?sysparm_article=KB0692731
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2019 07:20 AM
Fixed In
Kingston Patch 11 | |
London Patch 3 | |
Madrid |