ATF: "Request More Information" UI Action Sends Email in UI but Not During ATF Execution

Sachin G K1
Kilo Sage

Hi All,

 

I’m currently working on an Automated Test Framework (ATF) test for a Policy Exception record. When a user clicks the "Request More Information" UI action manually, an email notification is correctly triggered and sent to the requester.

 

However, when the same action is performed as part of an ATF test, no email record is created in the sys_email table, which subsequently causes the next test step—validating the outbound email—to fail.

 

SachinGK1_0-1745914865555.png

Requesting for help here.

 

Thanks in Advance,

Sachin

16 REPLIES 16

Ankur Bawiskar
Tera Patron
Tera Patron

@Sachin G K1 

Don't use Validate Outbound step

Instead use Record Query on sys_email table and check that, ensure you give some time so that email triggers

try to use "Record Query" on email log table

ATF "Validate Outbound Email Generated by Notification" step failing randomly

also check this link

ATF 'Validate Outbound Email' and document ID -> I shared solution 5 years ago

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi ankur,

How do record query work when PE record and email record itself don't gets created in system. As in atf everything will be rolled back

Hi Ankur, 

I tried as you suggested but it failed.

ATF Steps with record query:

SachinGK1_0-1745918015657.png

 

Error:

SachinGK1_1-1745918099416.png

 

 

@Sachin G K1 

are you checking with admin user?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader