The CreatorCon Call for Content is officially open! Get started here.

Testing a Flow Designer Flow End-to-End using Automated Test Framework (ATF)

Dan108
Tera Contributor

Our scoped application in ServiceNow has a Record Producer (RP) called "Request New Product". 

When a user submits a request via this RP, a record is created on the TRM Product Request table (extends 'task' table).

A Flow Designer flow called "TSS Product Install" is triggered when a new record is created in the TRM Product Request table.

"TSS Product Install" flow will check a Catalog Variable called "TSS Product Request Trigger", which it uses to determine which of the 6 sub flows it needs to call.

Once the appropriate sub flow is called:

  1. the sub flow will create tasks and assign them to users and/or groups
  2. the sub flow has 'Ask for Approval' steps for each task created, and waits for user to make decision (Approve/Reject) before proceeding
  3. the sub flow calls additional sub flows (e.g. if request approved, sub flow is called to create records necessary when a request is approved)

My question is this:

Can we utilize ATFs to submit a "Request New Product" request and then approve (or reject) the tasks that are generated from the sub flows?

 

I've been experimenting a little and have a few questions/concerns:

  1. Its a best practice to create/impersonate test users in ATFs... but the sub flows are configured to assign tasks to specific users within the company
    1. Will there be any problems with impersonating an existing user within the ATF in order to be able to approve a task that is assigned to that user?
  2. We have a custom UI Action created on the record form of the table where the task records are being stored (TSS Tasks)... when we impersonate the user that is assigned the task, the UI Action does not appear for some reason. 
    1. Do custom UI Actions integrate with ATFs?
  3. Seems like there will be many steps needed in order to approve all of the tasks by the people that are assigned them... are there any best practices regarding testing flows with ATFs? We don't want to start spending lots of time building these ATFs when there might be options out there that would save us some time.

Thanks

0 REPLIES 0