-
Notifications
You must be signed in to change notification settings - Fork 6
A lot of failure here, but also a lot of learning... #3
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
Open
randytarampi
wants to merge
17
commits into
hadnazzar:master
Choose a base branch
from
randytarampi:feat/cloud-runners
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Android specific for now, but we'll cross the iOS bridge when we get there...
Just for slow environments.
It's not totally necessary.
…ut` are actually in seconds, not milliseconds.
…or longer before tests.
* Try hooking this up all up in Travis. Two jobs, one to run the unit tests and one to run the E2E ones headlessly on Travis infrastructure. Tempted to add jobs to build and run against BrowserStack, Sauce Labs and TestObject, but one thing at a time first... @hadnazzar already committed the dummy credentials in `android/gradle.properties` though, so it's not like having Travis decrypt this committed keystore will be more secure or anything. If anything, it's worse 😂 * Just install Android SDK dependencies ourselves. Travis is still using the deprecated `android` command to install things per travis-ci/travis-ci#8874 (comment), which might be behind this issue (and others to come). * Actually, just prefer letting Travis install these (properly). Copy/pasta problems coming from the `sdkmanager` command notation - `android` should still be able to find these versions no? * Try for `ANDROID_BUILD_TOOLS_VERSION` at 28.0.3. * `npm install -g yarn` `before_install` on `E2E tests (android)`. * Use the given `nvm` to install `$TRAVIS_NODE_VERSION`. Travis still sets this right? I mean, the version is in the build name... * Defer to `TRAVIS_NODE_VERSION` if it exists, otherwise use `10`. * Explicitly say `yes` to all `sdkmanager --licenses`. * Just explicitly install the Android SDK per travis-ci/travis-ci#8874 (comment). Why wasn't this license already accepted? * Explicitly call `$ANDROID_HOME/tools/bin/sdkmanager`. And accept all licenses. * Remove extra slash. * `${ANDROID_HOME}` is what needs to be evaluated, not `$ANDROID_HOMEtools` * This wanted to be a space, not a `"`. * Whitelist all the licenses, even though it shouldn't matter... * Set `supportLibVersion` to be the same as `buildToolsVersion`. * Move `node_js` language/version selection to the `Unit tests` job. * Revert "Set `supportLibVersion` to be the same as `buildToolsVersion`." Yeah. No. This reverts commit 6fd8f25. * Just `echo` in the license manually... * Run `build:android`, not `bs:android`. * Actually specify the correct `ANDROID_API_VERSION`. And use `android create avd` and `android delete avd` instead of `avdmanager`, which doesn't seem to get installed properly. * `pree2e` script should `adb wait-for-device get-serialno`. * Note the closest I got to getting Travis to run the app on an emulator. I'm pretty sure I'm just running into a race condition somewhere installing the app, but I can't quite tell exactly where, or what to wait for. * Just bring our own Android environment per https://medium.com/@nocnoc/android-emulators-in-thcloud-f39e11c15bfa. It boots the emulators, but getting Appium to install the emulators is a whole other story... * Fix missing `ANDROID_TOOLS_BUILD_VERSION` and incorrect `ANDROID_EMULATOR_PLATFORM_VERSION`. * Define `ANDROID_HOME` and `ANDROID_SDK_ROOT` in `before_install`. Not `before_script`. * Try testing with `android-23` on `armeabi-v7a`. * Try and let `appium` boot and initialize the emulator on its own. * Only `sleep` for at most 60 seconds `beforeAll` `wd` E2E tests. * Set Travis timeouts to be 10 minutes. Worth a shot I guess? * Revert "Only `sleep` for at most 60 seconds `beforeAll` `wd` E2E tests." Just defer to the `DEVICE_TIMEOUT` here. This reverts commit 4f1416c. * Don't bother caching `gradle` artifacts. * Just boot the emulator ourselves. This commit reverts (conceptually) 4ae60c0. * `sdkmanager` installs `tools` on its own, to avoid `sdkmanager` errors. I don't know why it can't find `tools` sometimes, but this seems to help. * I think the whitespace here is tripping Travis up. It finds `tools` just fine when I copy/paste this file in... * Travis allows the local E2E Android tests to fail. * Add a separate `E2E` stage.
Let's not use these guys. Their examples are over two years old and their documentation is all kinds of contradictory and confusing – just look at all my notes inline.
Looks like the below _should_ work, but it doesn't, and their API doesn't return anything useful. I'll link their support to this issue and maybe they can point us in the right direction I'm already not feeling them.
```json
{
"user": "randy.tarampi@smunch.co",
"password": <REDACTED>,
"platformName": "Android",
"automationName": "UIAutomator2",
"platformVersion": "9",
"app": "PRIVATE:apktest.apk",
"automationInfrastructure": "UIAutomator2",
"appPackage": "com.apktest",
"appActivity": ".MainActivity"
}
```
I don't know why they want this specifically, but let's give it to them.
Since it looks like this is our new pick for a webdriver.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Lots of tiny changes, and a couple notes about failures with Travis and Perfecto.
Running headless Android on cloud CI infrastructure is definitely not the way to go you just can't run them.
The biggest change is is the addition of a Travis CI pipeline in 796a557, and the usage of
jest-circusin 5ff010e.Meat
openssl aes-256-cbc -K $encrypted_78b6aab41b54_key -iv $encrypted_78b6aab41b54_iv -in android/app/my-release-key.keystore.enc -out android/app/my-release-key.keystore -dline with your own by adding your own keystore and following these instructionsANDROID_EMULATOR_API_VERSION,ANDROID_EMULATOR_ABI, andANDROID_EMULATOR_PLATFORM_VERSION. You can give it a shot by running a custom build (or replacing.travis.yml) with the following configuration:Sides
npm run e2estarts & stops an android emulatornpm run emulator:android:createshould be more generalDRIVER_INITIALIZATION_TIMEOUTthat sleeps the tests for some time (to allow the emulator to start the app)IOS_DEVICE_NAMEorIOS_PLATFORM_VERSION.Dessert
jest'stestRunnertojest-circus/runner.