This is a migrated thread and some comments may be shown as answers.

WebUI test - Local Host refused to connect.

5 Answers 250 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Heinie
Top achievements
Rank 1
Heinie asked on 22 Oct 2020, 02:20 PM

We have created UI tests using the DEV plugin.

The Project code gets committed to SVN and then the Test is executed via Bamboo as a task using ArtofTest.Runner:

C:\Program Files (x86)\Progress\Test Studio\Bin>ArtOfTest.Runner list="D:\Bamboo
_Home\xml-data\build-dir\FLON-FLOM-JOB1\src\TestStudioProject\TestLists\TestList
2.aiilist"

 

The test execution does start and the tests gets executed but once the browser is openend , there is an error message : Localhost refused to connect.

 

TestStudio_Runtime_2020_2_0910_1 is installed and configured on the machine that execute the test.

 

Please see attached screengrab.

Thanks

 

 

 

 

5 Answers, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 22 Oct 2020, 03:04 PM

Hi Heinie,

Thank you for the thorough description of what you are trying to accomplish - this is really helpful for me to provide you additional details on the case. 

It seems that something on the particular machine prevents the communication between the Test Studio execution process and the browser. There are few things to verify on your end to drill down what is causing the misbehavior. Please, take the time to review the below points and let me know your findings:

  1. Is there an active firewall on the machine, which will execute the tests through Bamboo? 
    If yes, please, try to deactivate it for a while and check if the test execution will start as expected through the Bamboo task. 
  2. If there is any antivirus software, it could be also preventing the Test Studio ArtOfTest.Runner.exe to start as expected. So, please, check this possibility as well. 
  3. If none of the above is applicable, please, trigger a test run through the Bamboo task and when you get to the state from the screenshot, open the Windows Task Manager. In its Details tab there should be a Test Studio process called Telerik.TestingFramework.Hosts.Manager - do you see such one? 
  4. In case this process is not started, please, enable the logging from the Test Runner and execute the Bamboo task once again. Once the browser returns the same message that the localhost cannot be reached, you can close it and then collect the log generated so far. Please, send this zipped via this thread. 

As a side note in this discussion, I would like to point your attention to a possible issue you may encounter - as the Test Studio tests are functional UI tests, these require an active desktop session to be correctly executed. Therefore, the Test Studio Run-time client allows you to control the user session on the remote machine and keep it unlocked and active. You can find some additional details on the topic here. 

Please, let me know what is the outcome of the above mentioned suggestions. Thank you in advance for your cooperation. 

Regards,
Elena
Progress Telerik

Do not forget to sign up for the upcoming Test Studio Release Webinar. You will see what a real blazing fast recording experience is. See you on 11 November, 11 am ET.
0
Heinie
Top achievements
Rank 1
answered on 23 Oct 2020, 09:56 AM

Hi Elena,

 

1. I have disabled the firewall and and did not make a difference.

2. The Antivirus software has been disabled and did not make a difference.

3. I have enabled the logging and have attached the log.

Could it be that the localhost is not resolving?

 

 

0
Elena
Telerik team
answered on 23 Oct 2020, 01:20 PM

Hi Heinie,

Thank you for your prompt reply. 

My next suggestion corresponds to your additional query, actually - have you modified the hosts file on this Bamboo machine? Or, is there any other mechanism you are using to change how localhost gets resolved in the network? 

Can you, please, check if the Telerik.TestingFramework.Hosts.Manager process gets started when the test run is triggered? This will be also an interesting finding in case there are no rules for how localhost is resolved. 

Thank you once again for your cooperation.    

Regards,
Elena
Progress Telerik

Do not forget to sign up for the upcoming Test Studio Release Webinar. You will see what a real blazing fast recording experience is. See you on 11 November, 11 am ET.
0
Heinie
Top achievements
Rank 1
answered on 23 Oct 2020, 02:56 PM

Hi Elena,

The Telerik.TestingFramework.Hosts.Manager does start. See attached picture.

The hosts file has not been changed.

 

Any ideas?

Thanks

0
Elena
Telerik team
answered on 26 Oct 2020, 12:14 PM

Hi Heinie,

Thanks for these additional details provided. 

As of Test Studio perspective there is no obstacle for the test run to be initiated -based on the logging the web socket and file server are successfully started on browser side and the Telerik.TestingFramework.Hosts.Manager process from Test Studio client is also active. However, the communication between these components is somehow prevented. 

There is a side note about the hosts file - in the screenshot you shared there is a 'S' at the end of its last row. I guess that this is added by mistake when saving the file, but it still worth it to check if this is not causing troubles. 

And since you checked the firewall, antivirus and the hosts file, which doesn't seem to be an issue for the current case, can you, please, check if there is anything specific in the machine configuration, which could be affecting the resolving of localhost? Possibly, you may need to consult with your IT administration for further details on this topic.

One more possible cross check could be to install a Test Studio instance on this particular machine and verify if recording and quick execution are possible. I understand that this may take some additional time to test, but I will appreciate if you can perform it. If you decide to give this a try, you will probably need to switch a license to that machine - here is how you can do this. 

Please, let me know about any findings you manage to sort out on the case. Thank you once again for the time you spent in our discussion.

Regards,
Elena
Progress Telerik

Do not forget to sign up for the upcoming Test Studio Release Webinar. You will see what a real blazing fast recording experience is. See you on 11 November, 11 am ET.
Tags
General Discussions
Asked by
Heinie
Top achievements
Rank 1
Answers by
Elena
Telerik team
Heinie
Top achievements
Rank 1
Share this question
or