Closed mgol closed 7 years ago
This is because the swarm.jquery.org configuration uses a user-agent match that only looks for the OS family, not any particular browser.
I've added icons for the Android and Chrome Mobile browsers. They will be used on the home page once we update our configuration to specify the "Android" and "Chrome Mobile" browserFamily accordingly.
Hm.. it may not be that simple. It's not browser "Android" for Android 2.3 and browser "Chrome Mobile" for Android 4 and higher.
Using http://swarm.jquery.org/job/929 as example, we see the following user agents / ua-parser data:
The Chrome icon should be fine, I guess, if only we see info about the Android version in TestSwarm as well.
BTW, this should only concern Android 4.4 or newer, Android 4.0-4.3 uses the default Android Browser that was removed in 4.4.
I have doubts if it makes sense to test Android versions for Android >= 5.0 since they just use Chrome Mobile and that matters, not the Android version used. Unfortunately, that's what we currently get from BrowserStack. Android 4.4 is an odd one since it has Chrome as a default browser but it's WebView has a frozen Chromium version. In Android 5.0+ both auto-update.
There's another problem I forgot about. The BrowserStack API doesn't provide browser property for mobile devices. Adding a browserFamily to these would mean the tests no longer get run.
I've reverted the jquery/infrastructure patch that added it for Android 2.3 because it was building up a backlog of unrun runs.
The Browserstack API has a browser
field for mobile browsers; for the Android one it's "Android Browser"
. OTH, it returns "Android Browser"
even for Android >= 4.4 which seems incorrect.
Aha, so we can use it but will need a mapping in testswarm-browserstack since ua-parser calls it browserFamily="Android"
and BrowserStack uses browser="Android Browser"
.
So... adding that mapping didn't work. testswarm-browserstack is still unable to map the browser.
This is because testswarm-browserstack explicitly ignores the browser.browser
property from BrowserStack (see testswarm-browserstack.js#L323-L330) due to an inconsistency in the API between /workers
and /browsers
.
/browsers
lists browser: "Android Browser"
, but /worker
doesn't accept that property.
This is now fixed.
/browsers
endpoint exposed a browser name, but /workers
did not support spawning a mobile browser by browser name, only by OS and device. Fixed upstream in BrowserStack v4..browser
in v3 worker objects so that we can start using the v4 model, in https://github.com/clarkbox/testswarm-browserstack/commit/31044fbb553a50f6c85ba6929898650be01a4667.browserFamily: Android
to the android user agent configs for our swarm, in https://github.com/jquery/infrastructure/commit/553ac20746c09e7e586b34ce22f72154fe9b5f24.Per https://github.com/clarkbox/testswarm-browserstack/commit/f246bb8163d663ca173ae3be386a9f7bb82fd66c and https://github.com/jquery/infrastructure/commit/953ccd7b7e08db1fd5db5aa8f68c519be4737f4d, Chrome Mobile on Android 4.4+ now also works properly.
Open http://swarm.jquery.org/project/jqueryperiodic. The Android icon is as follows: instead of just: The actual icon is actually two ones - the first is: and, set as a background for the
::after
pseudo-element is the Android icon. This is set as https://github.com/jquery/testswarm/blob/ba50f43b13c8be3b72bf499f33b81692d15e2942/css/testswarm.css#L476-L478It seems to me that the browser is not recognized so the image is just "an unknown browser under Android"; is that true? For Android <4.4 the Android browser should just have its own icon. For >=4.4 the Chrome icon could appear as that's what we're testing here. But a regular robot icon would still be fine, I guess since BrowserStack presents it just as an Android 4.4/5.0 Browser and not as Chrome.