Share
Embed
Transcript
129 slides
-
Definition Story📕 • Develop more features • More features =
More Money • More subdivisions created, coming soon with more features -
Definition Story📕 • Develop more features • More features =
More Money • More subdivisions created, coming soon with more features -
Definition Story📕 • Workload increases • Develop more features •
More features = More Money • More subdivisions created, coming soon with more features -
Definition Story📕 • Workload increases • Feature complexity increases ⏫
• Develop more features • More features = More Money • More subdivisions created, coming soon with more features -
Definition Story📕 • Workload increases • Feature complexity increases •
Reports from users: ⏫ • Develop more features • More features = More Money • More subdivisions created, coming soon with more features -
Definition Story📕 • Workload increases • Feature complexity increases •
Reports from users: ⏫ • I am not able to login • Develop more features • More features = More Money • More subdivisions created, coming soon with more features -
Definition Story📕 • Workload increases • Feature complexity increases •
Reports from users: ⏫ • I am not able to login • Develop more features • More features = More Money • More subdivisions created, coming soon with more features • I am not able to click on the Add to Cart button -
Definition Story📕 • Workload increases • Feature complexity increases •
Reports from users: ⏫ • I am not able to login • Develop more features • More features = More Money • More subdivisions created, coming soon with more features • I am not able to click on the Add to Cart button • My app crashes when I go on Payments screen -
Definition Story📕 • Workload increases • Feature complexity increases •
Reports from users: ⏫ • I am not able to login • Develop more features • More features = More Money • More subdivisions created, coming soon with more features • I am not able to click on the Add to Cart button • My app crashes when I go on Payments screen • Still Increasing -
Definition Story📕 • Workload increases • Feature complexity increases •
Reports from users: ⏫ • I am not able to login • Develop more features • More features = More Money • More subdivisions created, coming soon with more features • I am not able to click on the Add to Cart button • My app crashes when I go on Payments screen • Still Increasing • Realization: -
Definition Story📕 • Workload increases • Feature complexity increases •
Reports from users: ⏫ • I am not able to login • Develop more features • More features = More Money • More subdivisions created, coming soon with more features • I am not able to click on the Add to Cart button • My app crashes when I go on Payments screen • Still Increasing • Realization: We need to test before we ship -
Definition Story📕 • Workload increases • Feature complexity increases •
Reports from users: ⏫ • I am not able to login • Develop more features • More features = More Money • More subdivisions created, coming soon with more features • I am not able to click on the Add to Cart button • My app crashes when I go on Payments screen • Still Increasing • Realization: We need to test before we ship -
Definition Story📕 • Workload increases • Feature complexity increases •
Reports from users: ⏫ • I am not able to login • Develop more features • More features = More Money • More subdivisions created, coming soon with more features • I am not able to click on the Add to Cart button • My app crashes when I go on Payments screen • Still Increasing • Realization: We need to test before we ship • Hire QA engineers -
Definition Story📕 • Workload increases • Feature complexity increases •
Reports from users: ⏫ • I am not able to login • Develop more features • More features = More Money • More subdivisions created, coming soon with more features • I am not able to click on the Add to Cart button • My app crashes when I go on Payments screen • Still Increasing • Realization: We need to test before we ship • Hire QA engineers • Start writing unit tests for the features -
Definition Story📕 • Workload increases • Feature complexity increases •
Reports from users: ⏫ • I am not able to login • Develop more features • More features = More Money • More subdivisions created, coming soon with more features • I am not able to click on the Add to Cart button • My app crashes when I go on Payments screen • Still Increasing • Realization: We need to test before we ship • Hire QA engineers • Start writing unit tests for the features -
Definition Story📕 • Started testing manually before releasing • Reports
reduced and app got stabilised -
Definition Story📕 • Started testing manually before releasing • Reports
reduced and app got stabilised -
Definition Story📕 • Started testing manually before releasing • Reports
reduced and app got stabilised More Features -
Definition Story📕 Automation More Features • Started testing manually before
releasing • Reports reduced and app got stabilised -
Definition Story📕 Automation More Features • Started testing manually before
releasing • Reports reduced and app got stabilised • Onboarding cost to automation tools -
Definition Story📕 Automation More Features • Started testing manually before
releasing • Reports reduced and app got stabilised • Onboarding cost to automation tools • Setting up automation tools is painful -
Definition Story📕 Automation More Features • Started testing manually before
releasing • Reports reduced and app got stabilised • Onboarding cost to automation tools • Automation tools are “non-declarative” • Setting up automation tools is painful -
Definition Story📕 Automation More Features • Started testing manually before
releasing • Reports reduced and app got stabilised • Onboarding cost to automation tools • Automation tools are “non-declarative” • Setting up automation tools is painful • Time to get first flow automation working -
Definition Story📕 Automation More Features • Started testing manually before
releasing • Reports reduced and app got stabilised • Time to get first flow automation working • Infrastructure to run tests • Onboarding cost to automation tools • Automation tools are “non-declarative” • Setting up automation tools is painful -
Definition Story📕 Automation More Features • Started testing manually before
releasing • Reports reduced and app got stabilised • Time to get first flow automation working • Infrastructure to run tests • CI integration • Onboarding cost to automation tools • Automation tools are “non-declarative” • Setting up automation tools is painful -
Definition Story📕 Automation More Features • Started testing manually before
releasing • Reports reduced and app got stabilised • Time to get first flow automation working • Infrastructure to run tests • Different API level devices • CI integration • Onboarding cost to automation tools • Automation tools are “non-declarative” • Setting up automation tools is painful -
Definition Story📕 Automation More Features • Started testing manually before
releasing • Reports reduced and app got stabilised • Time to get first flow automation working • Infrastructure to run tests • Different API level devices • Managing traffic of builds • CI integration • Onboarding cost to automation tools • Automation tools are “non-declarative” • Setting up automation tools is painful -
Definition Story📕 Automation More Features • Started testing manually before
releasing • Reports reduced and app got stabilised • Time to get first flow automation working • Infrastructure to run tests • Different API level devices • Managing traffic of builds • Different OEMs devices • CI integration • Onboarding cost to automation tools • Automation tools are “non-declarative” • Setting up automation tools is painful -
Definition Story📕 Automation More Features • Started testing manually before
releasing • Reports reduced and app got stabilised • Time to get first flow automation working • Infrastructure to run tests • Different API level devices • Managing traffic of builds • Different OEMs devices • More • CI integration • Onboarding cost to automation tools • Automation tools are “non-declarative” • Setting up automation tools is painful -
Definition Story📕 Automation More Features • Started testing manually before
releasing • Reports reduced and app got stabilised • Time to get first flow automation working • Infrastructure to run tests • Different API level devices • Managing traffic of builds • Different OEMs devices • More • CI integration • Onboarding cost to automation tools • Automation tools are “non-declarative” • Setting up automation tools is painful -
Definition Story📕 User Reports • Patterns in user reports •
Gap between QAs and Developers -
Definition Story📕 User Reports Functional Bugs • Patterns in user
reports • Gap between QAs and Developers -
Definition Story📕 User Reports Functional Bugs • App is launching
slowly • Patterns in user reports • Gap between QAs and Developers -
Definition Story📕 User Reports Functional Bugs • App is launching
slowly • Battery draining • Patterns in user reports • Gap between QAs and Developers -
Definition Story📕 User Reports Functional Bugs • App is launching
slowly • Battery draining • Activity starts slowly • Patterns in user reports • Gap between QAs and Developers -
Definition Story📕 User Reports Functional Bugs • App is launching
slowly • Battery draining • Activity starts slowly Non Functional Bugs • Patterns in user reports • Gap between QAs and Developers -
Definition Story📕 User Reports Functional Bugs • App is launching
slowly • Battery draining • Activity starts slowly Non Functional Bugs • Appium support for solving Non Functional Bugs ☹ • Patterns in user reports • Gap between QAs and Developers -
• Setup should be very easy Ideal setup for UI
testing at scale -
• Setup should be very easy • Starting and writing
first flow should be easy Ideal setup for UI testing at scale -
• Setup should be very easy • Starting and writing
first flow should be easy • Integration with CI should be very easy Ideal setup for UI testing at scale -
• Setup should be very easy • Starting and writing
first flow should be easy • Integration with CI should be very easy • Managing infrastructure should be easy Ideal setup for UI testing at scale -
• Helpful for dealing with functional and non-functional issues •
Setup should be very easy • Starting and writing first flow should be easy • Integration with CI should be very easy • Managing infrastructure should be easy Ideal setup for UI testing at scale -
or curl -Ls "https://get.maestro.mobile.dev" | bash Setup should be Easy
brew tap mobile-dev-inc/tap brew install maestro -
or curl -Ls "https://get.maestro.mobile.dev" | bash Setup should be Easy
brew tap mobile-dev-inc/tap brew install maestro -
Starting and writing first flow • Declarative, in YAML format
✅ • Hot reload or continues mode ✅ -
Starting and writing first flow • Declarative, in YAML format
✅ • Hot reload or continues mode ✅ • Lets open twitter app and follow account -
Starting and writing first flow appId: com.twitter.android --- - launchApp
maestro test -c ./follow.yaml -
Starting and writing first flow appId: com.twitter.android --- - launchApp
maestro test -c ./follow.yaml -
Starting and writing first flow appId: com.twitter.android --- - launchApp
maestro test -c ./follow.yaml - tapOn: Search and Explore -
Starting and writing first flow appId: com.twitter.android --- - launchApp
maestro test -c ./follow.yaml - tapOn: Search and Explore - tapOn: Search Twitter - inputText: "@mobile__dev" - tapOn: mobile.dev - tapOn: Follow - assertVisible: Following -
More commands • Index • Width, height • Relative positioning
• Tap on commands -
More commands • Index • Width, height • Relative positioning
• Tap on commands • id of view -
More commands • Index • Width, height • Relative positioning
• Tap on commands • id of view • More -
More commands • Tap on commands • Long press -
longPress: “text” or - longPress: id: “@id_some_view_id” -
More commands • Tap on commands • Long press •
Swiping - swipe: direction: RIGHT duration: 300 - swipe: start: x1, y1 end: x2, y2 duration: 400 -
More commands • Tap on commands • Long press •
Swiping • Erase Text - eraseText -
More commands • Tap on commands • Long press •
Swiping • Erase Text • Much more: https://maestro.mobile.dev/reference -
Sit back! • No need of idling resource • No
need pepper test case with Thread.sleep -
Sit back! • No need of idling resource • No
need pepper test case with Thread.sleep appId: com.squareup name: Sign Up --- - launchApp - tapOn: Create account - tapOn: text: Accept all cookies optional: true - inputText: ${EMAIL} - tapOn: Continue - inputText: ${PASSWORD} - tapOn: Continue - tapOn: rightOf: I agree to.* retryTapIfNoChange: false - tapOn: Continue - tapOn: Confirm -
Sit back! • No need of idling resource • No
need pepper test case with Thread.sleep • Not much jargon involved, making maestro tests sharable source -
Sit back! • No need of idling resource • No
need pepper test case with Thread.sleep • Decouples with codebase, blazing fast iterations • Not much jargon involved, making maestro tests sharable source -
Sit back! • No need of idling resource • No
need pepper test case with Thread.sleep • Decouples with codebase, blazing fast iterations • Not much jargon involved, making maestro tests sharable source • And, cross platform ! -
Dealing with Functional Bugs • Maestro test command outputs •
Locally • JUnit type format output available <?xml version='1.0' encoding='UTF-8'?> <testsuites> <testsuite name="Test Suite" device="emulator-5554" tests="1" failures="1"> <testcase id="follow" name="follow"> <failure>Element not found: Text matching regex: Follow</failure> </testcase> </testsuite> </testsuites> -
Dealing with Non-Functional Bugs • Frame drops 😖 • Identify
core flows of app which have high user traffic -
Dealing with Non-Functional Bugs • Frame drops 😖 • Identify
core flows of app which have high user traffic • Following twitter page flow -
Dealing with Non-Functional Bugs • Frame drops 😖 • Identify
core flows of app which have high user traffic • Following twitter page flow • Write Maestro Flow -
Dealing with Non-Functional Bugs • Frame drops 😖 • Identify
core flows of app which have high user traffic • Following twitter page flow • Write Maestro Flow • Run: adb shell dumpsys gfxinfo com.twitter.android framestats -
Dealing with Non-Functional Bugs • Frame drops 😖 • Identify
core flows of app which have high user traffic • Following twitter page flow • Write Maestro Flow • Run: adb shell dumpsys gfxinfo com.twitter.android framestats • Collect output and capture important metrics -
Dealing with Non-Functional Bugs • Frame drops 😖 • Identify
core flows of app which have high user traffic • Following twitter page flow • Write Maestro Flow • Run: adb shell dumpsys gfxinfo com.twitter.android framestats • Collect output and capture important metrics • Repeat -
Dealing with Non-Functional Bugs • Root Causing Window: com.twitter.android/com.twitter.app.main.MainActivity Stats
since: 100942401883393ns Total frames rendered: 387 Janky frames: 110 (28.42%) 50th percentile: 9ms 90th percentile: 22ms 95th percentile: 34ms 99th percentile: 450ms -
Dealing with Non-Functional Bugs • Root Causing Window: com.twitter.android/com.twitter.app.main.MainActivity Stats
since: 100942401883393ns Total frames rendered: 387 Janky frames: 110 (28.42%) 50th percentile: 9ms 90th percentile: 22ms 95th percentile: 34ms 99th percentile: 450ms -
Dealing with Non-Functional Bugs • Root Causing • Monitor janky
frame percentage -
Dealing with Non-Functional Bugs • Root Causing • Monitor janky
frame percentage • Generate flame graphs to narrow down on heavy operations -
Dealing with Non-Functional Bugs • Root Causing • Monitor janky
frame percentage • Generate flame graphs to narrow down on heavy operations Debug API -
Dealing with Non-Functional Bugs • Root Causing • Monitor janky
frame percentage • Generate flame graphs to narrow down on heavy operations Debug API Debug.startMethodTracingSampling( context.cacheDir, maxBufferSize, samplingIntervalUs ) -
Dealing with Non-Functional Bugs • Root Causing • Monitor janky
frame percentage • Generate flame graphs to narrow down on heavy operations Debug API Debug.startMethodTracingSampling( context.cacheDir, maxBufferSize, samplingIntervalUs ) Debug.stopMethodTracing() …… …… …… -
Dealing with Non-Functional Bugs • Root Causing • Monitor janky
frame percentage • Generate flame graphs to narrow down on heavy operations -
Dealing with Non-Functional Bugs • Root Causing • Monitor janky
frame percentage • Generate flame graphs to narrow down on heavy operations • Capture Strict mode violations -
Integrate with CI maestro cloud <app-file> ./maestro —apiKey <api-key> Test
directory <root> | |___.maestro/ | | | |____ Login.yaml | | | |____ Add to Cart.yaml | -
Integrate with CI maestro cloud <app-file> ./maestro —apiKey <api-key> •
Integrate with PRs ✅ -
Integrate with CI • Device management and scaling maestro cloud
<app-file> ./maestro —apiKey <api-key> • Integrate with PRs ✅ ✅ -
Integrate with CI maestro cloud <app-file> ./maestro —apiKey <api-key> •
Natively integrating with your CI: Github, Gitlab, Bitbucket, etc. • Integrate with PRs ✅ ✅ • Device management and scaling ✅ -
Integrate with CI maestro cloud <app-file> ./maestro —apiKey <api-key> •
Natively integrating with your CI: Github, Gitlab, Bitbucket, etc. • Integrate with PRs ✅ ✅ • Device management and scaling ✅ • Trigger on PR stage ✅ -
Integrate with CI maestro cloud <app-file> ./maestro —apiKey <api-key> •
Natively integrating with your CI: Github, Gitlab, Bitbucket, etc. • Integrate with PRs ✅ ✅ • Device management and scaling ✅ • Trigger on PR stage ✅ • Different API level devices ✅ -
Ideal setup of UI testing • Helpful for dealing with
functional and non-functional issues • Setup should be very easy • Starting and writing first flow should be easy • Integration with CI should be very easy • Managing infrastructure should be easy ✅ ✅ ✅ ✅ ✅ -
Community Support is Great • Performance tool to get FPS,
CPU usage for search and explore interaction by Bamlab: https://twitter.com/almouro/status/1595402239044198400 -
Community Support is Great • Performance tool to get FPS,
CPU usage for search and explore interaction by Craig Atkinson: https://www.atkinsondev.com/post/android-maestro-mock-rest-api/ • Mock API servers for Maestro Android testing using MockServer and Gradle -
Community Support is Great • Performance tool to get FPS,
CPU usage for search and explore interaction by Craig Atkinson: https://www.atkinsondev.com/post/android-maestro-testing/ • Mock API servers for Maestro Android testing using MockServer and Gradle • High level UI testing with Maestro -
Community Support is Great by Manish Verma: https://twitter.com/mobile__dev/status/1580952966474846209 • Facebook
registration flow automation • Performance tool to get FPS, CPU usage for search and explore interaction • Mock API servers for Maestro Android testing using MockServer and Gradle • High level UI testing with Maestro -
Community Support is Great by Manish Verma: https://twitter.com/mobile__dev/status/1580952966474846209 • Facebook
registration flow automation • Performance tool to get FPS, CPU usage for search and explore interaction • Mock API servers for Maestro Android testing using MockServer and Gradle • High level UI testing with Maestro • Much more: Join Maestro slack community !!