ATF : Can we test the URL link in content item?

S_59
Tera Contributor

Hi,

I am new to ATF and testing some content items in portal page. we defined a URL in the content item which redirects to new tab ex: Yahoo new URL is defined in the below content item. I need to test if yahoo news is opening or not? can we achieve this using ATF? If yes, please guide me through the steps.

 

S_59_0-1703983130003.png

 

 

Thanks,

Sai 

2 ACCEPTED SOLUTIONS

Amit Verma
Kilo Patron
Kilo Patron

Hi @S_59 

 

URL availability check can't be achieved directly. We can make use of the following ways to get it done :

 

1. We can make a REST API GET call to the URL from ServiceNow instance using Rest Message. If the website is available, you should get 200 as a response. If any other response, you can infer that the website is down.

 

2. You can make use of a PowerShell script to achieve this. The PowerShell script can check the URL availability and return you the status. The PowerShell script could be configured as a Mid Server Script file which could be called from a Flow Designer action via PowerShell Step or via Custom Action in Workflow Designer.

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

View solution in original post

Hi @S_59 

if you really want to test the availabilities of the external links, you should separate this is an individual server-side ATF. That ATF-Test can collect the links from all content items and perform a "ping", for example with the help of a REST Message.

Maik

View solution in original post

5 REPLIES 5

Amit Verma
Kilo Patron
Kilo Patron

Hi @S_59 

 

URL availability check can't be achieved directly. We can make use of the following ways to get it done :

 

1. We can make a REST API GET call to the URL from ServiceNow instance using Rest Message. If the website is available, you should get 200 as a response. If any other response, you can infer that the website is down.

 

2. You can make use of a PowerShell script to achieve this. The PowerShell script can check the URL availability and return you the status. The PowerShell script could be configured as a Mid Server Script file which could be called from a Flow Designer action via PowerShell Step or via Custom Action in Workflow Designer.

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.