1

I am using Xamarin.UITest for automated tests of an Android and iOS application. This app makes some HTTP requests to a webserver.
For testing purposes and to easily respond with the needed data for the test case, I start a temporary HTTP server (I am using HttpListener) in the test and adjust the application, so it makes the requests to this temporary server.

When I run the tests local on my devices and simulators, everything works.
When I run the tests in the Xamarin Test Cloud, I can not get a connection to the HTTP Server. Url in that case would be http://executionhost11.prod:/...

Is this use case possible in the Xamarin Test Cloud?
Do I have to use some specific ports (I tried 8081 and 7103)?

Andreas Willich
  • 5,665
  • 3
  • 15
  • 22

2 Answers2

1

I was informed by the Xamarin Support, that my usecase is not supported by Xamarin Test Cloud.

Between the devices and the executor are firewalls in place, which prevent the connection from the device to the test executor.

Recommended models are:

  • spin up a cloud hosted http server
  • start the http server on the device
Andreas Willich
  • 5,665
  • 3
  • 15
  • 22
0

The requirements for connecting to Test Cloud are described in the Submitting Tests to Xamarin Test Cloud guide. Specifically it says:

Internet access to the Test Cloud web servers is required. Firewalls should be configured to allow traffic to the Test Cloud servers at the following IP addresses:

  • 195.249.159.238
  • 195.249.159.239

The Test Cloud servers require port 80 and 443.

Android applications must request the INTERNET permission in AndroidManifest.XML.

The information here is true whether you're uploading tests (which is the main scenario described in the guide); and remains unchanged when communicating with a server, in that your server will need to access those IP addresses.

Community
  • 1
  • 1
user62171
  • 641
  • 7
  • 18
  • Possibly also related, depending on the specific approach you're using: https://developer.xamarin.com/api/type/Xamarin.UITest.ITestServer/ – user62171 Oct 03 '16 at 23:55
  • 1
    This is for the case, when you want to access your own server, which runs in your network, from the test cloud. I wanted to access a server, which runs on test executor of the testcloud. In the meantime I got an answer from Xamarin support and they informed me, that my usecase is not supported. – Andreas Willich Oct 04 '16 at 07:11