-
Notifications
You must be signed in to change notification settings - Fork 395
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
Use Travis Android support #641
Conversation
db6ccfe
to
257494e
Compare
Imho we should pull this in. And maybe improve the plugin to only kick off instrumentaiton |
Also this migrates from using robotium to espresso so we might have to update some docs. Do we still need a robotium example? Maybe not. Wdyt @simpligility/android-maven-plugins-core-committers |
Well, the build fails lots of times because of the problem i described. I asked about it on adt-dev for help.
No, this migrates from plain instrumentation tests to Espresso.
I do not understand. |
Also, do not pull this as is, it clearly needs a rebasing (i think), as i wrote in the OP. |
Sure.. you can rebase and fix it up. But in general I like the content ..definitely an improvement and it fixes issue #495 |
Thanks for the feedback. I agree the content is good. :) But this unlock screen thing really annoys me. |
Maybe we can ensure via some sort of api call that it is unlocked before we start the tests. I vaguely remember we had something like that in the past. |
I found this method. However, this seems to be deprecated. Also in comments it is said that the current method is more reliable... Finally, this would add noise to the sample app. But we can try it anyway. |
The unlock device thing seems horrible with code and manifest requirements. Surely there is some better way.. maybe a config on how to start up the emulator or something. |
The script that Manfred was talking about was always an unreliable pain It sounds like you are trying to find something to unlock the lockscreen Alternatively, if we start up an emulator, configure it to never go to On Fri, Jun 26, 2015, 12:39 AM Csaba Kozák [email protected] wrote:
|
That would mean saving the snapshot image into the repository, not something i would prefer. Or how much data it means?
We still use that script (modified version), unfortunately there is no better solution. But that script is okay, at least it works reliably.
I think i wake lock is not enough, you have to disable the lock screen also. I already linked this method, hinted by the official Android doc, but it is deprecated and horrible. |
Can we maybe create a emulator image that has no lock screen functionality at all? |
@mosabua i Googled for this for an hour (literally) and i did not found any remedy. |
It seems ridiculous .. is nobody using emulators in CI usage? Any hints on how to get around the lock screen for CI usage running integration tests @JakeWharton @orrc @kingargyle @ducrohet |
@mosabua maybe i am a noob, but this is very annoying indeed. |
Use adb to send keyevent 82. See: On Fri, Jun 26, 2015, 10:27 AM Csaba Kozák [email protected] wrote:
|
Can also have test runner unlock and wake up the device: On Fri, Jun 26, 2015, 10:38 AM Jake Wharton [email protected] wrote:
|
@JakeWharton Thanks! We already use that, and it turned out sometimes that command does not unlock the emulator. At least the screenshots says that. |
I try the second approach ASAP. |
Thanks @JakeWharton ... @WonderCsabo maybe it is working and the screenshots are just a timing issue. Maybe if we get it to pass consistently, even without screenshots, that would be good. |
@mosabua the screenshots are fine i think. Actually our tests are failing, because Espresso is complaining about the unfocused window. The window is unfocused because the lock screen is on top and not our Activity. |
This is the failure we get beause of the locked screen. |
I saw others had the same problem a year ago on another project and https://github.com/finn-no/android_emulator_hacks Malachi de Ælfweald On Fri, Jun 26, 2015 at 10:46 AM, Csaba Kozák [email protected]
|
bfd8457
to
26c68cf
Compare
39c5936
to
57f1e77
Compare
@mosabua it seems it fixed our problem, thanks to @JakeWharton. However, we had to add two permissions to the app manifest. I remember you did not like that. Are you okay with it? If not do you have an idea to not add this to the app manifest directly? |
Lets just add it and get this merged. For production usage I would not like that but you could always modify the manifest in a profile or whatever. Lets not worry about this though. |
@mosabua let me clean up the commit history, then you can merge it. |
Sounds good. Alternatively I can merge it manually and squash it. Or you can create a new branch off it that does that and a new pull request ;-) If you want me to squash it just let me know the details for the commit summary... |
I am rebasing this branch. |
e351bab
to
ab56ae1
Compare
Sounds good. |
Ping me when you are happy and want me to merge. Dont forget the changelog entry ;-) |
Done, i hope you the change grouping is okay. Let's wait for the CI. |
c881e21
to
a73600b
Compare
a73600b
to
be297ba
Compare
@mosabua i think this is finished. |
You rock @WonderCsabo ;-) |
Check it out @simpligility/android-maven-plugins-core-committers |
And now master builds and we are green ;-) |
Sweet. Great job Csaba. On Fri, Jun 26, 2015, 4:14 PM Manfred Moser [email protected]
|
This is a WIP. I did not squash the commits, so you can see exactly what steps I did while experimenting.
This PR:
Unfortunately the Morseflash test fails sometimes, because the emulator is not unlocked despite it is instructed to. To debug this I print the build log and save the screenshots to a repo. Any help is appreciated to fix this last problem.