2. Software Engineer in Test
Case Study (Mobile Automation)
SWET (past)
Core Member
Vishal Banthia @vbanthia @vbanthia_
3. Some Previous Talks, Blogs & Tutorials
• Android E2E Testing at Mercari @ Android Test Night
• Reliable Mobile Test Automation @SRE-SET Automation Night
• Android Device Farm at Mercari
• Appium Docker Demo
• STF Appium Example
4. • About React Native
• Automating React Native UITests using Appium
• Current problems with React Native tests
• Next plan
Agenda
5. マスター タイトルの書式設定
• マスター テキストの書式設定
In June, we had a major update in mercari US app.
mercari US app
Native Native Native React-Native
6. マスター タイトルの書式設定
• マスター テキストの書式設定
• Because its NATIVE not hybrid
• Cross Platform. Works for both android and iOS
• Reusable UI components
• Faster development with Live-Reload feature
• Can deploy anytime like backend. No Apple pain!
• Many more ...
Why React-Native
17. マスター タイトルの書式設定
• マスター テキストの書式設定
In case of android react-native testId property does not
add either resource-id or content-desc. They add this
value into a different view property called `tags`.
Unfortunately, there is no way to find an element using
tags through UIAutomator driver.
Also, currently there is no way to add `resource-id` in
react-native. All efforts (PR) have been rejected because
they conflict with facebook internal test framework.
Long Battle: https://github.com/facebook/react-native/pull/9942
21. マスター タイトルの書式設定
• マスター テキストの書式設定
After this test automation was possible
using Appium similar to Native App
22. マスター タイトルの書式設定
• マスター テキストの書式設定
Current Problems
• Adding testID does not work as expected sometime
because we need to make all above parents also
accessible
• Adding testID and accessibilityLabel does not have same
effect on iOS and android respectively. So, need to confirm
on both platform after addition
• With accessibilityLabel approach, application will not be
friendly for Visually Impaired people
23. マスター タイトルの書式設定
• マスター テキストの書式設定• ReactNative tests are more flaky compare to Native Test
Current Problems
24. マスター タイトルの書式設定
• マスター テキストの書式設定• UI Rendering approach and lifecycle is different in
ReactNative compare to Native app
• Approaches or Practices being used for Native app tests
sometime fails because of this reason
Why tests are more flaky?
27. マスター タイトルの書式設定
• マスター テキストの書式設定 Tests run in same process
Can access memory
Cannot ship binary which is used for
testing
Black Box Gray Box
Test Script does not know about what
is happening inside Test Target App
Can use only API provided by OS
It is more like testing similar to what
an end user can do
Can ship same binary which went
under testing
31. マスター タイトルの書式設定
• マスター テキストの書式設定
Conclusion
Till now, I was also in favour of Black box testing but
now I also think Gray Box approach is better and
more reliable