jquery / testswarm

Distributed continuous integration testing for JavaScript.
http://swarm.jquery.org
Other
966 stars 157 forks source link

The Android icon looks weird #306

Closed mgol closed 7 years ago

mgol commented 9 years ago

Open http://swarm.jquery.org/project/jqueryperiodic. The Android icon is as follows: screen shot 2015-07-16 at 19 56 51 instead of just: the robot icon The actual icon is actually two ones - the first is: browser-unknown 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-L478

It 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.

Krinkle commented 9 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.

Krinkle commented 9 years ago

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:

mgol commented 9 years ago

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.

Krinkle commented 9 years ago

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.

mgol commented 9 years ago

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.

Krinkle commented 9 years ago

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".

Krinkle commented 9 years ago

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.

Krinkle commented 7 years ago

This is now fixed.

screen shot 2017-03-22 at 19 13 48 screen shot 2017-03-22 at 19 13 55 screen shot 2017-03-22 at 19 13 31
Krinkle commented 7 years ago

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.

screen shot 2017-03-30 at 12 38 42