web-platform-tests / wpt

Test suites for Web platform specs — including WHATWG, W3C, and others
https://web-platform-tests.org/
Other
5.01k stars 3.11k forks source link

Access Test Server from devices in same Network using local IP address or `web-platform-test.local` #3940

Open louaybassbouss opened 8 years ago

louaybassbouss commented 8 years ago

For some APIs (e.g. Presentation API) we need to access the Test Server e.g. running on a PC from other devices in the Network. This is not possible since the Test server only allows specific domains (defined in host file, see README.md). A possible solution is to advertise the Test Server in local Network using MDNS/DNS-SD (user tools like dns-sd or avahi). this is a example for how to do it using dns-sd:

$ dns-sd -P web-platform-test-service _http._tcp local 8000 web-platform-test.local 127.0.0.1

Then we need to allow the Test Server to accept requests to web-platform-test.local.
This solution can be also used to run local tests on mobile devices like Android or iOS in same network.

filmaj commented 7 years ago

Yes please, I'm trying to leverage these tests to check spec adherance in mobile browsers and the native WebView implementations on various mobile platforms (via projects like Apache Cordova).

filmaj commented 7 years ago

I was able to work around this by doing the following:

foolip commented 7 years ago

@louaybassbouss, @filmaj, is this blocking Presentation API tests from being put into web-platform-tests? Do you know roughly how "much" of the Presentation API is blocked on this? Labeling as backlog for now, but if it affects many parts of the platform we should eventually increase the priority.

@mfoltzgoogle FYI