20170529 clem kazuaki_matsuo
date post
23-Jan-2018Category
Software
view
447download
1
Embed Size (px)
Transcript of 20170529 clem kazuaki_matsuo
Tips for stable UI Testing#5.2 Creators Learning English Meetup for Mobile
by @Kazu_cocoa
Kazuaki Matsuo( @Kazu_cocoa)
: Cookpad Inc.
Test Engineer / Software Engineer in Quality
Lang: / / /
Maintainer: Appium Ruby binding
Have you heard the word,
flaky tests?
Do you know of
flaky tests?
A definition
We define a "flaky" test result as a test
that exhibits both a passing and
a failing result with the same code.
by John Micro
http://www.cs.umd.edu/~atif/pubs/gao-icse15.pdfhttps://testing.googleblog.com/2016/05/flaky-tests-at-google-and-how-we.html
http://www.cs.umd.edu/~atif/pubs/gao-icse15.pdfhttps://testing.googleblog.com/2016/05/flaky-tests-at-google-and-how-we.html
User Interface Testing
User Interface Testing
User interface (UI) testing lets you ensure that your app meets its functional requirements and achieves a high standard of quality such that it is more likely to be successfully adopted by users.
https://developer.android.com/training/testing/ui-testing/index.html
https://developer.android.com/training/testing/ui-testing/index.html
User Interface Testing
One approach to UI testing is to simply have a human tester perform a set of user operations on the target app and verify that it is behaving correctly.
https://developer.android.com/training/testing/ui-testing/index.html
https://developer.android.com/training/testing/ui-testing/index.html
User Interface TestingA more efficient approach is to write your UI tests such that user actions are performed in an automated way. The automated approach allows you to run your tests quickly and reliably in a repeatable manner.
https://developer.android.com/training/testing/ui-testing/index.html
https://developer.android.com/training/testing/ui-testing/index.html
Automated UI tests have many flakinesses
Flakinesses in UI Tests
animations
network
and other environments
Flakinesses in UI Tests
animations
network
and other environments
How to reduce the flakiness
https://developer.android.com/training/testing/ui-testing/espresso-testing.html
https://developer.android.com/training/testing/ui-testing/espresso-testing.html
Only by manual
Cant we automate it,
can we?
Yes, we can.
Automation at Cookpad
http://techlife.cookpad.com/entry/2016/08/13/test-size-for-mobile
adb commands
$ add shell settings put global window_animation_scale 0
$ add shell settings put global transition_animation_scale 0
$ add shell settings put global animator_duration_scale 0
https://github.com/KazuCocoa/droid_adbs
https://github.com/KazuCocoa/droid_adbs
Via API
https://github.com/KazuCocoa/DroidTestHelper
https://github.com/KazuCocoa/DroidTestHelper
For iOS Engineers
We can implement similar tips for the iOS platform
With EarlGrey
Step into enableFastAnimation
https://github.com/google/EarlGreyhttps://developer.apple.com/reference/quartzcore/camediatiming/1427647-speed
https://github.com/google/EarlGreyhttps://developer.apple.com/reference/quartzcore/camediatiming/1427647-speed
Have a good CLEM time