How to test 'New button and related list records through ATF

Rahul R1
Mega Contributor

hello everyone,

I cannot test anything on a form that is hiding inside of a Related List. how can I access the Related List fields inside of a Test?  How can I access the tabs inside of the form and how can I create new records under related list so can you tell any workaround solution ??

 

Thanks 

 

3 REPLIES 3

georgimavrodiev
Mega Guru

Hello Rahul,



After spending some time reading / learning about the ATF functionalities, I reached the conclusion that we cannot populate Related Lists in an ATF test, the same way users do.
However, during my investigation, I found a way to achieve my goal of populating Related Lists via an ATF test.

You may achieve the same by accessing the Related List tables directly, as basically these are relationship tables.
I will give you an example:
- I had a requirement -> to create an ATF test for the Normal Change Request Main Workflow. In one of the steps I needed to find a way to populate the 'Affected CIs' Related List without using the 'Configuration Item' field on the Change Request record, as it was removed from the Change Request form. So, in order to achieve this, I set my ATF test to open a new form in Cis Affected (task_ci) table and populates it in a way via which the new record will be connected to the Change Request record of mine. Here, I simply added the number of the Change Request into the 'Task' field of the Affected CI record and also populated the 'Configuration Item'. Once the changes get saved and the Affected CI form gets submitted -> the 'Affected Cis' Related List of the Change Request will be populated accordingly.

The same approach works for all Related Lists, basically.

I would advise you to use the same mechanism whenever you would like to populate a Related List via an ATF test: simple open a new form in the relationship table (the one of the Related List), fill it in in a way to match the main form and then submit the new record. Once this gets done -> the Related List you are interested in will be populated.

 

Hope this information will be of use to you, Rahul!



Best Regards,
Georgi Mavrodiev

IT Consultant,
Do It Wise Ltd.

You may visit us in our Web Site: www.doitwise.com

Georgi,

 

Thanks for your reply. I will go through above functionality as you mentioned with example 🙂

Regards

Rahul  

nickpqa
Tera Contributor

Hi,

 

To answer to your question

1) Need to use Related list fist to clickon 'edit' andor 'new' button

2) Need to use Click UI component for your query and drag your selection from left to right and Save

 

Attached the screenshot for your reference. Please contact me directly as an ATF expert / Architeh I can help you with. 

 

nickpqa_0-1737671462505.png

 

 

 

If my response has resolved your query, please consider giving it a thumbs up ‌‌ and marking it as the correct answer‌‌!

 

Thanks

Nayan Patel

IT Servicenow Consultant

#E-Track Consultant Inc

If my response has resolved your query, please mark it Helpful by giving it a thumbs up and Accept the Solution