Closed sbrunot closed 10 years ago
Well, we’re not able to support a WebDriver server that doesn’t support the standard execute
function for hopefully obvious reasons, so I am not sure we’ll be able to do anything about this. Sauce Labs never had a really functioning iOS testing service; the only driver approaching usability with iOS is ios-driver, and Sauce don’t use it. IPhoneDriver is deprecated, and Appium just isn’t up to the task (it is missing way too many APIs).
For the record, it works fine using intern 1.6.
@csnover it sounds like you're saying iOS tests are currently not supported (well), just so we can focus our testing efforts better. I do see the same in delite where tests will fail in intern 2.0.1 but run in 1.7.
It appears both Android and iOS emulators/simulators aren't stable and not worth testing against? SauceLabs have said they plan to have real device testing and selendroid (for chrome testing) by the end of the year so maybe that's the point when mobile web testing will be supported
For the record, I've performed some further experiments and noticed that the test runs fine when using NullTunnel and a local instance of appium. So this is really a SauceLab related issue, not an appium issue.
I've narrowed down the issue to the features and defects discovery process of leadfoot/Server.js.
If I comment out the two following pieces of code in Server.js:
// At least ios-driver 0.6.6-SNAPSHOT April 2014 does not support execute_async
testedCapabilities.supportsExecuteAsync = session.executeAsync('arguments[0](true);').catch(unsupported);
and
// At least ios-driver 0.6.6-SNAPSHOT April 2014 will never complete a refresh call
testedCapabilities.brokenRefresh = function () {
return session.get('about:blank?1').then(function () {
var dfd = new Promise.Deferred();
function cleanup() {
clearTimeout(timer);
if (!refresh.isFulfilled()) {
refresh.cancel();
}
}
var refresh = session.refresh().then(function () {
cleanup();
dfd.resolve(false);
}, function () {
cleanup();
dfd.resolve(true);
});
var timer = setTimeout(function () {
cleanup();
}, 2000);
return dfd.promise;
}).catch(broken);
};
the test runs fine, without any issue.
To confirm, this is a problem with Appium? If so we can merge this into #223.
Otherwise, there’s no plan to support the deprecated IPhoneDriver that got superseded by ios-driver and Appium, since it’s too broken in other areas to be treated as a useful test environment.
With regards to the issue only happening in Sauce Labs cloud specifically, that makes it difficult for us to fix since it’s not a compatibility issue with the driver itself, but an issue with the cloud provider. We have lots of these issues with Sauce, not exclusive to their mobile testing stuff, which is one of the reasons why support for other providers was added in 2.0. I am not sure what our long-term plan needs to be to try to handle issues like these, since their team consistently fails to address known issues or communicate with us in any way.
FWIW, we are aware of the frustrations some folks are having with Intern and Sauce, and have a roadmap project in the coming weeks to dig in and contribute fixes to as many as we can. To be clear, our cloud supports IOS simulators and Android emulators, each of which has many successful users. We will also be making real devices available in the coming months.
Which appiumVersion are these tests sending in the desired caps? The minimal version expected to work on Sauce is appium 1.2.1 (this is the first version of appium that allows executeAsync to work properly when appium is on a different machine than the client).
@admc Great that you are aware and looking into it! Could you guys maybe respond now to the ticket that has been open since March about how your monocle proxy is broken (10498)? We asked for a status update on July 28 and have received no response.
@jlipps thanks for your feedback. No specific capability is set to request a particular appium version. I'll update the test to specifically request appium 1.2.1 and see if it fixes the issue.
OK, sounds good @sbrunot. Better yet, request 1.2.2 (just released that new version on Sauce)
@jlipps thanks to your help (and this blog post https://support.saucelabs.com/entries/50675504-iOS-Desired-Capabilities), I've updated the capabilities as following to run the test using appium 1.2.2:
{ platformName: 'iOS', platformVersion: '7.1', browserName: 'safari', deviceName: 'iPhone Simulator', "appium-version": "1.2.2" }
Unfortunately, it also failed, but for a different reason: Intern does not report any failure (it doesn't report anything), but I can see on the SauceLab side that the test failed (the Saucelabs test execution result is here (I guess it is a public one): https://saucelabs.com/tests/dacc96e8173a42ae88a8aba5db82cd68).
I haven't had time to debug Intern to understand at which stage it is failing this time.
not sure what's going on there. looking at the logs, you call a refresh() command after navigating to "about:blank?1", then we don't hear from you for 60s so the server ends the session. is there a reason your client would be stalling at that point?
Yes, a bug at this line: https://github.com/theintern/leadfoot/blob/master/Server.js#L721 (the isFulfilled
call is invalid, it should just always call cancel
now)
I confirm that with @csnover 's fix, the test runs fine.
great!
Thanks a lot.
I've tried to run a simple functional test that only display the google.com homepage:
It is then run using the SauceLabs tunnel, requesting the following capabilities (intern environments configuration):
Unfortunately, this simple test fails with the following error: