can we attach a text file with dynamic contents in our ATF test case in Servicenow?

Ankita Dutta
Tera Contributor

I was creating an ATF where an integration call is simulated via a text file attached to Integration logs table. I was wondering if i could automate this function in ATF. The main challenge is modifying the content of the text file dynamically before attaching it. Is there any solutions?

5 REPLIES 5

Shaqeel
Mega Sage

Hi @Ankita Dutta 

 

I just tried this on my PDI.

 

What you can use us you can use javascript: gs.daysAgo(-7) in text field.

 

By default, it is updating the seconds by this way you will be getting dynamic entries each time.

Shaqeel_0-1720594730885.png

 

Mark Helpful/Solution:)

 

Regards

Shaqeel


***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.

***********************************************************************************************************************





Regards

Shaqeel

Sorry not helpful. Maybe I wasn't clear. Here I want to attach one text file to a form. Now the content of the text file should fetch information from one of the previous ATF step.

Yashsvi
Kilo Sage

Hi @Ankita Dutta,

please check below link:

https://www.servicenow.com/community/itsm-forum/is-it-possible-to-do-an-attachment-in-atf/m-p/794599

Thank you, please make helpful if you accept the solution.

@Yashsvi 

 

Thats not even the correct solution dear.

and its of 2018 but now it is possible.

 

Regards

Shaqeel


***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.

***********************************************************************************************************************





Regards

Shaqeel