Hemanth M1
Giga Sage
Giga Sage

Hi Everyone,

 

Are you currently performing manual testing of Assessments/Surveys after upgrades or enhancements? If so, and you'd like to explore automating these tests using ServiceNow's ATF (Automated Test Framework)

 

Here is step by step instructions to configure and execute them.

(Do this setup only in Sub production instances)

 

1)Check if ATF Plugin is installed ( Enabled by Default), if not install 

 

System Defintion> Plugins

Serach for "Automated Test Framework" and install (Install if additional ATF plug in required ex: Automated Test Framework - Custom UI,Automated Test Framework - Application Navigator etc...)

HemanthM1_0-1712477863036.png

 

2)Lets say we would like to test below Assessment: which has

A)Drop Down

B)Free Text

C)Attachment

D)Multiple Options

E)Reference Field

 

HemanthM1_1-1712480953269.png

 

3)Create a ATF test

Go to Automated Test Framework> Test>click new

 

HemanthM1_2-1712478019467.png

 

4)Name the Test , Save. Click "Add Test Step" 

HemanthM1_0-1712484993727.png

 

 

5)Query assessment record by using "Record Query" step as below using dynamic conditions.

HemanthM1_2-1712500427811.png

 

Conditions:

HemanthM1_3-1712487467197.png

 

 

5)Add  "Open an Existing Record" step to open assessment record found in the above step

HemanthM1_1-1712485243801.png

 

HemanthM1_4-1712487548974.png

 

3)Add "Click on UI Action" step to click on "Take Assessmemt" button

HemanthM1_5-1712487704350.png

Select Tale Assessment UI action here to open the take assessment UI page

 

 

HemanthM1_6-1712487812231.png

4) Select "Set Component Balues (Custom UI)" to retrive all the assessment questions.

HemanthM1_7-1712487903820.png

 

Click Retrive Components :

HemanthM1_8-1712487995885.png

 

This would open a new window to retrive all the questions. Once its done, go back to the above page and click "Next" to set assessment answers (Drop down value, Free text value, Multiple Selections and Reference field value)

You don't see Attachment Question on here (will get to that in next steps)

 

HemanthM1_9-1712489130170.png

Attachment question will not appear as we don't have any client side step to upload, this should be done using "Add Attachment to existing record"

 

5)Add Record Query step and add dynamic conditions to get Attachment Question referencing this assessment

HemanthM1_1-1712500396428.png

 

Cinditions to get Attachment question dynamically 

 

HemanthM1_10-1712489729715.png

Select Assessment_instance_question table and pick previous record. Upload the Attachment to be tested

HemanthM1_1-1712493907518.png

 

HemanthM1_12-1712489952281.png

 

6)Add Step to submit the assessment using "Click Component (Custom UI)" and Click on Retrive components to retrive options available on the Assessment UI page

 

HemanthM1_2-1712491611421.png

 

Select submt button and click Submit

 

HemanthM1_3-1712491921200.png

 

7)Navigate to main test page and click "Run Test"

 

HemanthM1_4-1712492010605.png

 

Watch the result now in a new window 😍

 

HemanthM1_5-1712492211307.png

 

 

HemanthM1_6-1712492249097.png

 

Navigate >Test Results related list under main Test record, this would give results for each step with screenshots

HemanthM1_3-1712500659900.png

 

Open the record

HemanthM1_0-1712493789415.png

 

Thank you,

Hemanth

ServiceNow MVP 2024 and ServiceNow Community Rising Star 2022 & 2023

 

My other articles :

Set up interactive filter on UI builder (for data visualization reports and List records) 

 

Set Up "Step Based Request Fulfillment" for Catalog Items 

 

Need to know about Schedules and Define them in SLAs 

 

My ServiceNow Share Projects:

Add signature and update fields to a fillable PDF document

 

Get Record URL action in the flow designer (Use it in the Send Email action) 

 

Domain Separation: Alert Developers/Users when open a configuration record (ex: Business rules) in d... 

 

Custom Generic Flow Action to Create Assessment 

Comments
Prasanna_Patil
Tera Guru

Thank you for detailed explanation!!

Version history
Last update:
‎04-07-2024 07:52 AM
Updated by:
Contributors