Rock solid UI Test Droidcon Berlin 2021

Oct. 25, 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
Rock solid UI Test Droidcon Berlin 2021
1 of 68

More Related Content

What's hot

Solita HUB: Product information in the heart of customer experience - Per-Ola...Solita HUB: Product information in the heart of customer experience - Per-Ola...
Solita HUB: Product information in the heart of customer experience - Per-Ola...Solita Oy
Preliminary Task EvaluationPreliminary Task Evaluation
Preliminary Task EvaluationLordMaxi8
Improve remediation success and reduce portfolio risk using a Lean approachImprove remediation success and reduce portfolio risk using a Lean approach
Improve remediation success and reduce portfolio risk using a Lean approachHaley & Aldrich
Build a Strong Career Foundation by following Milad Yousif Hardworking wayBuild a Strong Career Foundation by following Milad Yousif Hardworking way
Build a Strong Career Foundation by following Milad Yousif Hardworking wayMilad Yousif
Guidelines for designing effective english language teaching materialsGuidelines for designing effective english language teaching materials
Guidelines for designing effective english language teaching materialsTania Beltran Garcia
Audience magnetisation 101Audience magnetisation 101
Audience magnetisation 101Tyron Love

Recently uploaded

Tha Statistics of future: Less Math and more Visual Statistical ThinkingTha Statistics of future: Less Math and more Visual Statistical Thinking
Tha Statistics of future: Less Math and more Visual Statistical ThinkingLourdes Pozueta Fernández
GDSC PU Cloud Study Jam Intro. Session 23-24.pdfGDSC PU Cloud Study Jam Intro. Session 23-24.pdf
GDSC PU Cloud Study Jam Intro. Session 23-24.pdfPOORNIMA UNIVERSITY
North American YAT-28 Turbo Trojan.pdfNorth American YAT-28 Turbo Trojan.pdf
North American YAT-28 Turbo Trojan.pdfTahirSadikovi
Unit 4 Food packaging materials and testing.pptxUnit 4 Food packaging materials and testing.pptx
Unit 4 Food packaging materials and testing.pptxDr P DINESHKUMAR
Airbus A319 Aircraft Airport & Maintenance Planning Manual.pdfAirbus A319 Aircraft Airport & Maintenance Planning Manual.pdf
Airbus A319 Aircraft Airport & Maintenance Planning Manual.pdfTahirSadikovi
INDIAN KNOWLEDGE SYSTEM PPT chp-1.pptxINDIAN KNOWLEDGE SYSTEM PPT chp-1.pptx
INDIAN KNOWLEDGE SYSTEM PPT chp-1.pptxRuchiSharma494176

Recently uploaded(20)

Rock solid UI Test Droidcon Berlin 2021

Editor's Notes

  1. Every one is frustrated byy flaky tests
  2. Who stop using android test because off flakiness
  3. 800 tests run on every commit under 20m PR wont merge without succesful AndroidTest 18 Different features has their Android test in their module We dont depend on UI test. Only most important features are tests end to end Almost all main usacases covered
  4. 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.
  5. 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 Time-consuming, tedious, and error-prone
  6. The automated approach allows you to run your tests quickly and reliably in a repeatable manner. androidTest folder Creates apk to run on device
  7. UI interaction End to End flow of feature Device resources
  8. Pure java kotlin classes can be tested on jvm They are faster We should aim to have business logics in class we can test
  9. In reality we wont be able to test everything on jvm User interface Device resource usage End to end verification from user persfective
  10. Who stop using android test because off flakiness
  11. There is no out of box solution Device control. We want to focus on WHAT to test Delegate device control as much as possible Threading issues Framework issues
  12. APIs to write AndroidTests. Dont uses your classes Use app from user persfective
  13. Espresso focuses on how to find and how check views Espresso is aware of multiple things
  14. Espresso is low APIs focus on HOW to test
  15. As developer we want to focus on WHAT to test Espresso is API around actions and espresso is has HOW to find views or HOW to check conditions
  16. 10 minutes
  17. How we can reduce learning curve Kakao is a library around Espresso APIs.
  18. The goal of the Kakao is to provide better readability and discoverability for Espresso testing. Kakao doesn’t aim to change the behaviour of Espresso. By default, Kakao enforces the same mentality of robot pattern. Kakao expects a Screen class. And in Screen class, you can define common UI elements or actions using Kotlin DSL. 
  19. Kakao has solutions for common UI element Easy to discover Type safety about actions and check Easy to read tests But this is not about stability
  20. Lets talk about most common usecases 1st animation
  21. Because Espresso isn't aware of any other asynchronous operations, including those running on a background thread, Espresso can't provide its synchronization guarantees in those situations. In order to make Espresso aware of your app's long-running operations, you must register each one as an idling resource.
  22. For all other background operations, test authors should register the custom resource via IdlingRegistry and Espresso will wait for the resource to become idle prior to executing a view operation. It would be great if we can have one idling resource for threading solution we have. And actually we have some
  23. 20 minutes
  24. For all other background operations, test authors should register the custom resource via IdlingRegistry and Espresso will wait for the resource to become idle prior to executing a view operation.
  25. For all other background operations, test authors should register the custom resource via IdlingRegistry and Espresso will wait for the resource to become idle prior to executing a view operation.
  26. There is not a clean solution We can use similar provider solution as ExecutorProvider It is not possible to prevent libraries to use Default dispatcher SetDefault vs setMain With rx all of background operations covered It feels like we are not goiing forward but keep craeting new problems
  27. If you remember the usecases for espresso maybe we can find a different solution. Robost solution
  28. If you remember the usecases for espresso maybe we can find a different solution. Robost solution
  29. If we cannot control concurency framework, we can track background operations directly
  30. For all other background operations, test authors should register the custom resource via IdlingRegistry and Espresso will wait for the resource to become idle prior to executing a view operation. Create an interceptor and register idling resources with the information you have. In interceptor you can track current network operations.
  31. After the network operation, you set the data to live data. Everything will be good, right? No
  32. We set a countiing executor for arch component. DataBinding will use value of livedata and there wont be a flakiness, right? No
  33. There is no easy way to keep track of when data binding applies changes to screen. There is only hasPendingIntent information Simple solution is not using databindiing But if yyou have databindiing, yyou need to regiister and idliing resource and check all the views. All theeee views
  34. Network, livedata and databinding wont be a problem. We can use ListAdapter and submit a new list and everything will allright? You probably already understand the theme of this flow. No
  35. We started a data flow network layer until data reaches to screen, we needed 4 solution. We will definitely need moree solutions That is why it is nice to have a single place to share solutions 30 minutes
  36. There are different options to run UI tests.  You can create your own test farm in the company with real devices.  You can use Github actions and run an emulator on Github action.  You can use other build frameworks like Jenkins and set up your own emulator on CI.  All of those options will need maintenance and they will be bound to your investment of money and time. 
  37. Run on google infrastructure All of the devices on Firebase Test Lab have special adjustments We prefer to use virtual devices as there is generally no queue for them They are also active in Firebase slack. You can ask questions or report issues. And from my own experience, they help individual cases.
  38. One cool feature of Firebase test lab is sharding Split tests into buckets and run them on different devices to parallelize execution Cost will be same Duration will depend on how small the test buckets are
  39. Creating test matrices that should finish under desired time is a difficult problem. Luckily we don’t do that setup by hand.
  40. We need gradle integration for Flank And Fladle is gradle wrapper
  41. We have pipeline Cover more usecases at scout Good improvements coming to android testing
  42. Espresso is great library. I always feel that espresso is just starting point like any other coffees. They provided base element so we can add milk or water and use it