-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cloud emulation provider #52
Comments
I think SauceLabs is probably a better approach re emulation, if it is required. |
but not a solution for everyone, it is not free |
Seems to be free for OSS, same as travis, coveralls and codecov which I'm also using here? https://saucelabs.com/beta/signup/OSS/None Looking at their actual pricing page, I'm not sure whether or not this is only a beta thing, which would make it a non runner for me too. |
Updates from my research. I have been looking into ways to automate locally first, and then integrate into a cloud platform (like sauce labs). First I want to say that there was no immediate easy use case here. But I successfully ran a protractor test against an iOS simulator via Appium as a bridge. There is so much more testing that is needed (like verifying that I can test cordova features), but I will update as it seems fit. Here is the configuration file, I need to add multiple capabilities for local browser tests and emulators.
Also, there was a significant amount of command line configuration and settings needed to run these tests. I needed to run appium-doctor to see what my computer needed and then upgrade and install everything. Looking at a SauceLabs configuration, it seems that you can integrate your Appium tests to automatically upload to saucelabs and run against a variety of devices. My next step is to test cordova features locally, and then integrate with saucelabs. TL;DR - This is not straightforward and there is literally no documentation online about this. Hopefully we can come up with some. |
This is fantastic. Definitely seems to be something worth documenting and implementing some boilerplate for. Looking forward to further updates. |
@lathonez Yes, I would like to document it. I got stuck because the app I am testing on has a facebook login portion and my protractor skills are not solid enough yet to handle that new screen popup. Plus I havent tested a native function yet. |
They're almost certainly better than mine. Something i need to work on. Presumably someone out there has tested an fbook login with protractor |
FYI, I am using this piece of code for google login, which you can easily adapt for facebook: function _checkPresenceOf(selector) {
return browser.wait(function() {
return browser.isElementPresent($(selector));
}, 5000, selector + ' not present');
}
var handles = null;
browser.getAllWindowHandles()
.then(function(_handles_) {
handles = _handles_;
})
.then(function() {
return browser.switchTo().window(handles[1]);
})
.then(function() {
return _checkPresenceOf('#Email');
})
.then(function() {
$('#Email').sendKeys('[email protected]');
return $('#next').click();
})
.then(function() {
return browser.driver.sleep(500);
})
.then(function() {
return _checkPresenceOf('#Passwd');
})
.then(function() {
$('#Passwd').sendKeys('test');
return $('#signIn').click();
})
.then(function() {
return browser.switchTo().window(handles[0]);
}); |
Keeping this open as I think it's ionic (mobile) specific. |
@lathonez I thought ripple was dead? Only emulates very few native plugins e.g. geo location. Microsoft announced their own open source cordova simulator 6-9 months ago to replace it: |
Thanks for the link. |
As suggested by @mebibou, the following quotes from #42 directly -
Also, I don't know if you know ripple-emulator, but it allows you to run your app like an Android or iPhone app with some Cordova features (or writing your own bridges if you need more). Here's my full
protractor.conf.js
to give you an idea:Although this used to be working before, since I updated to
ionic2-beta.3
it doesn't work anymore 😞 (ripple doesn't want to load anymore I don't know why)The text was updated successfully, but these errors were encountered: