Slide 1

Slide 1 text

Maestro 10 | 2023 © TRADE REPUBLIC BANK 2023 1

Slide 2

Slide 2 text

Topic Zhanibek Marshal Senior Engineer at Trade Republic © TRADE REPUBLIC BANK 2023 | Paparazzi: Snapshot testing made easy Hello again 👋 ● Twitter: @megasuperhero ● Mastodon: @[email protected] ● TR engineering blog: https://engineering.traderepublic.com/ 2

Slide 3

Slide 3 text

© TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 01. How we ended up to Maestro? Brief overview of the investigation objectives. 02. Integration of Maestro Explanation of the steps taken to integrate Maestro into Android project and iOS 03. Writing Test Case Flows Overview of the approach to writing test case flows using Maestro 04. Maestro Studio An overview of Maestro Studio, the integrated development environment (IDE) for creating Maestro test cases. 05. Maestro Cloud Introduction to Maestro Cloud, a platform for test execution and collaboration. 06. Learnings All views mine, no one else’s. 07. Q&A 3

Slide 4

Slide 4 text

How we ended up to Maestro? Brief overview of the investigation objectives. © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 4

Slide 5

Slide 5 text

Our regression testing* started to take a lot of time on each release train *manual That's why we proposed Maestro as one of the options. “ © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 5

Slide 6

Slide 6 text

Topic We have over 100 test cases to verify before we deploy a new version © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 6

Slide 7

Slide 7 text

Then I heard* that Maestro is very simple and effective solution for writing UI tests *from colleagues and at Droidcon Berlin 23 “ © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 7

Slide 8

Slide 8 text

© TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 8

Slide 9

Slide 9 text

Integration of Maestro Explanation of the steps taken to integrate Maestro into Android project © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 9

Slide 10

Slide 10 text

Topic Run the following command to install Maestro on Mac OS, Linux or Windows (WSL) Install Maestro © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 10

Slide 11

Slide 11 text

Topic Will automatically detect and use any local emulator or physical* device. *USB connection has an issue[829] Run Maestro test © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 11

Slide 12

Slide 12 text

Topic Had to find a solution to resolve an One Time Password(OTP) on test environment Automatic OTP retriever © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 12

Slide 13

Slide 13 text

Topic Before running Flows on iOS Simulator*, install Facebook IDB tool *At the moment, Maestro does not support real iOS devices 🍎 iOS © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 13

Slide 14

Slide 14 text

Writing Test Case Flows Overview of the approach to writing test case flows using Maestro © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 14

Slide 15

Slide 15 text

Topic ● launchApp ● tapOn - tap on anything that visible on screen ● inputText ● runFlow - run commands from another file ● takeScreenshot - saves a screenshot in a PNG file ● assertVisible Common commands © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 15

Slide 16

Slide 16 text

© TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework Started from Login flow 16

Slide 17

Slide 17 text

© TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework appId: specify the application id to launch the application 17

Slide 18

Slide 18 text

© TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework appId: specify the application id to launchApp 18

Slide 19

Slide 19 text

© TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework tapOn: anything on a view 19

Slide 20

Slide 20 text

© TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework inputText: regardless of whether any text field is currently focused or not 20

Slide 21

Slide 21 text

© TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework env: 1. Supply env variable to test: $maestro test -e ... 2. Consume: —> 21

Slide 22

Slide 22 text

© TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework tapOn: id of the view* *not preferred option to consider a11y 22

Slide 23

Slide 23 text

© TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework assertVisible: same parameters as tapOn 23

Slide 24

Slide 24 text

© TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework runFlow: to avoid duplication of code and thereby modularize your Flow files 24

Slide 25

Slide 25 text

© TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework Then tried to check our new product Bond instrument “ 25

Slide 26

Slide 26 text

Topic Now you can write a test cases © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 26

Slide 27

Slide 27 text

Topic © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 27

Slide 28

Slide 28 text

Maestro Studio An overview of Maestro Studio, the integrated development environment (IDE) for creating Maestro test cases. © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 28

Slide 29

Slide 29 text

Topic Run $maestro studio on command line © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 29

Slide 30

Slide 30 text

© TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 30

Slide 31

Slide 31 text

Maestro Cloud Introduction to Maestro Cloud, a platform for test execution and collaboration. © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 31

Slide 32

Slide 32 text

Has Github Actions integration *need to grant an access to pull requests “ © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 32

Slide 33

Slide 33 text

Topic Running Github Action workflow © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 33

Slide 34

Slide 34 text

Cloud console Free $10.00 credit for each month to experiment the usage. “ © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 34

Slide 35

Slide 35 text

Cloud console Free $10.00 credit for each month to experiment the usage. “ © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 35

Slide 36

Slide 36 text

Topic © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 36

Slide 37

Slide 37 text

Topic Monthly Cost = (# of Uploads per Month) x (# of Flows) x ($0.10 USD) Monthly Cost = (2 + 30) x 100 x ($0.10 USD) Monthly Cost = $320 Pricing model © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 37

Slide 38

Slide 38 text

Learnings *All views mine, no one else’s © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 38

Slide 39

Slide 39 text

© TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 1: If we don’t rely on id and instead access by text Then we can run regression testing on both Android and iOS 39

Slide 40

Slide 40 text

© TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 2: If we don’t rely on id and instead access by text Then we can find many issues with a11y and improve them 40

Slide 41

Slide 41 text

Topic 41 © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework

Slide 42

Slide 42 text

© TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 3: It’s really easy to write a regression test No extra setup required on a platform and everybody without knowledge of the platform can write them. 42

Slide 43

Slide 43 text

Q&A What do you think about it? © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework 43

Slide 44

Slide 44 text

Topic ● Maestro documentation: https://maestro.mobile.dev/ ● Maestro Cloud: https://cloud.mobile.dev/ ● Pricing calculator: https://console.mobile.dev/pricing-calculator Related links 44 © TRADE REPUBLIC BANK 2023 |Maestro - UI testing framework

Slide 45

Slide 45 text

Topic Zhanibek Marshal Senior Engineer at Trade Republic © TRADE REPUBLIC BANK 2023 | Paparazzi: Snapshot testing made easy Hello again 👋 ● Twitter: @megasuperhero ● Mastodon: @[email protected] ● TR engineering blog: https://engineering.traderepublic.com/ 45

Slide 46

Slide 46 text

THANK © TRADE REPUBLIC BANK 2023 46