SlideShare a Scribd company logo
Effective Detox Testing
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Overview
1. What kinds of things to test with Detox
2. Faking the API layer
3. How much of your app to test with Detox
4. Detox on CI
5. Local Detox development workflow
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Prerequisites
— Experience with React Native
— Experience with Detox
— Experience with different types of tests: unit,
component, end-to-end
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Josh Justice
CodingItWrong.com
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
ReactNativeTesting.io
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
https://rnte.st/london23
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
1. What kinds of things to
test with Detox
…vs. what kinds of things to test
with other tools
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Kinds of Testing
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
"Testing is all about
confidence."
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Realism != Confidence
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Realism like…
— Get a push notification
— OS alert prompts you to apply an OS update
— Network connection drops
— Virtual keyboard appears/disappears when you don't
expect
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
A less-realistic, stable test
gives you more confidence than
a realistic, flaky test.
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
A less-realistic test you run
all the time
gives you more confidence than
a realistic test you don't run
because it's slow.
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Testing Goals
— Realism
— Speed
— Reliability
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Manual Testing
— Animation smoothness
— User experience
— Integration with third-party
services
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
End-to-End Testing
— Integration of first-party and
third-party JS and native code
— Can the user do what they
want to do?
— Can the app make money?
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Component Testing
— Fully cover logical branches in
UI code
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Unit Testing
— Fully cover logical branches in
non-UI code
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
The more realistic the test,
the more effort it is to write
and maintain it.
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Test Pyramid
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Test Pyramid
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Questions?
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
2. Faking the API Layer
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Connecting to the real backend:
Upsides?
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Connecting to the real backend:
Downsides?
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
App Layers
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Options for Mocking Web Service Requests
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Local web server?
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Options for Mocking Web Service Requests
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Fake Module
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
What's a fake?
A version of the service that acts similar to the real thing
but stores its data in-memory
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
To the code!
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
API file setup
api.js
api.mock.js
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
api.js
import axios from 'axios';
const api = axios.create({
baseURL: 'https://api.reactnativetesting.io',
// other config
});
export default api;
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
api.mock.js
const api = {
get() {
return Promise.resolve({
data: [
{id: 1, name: 'Widget 1'},
{id: 2, name: 'Widget 2'},
]
});
},
// ...
};
export default api;
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Configure metro.config.js
— When flag is set, prefer .mock.js extension when
present
— Exact code may differ if you've modified
metro.config.js for other reasons
— E.g. using react-native-svg-transformer
— See reactnativetesting.io/e2e/external-services
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
package.json
"start": "react-native start",
+"start:mock": "MOCK_API=true npm run start",
"test": "jest"
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
For Windows support
"start": "react-native start",
+"start:mock": "cross-env MOCK_API=true npm run start",
"test": "jest"
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Questions?
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
3. How Much to Test with
Detox
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
To the code!
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Types of Detox Test (not rigid categories)
— Boot test
— Play-around test
— The most important moneymaking feature, happy
path flow
— Secondary feature happy paths
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Factors
— Flake
— Test speed
— Ease of writing
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Types of Detox Test (not rigid categories)
— Boot test
— Play-around test
— The most important moneymaking feature, happy
path flow
— Secondary feature happy paths
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Questions?
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
4. Detox on CI
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
CI for native mobile apps is
hard
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
1. Variations between CI
Platforms
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
2. Dependent on details of
specific versions
On GitHub Actions, Detox works for me on macos-12
and times out on macos-13
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
3. Slow
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
4. Expensive if you pay by the
hour
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
5. If you have a suite that passes
on developer machines, it's hard
to get it all passing on CI at once
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
My GitHub Actions Detox
CI Setup
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
To the YAML!
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
name: Detox
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
jobs:
test:
runs-on: macos-12
steps:
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
- name: Cache Pods dependencies
uses: actions/cache@v3
with:
path: ios/Pods
key: ${{ runner.OS }}-pods-cache-${{ hashFiles('**/ios/Podfile.lock') }}
restore-keys: |
${{ runner.OS }}-pods-cache-
- name: Install npm dependencies
run: yarn install --frozen-lockfile
- name: Install iOS dependencies
run: npx pod-install
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
- name: Install Detox CLI
run: |
brew tap wix/brew
brew install applesimutils
npm install -g detox-cli
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
- name: Build App for Detox
run: detox build -c ios.sim.release
- uses: futureware-tech/simulator-action@v2
with:
model: "iPhone 14"
- name: Run Detox
run: detox test -c ios.sim.release
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Recommendation
— Pick your potential CI platform
— Try to get a boot test passing on CI
— If it doesn't work, try another platform
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
5. Local Detox development
workflow
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
3 Stages
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Stage 1: Test Existing
Features
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Stage 2: Test Features As
You Add
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Stage 3: Test-Driven
Development
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Getting Better All
the Time: How to
Escape Bad Code
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
To the code!
learntdd.in/react-native
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Why TDD?
— Thorough test coverage.
— Code that is easy to test.
— Minimal code.
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
3 Stages
1. Test some existing features
2. Test new features as you add them
3. Test-driven development
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Questions?
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
What We Covered
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
1. What kinds of things to test with Detox
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
1. What kinds of things to test with Detox
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
2. Faking the API layer
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
3. How much to test with Detox
— Boot test
— Play-around test
— The most important moneymaking feature, happy
path flow
— Secondary feature happy paths
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
4. Detox on CI
GitHub Actions example config
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
5. Stages of Detox development
1. Test some existing features
2. Test new features as you add them
3. Test-driven development
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
What We Covered
1. What kinds of things to test with Detox
2. Faking the API layer
3. How much of your app to test with Detox
4. Detox on CI
5. Local Detox development workflow
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Thanks!
Questions?
Josh Justice
josh.justice@testdouble.com
https://rnte.st/london23
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
Thanks!
Josh Justice
josh.justice@testdouble.com
https://rnte.st/london23
Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23

More Related Content

Similar to Effective Detox Testing - React Advanced 2023 (20)

PDF
Testing React Native Apps - Chain React 2023
Josh Justice
 
PDF
Guide to End-to-End Detox Testing Headspin
flufftailshop
 
PPTX
QA Fest 2018. Adam Stasiak. React Native is Coming – the story of hybrid mobi...
QAFest
 
PDF
Intro to React Native Testing Library
Josh Justice
 
PDF
React Native in 2025 - Detox or Appium.pdf
kalichargn70th171
 
PDF
[QE 2018] Adam Stasiak – Nadchodzi React Native – czyli o testowaniu mobilnyc...
Future Processing
 
PPTX
Continuous workflow for a large react native app - mobile at wix
Shalom Yerushalmy
 
PDF
Vladyslav Romanchenko "How to keep high code quality without e2e tests"
Dakiry
 
PDF
5 Popular Test Automation Tools For React Native Apps.pdf
flufftailshop
 
PDF
How Can the Hermes Engine Help React Native Apps.docx.pdf
Techugo
 
PDF
The Many Ways to Test Your React App
All Things Open
 
PDF
Why Use React Js A Complete Guide (1).pdf
Katy Slemon
 
PPTX
Reactjs
Mallikarjuna G D
 
PDF
Introduzione a React Native - Facebook Developer Circle Rome
Matteo Manchi
 
PDF
Workshop 23: ReactJS, React & Redux testing
Visual Engineering
 
PDF
TDD: Develop, Refactor and Release With Confidence
Mehdi Valikhani
 
PDF
How Can the Hermes Engine Help React Native Apps.
Techugo
 
PDF
Designing Effective Tests with React Testing Library - React Summit 2023
Josh Justice
 
PDF
Hands-on React Native: From Zero to Hero
All Things Open
 
PDF
Hands on React Native: From Zero to Hero
Dmitry Vinnik
 
Testing React Native Apps - Chain React 2023
Josh Justice
 
Guide to End-to-End Detox Testing Headspin
flufftailshop
 
QA Fest 2018. Adam Stasiak. React Native is Coming – the story of hybrid mobi...
QAFest
 
Intro to React Native Testing Library
Josh Justice
 
React Native in 2025 - Detox or Appium.pdf
kalichargn70th171
 
[QE 2018] Adam Stasiak – Nadchodzi React Native – czyli o testowaniu mobilnyc...
Future Processing
 
Continuous workflow for a large react native app - mobile at wix
Shalom Yerushalmy
 
Vladyslav Romanchenko "How to keep high code quality without e2e tests"
Dakiry
 
5 Popular Test Automation Tools For React Native Apps.pdf
flufftailshop
 
How Can the Hermes Engine Help React Native Apps.docx.pdf
Techugo
 
The Many Ways to Test Your React App
All Things Open
 
Why Use React Js A Complete Guide (1).pdf
Katy Slemon
 
Introduzione a React Native - Facebook Developer Circle Rome
Matteo Manchi
 
Workshop 23: ReactJS, React & Redux testing
Visual Engineering
 
TDD: Develop, Refactor and Release With Confidence
Mehdi Valikhani
 
How Can the Hermes Engine Help React Native Apps.
Techugo
 
Designing Effective Tests with React Testing Library - React Summit 2023
Josh Justice
 
Hands-on React Native: From Zero to Hero
All Things Open
 
Hands on React Native: From Zero to Hero
Dmitry Vinnik
 

More from Josh Justice (13)

PDF
Designing Effective Tests with React Testing Library - React Day Berlin 2022
Josh Justice
 
PDF
Building for Mobile and Web with Expo - React Day Berlin 2022
Josh Justice
 
PDF
Building for Mobile and Web with Expo - React Advanced London 2022
Josh Justice
 
PDF
Getting Better All the Time: How to Escape Bad Code
Josh Justice
 
PDF
Sustainable Learning - ReactATL Jan 2022
Josh Justice
 
PDF
Building an App for Mobile and Web with Expo
Josh Justice
 
PPTX
User-Modifiable Software: Smalltalk and HyperCard
Josh Justice
 
PDF
Practical Accessibility (A11y)
Josh Justice
 
PDF
Old Solutions to New Testing Problems
Josh Justice
 
PDF
Test-Driven Development in Vue with Cypress
Josh Justice
 
PDF
Test-Driven Development in React with Cypress
Josh Justice
 
PDF
Newbie's Guide to Contributing to Babel
Josh Justice
 
PPTX
Outside-in Testing in Vue with Cypress
Josh Justice
 
Designing Effective Tests with React Testing Library - React Day Berlin 2022
Josh Justice
 
Building for Mobile and Web with Expo - React Day Berlin 2022
Josh Justice
 
Building for Mobile and Web with Expo - React Advanced London 2022
Josh Justice
 
Getting Better All the Time: How to Escape Bad Code
Josh Justice
 
Sustainable Learning - ReactATL Jan 2022
Josh Justice
 
Building an App for Mobile and Web with Expo
Josh Justice
 
User-Modifiable Software: Smalltalk and HyperCard
Josh Justice
 
Practical Accessibility (A11y)
Josh Justice
 
Old Solutions to New Testing Problems
Josh Justice
 
Test-Driven Development in Vue with Cypress
Josh Justice
 
Test-Driven Development in React with Cypress
Josh Justice
 
Newbie's Guide to Contributing to Babel
Josh Justice
 
Outside-in Testing in Vue with Cypress
Josh Justice
 
Ad

Recently uploaded (20)

PDF
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
PDF
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PPTX
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
PPTX
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
PPTX
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
PDF
Executive Business Intelligence Dashboards
vandeslie24
 
PPTX
Feb 2021 Cohesity first pitch presentation.pptx
enginsayin1
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PPTX
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PDF
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
 
PDF
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
DOCX
Import Data Form Excel to Tally Services
Tally xperts
 
PPTX
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PDF
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
Executive Business Intelligence Dashboards
vandeslie24
 
Feb 2021 Cohesity first pitch presentation.pptx
enginsayin1
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
 
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
Import Data Form Excel to Tally Services
Tally xperts
 
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
Ad

Effective Detox Testing - React Advanced 2023

  • 1. Effective Detox Testing Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 2. Overview 1. What kinds of things to test with Detox 2. Faking the API layer 3. How much of your app to test with Detox 4. Detox on CI 5. Local Detox development workflow Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 3. Prerequisites — Experience with React Native — Experience with Detox — Experience with different types of tests: unit, component, end-to-end Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 4. Josh Justice CodingItWrong.com Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 5. ReactNativeTesting.io Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 6. Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 7. https://rnte.st/london23 Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 8. 1. What kinds of things to test with Detox …vs. what kinds of things to test with other tools Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 9. Kinds of Testing Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 10. Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 11. Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 12. Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 13. Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 14. Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 15. Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 16. "Testing is all about confidence." Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 17. Realism != Confidence Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 18. Realism like… — Get a push notification — OS alert prompts you to apply an OS update — Network connection drops — Virtual keyboard appears/disappears when you don't expect Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 19. A less-realistic, stable test gives you more confidence than a realistic, flaky test. Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 20. A less-realistic test you run all the time gives you more confidence than a realistic test you don't run because it's slow. Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 21. Testing Goals — Realism — Speed — Reliability Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 22. Manual Testing — Animation smoothness — User experience — Integration with third-party services Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 23. End-to-End Testing — Integration of first-party and third-party JS and native code — Can the user do what they want to do? — Can the app make money? Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 24. Component Testing — Fully cover logical branches in UI code Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 25. Unit Testing — Fully cover logical branches in non-UI code Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 26. The more realistic the test, the more effort it is to write and maintain it. Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 27. Test Pyramid Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 28. Test Pyramid Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 29. Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 30. Questions? Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 31. 2. Faking the API Layer Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 32. Connecting to the real backend: Upsides? Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 33. Connecting to the real backend: Downsides? Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 34. App Layers Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 35. Options for Mocking Web Service Requests Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 36. Local web server? Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 37. Options for Mocking Web Service Requests Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 38. Fake Module Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 39. What's a fake? A version of the service that acts similar to the real thing but stores its data in-memory Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 40. To the code! Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 41. API file setup api.js api.mock.js Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 42. api.js import axios from 'axios'; const api = axios.create({ baseURL: 'https://api.reactnativetesting.io', // other config }); export default api; Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 43. api.mock.js const api = { get() { return Promise.resolve({ data: [ {id: 1, name: 'Widget 1'}, {id: 2, name: 'Widget 2'}, ] }); }, // ... }; export default api; Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 44. Configure metro.config.js — When flag is set, prefer .mock.js extension when present — Exact code may differ if you've modified metro.config.js for other reasons — E.g. using react-native-svg-transformer — See reactnativetesting.io/e2e/external-services Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 45. package.json "start": "react-native start", +"start:mock": "MOCK_API=true npm run start", "test": "jest" Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 46. For Windows support "start": "react-native start", +"start:mock": "cross-env MOCK_API=true npm run start", "test": "jest" Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 47. Questions? Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 48. 3. How Much to Test with Detox Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 49. To the code! Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 50. Types of Detox Test (not rigid categories) — Boot test — Play-around test — The most important moneymaking feature, happy path flow — Secondary feature happy paths Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 51. Factors — Flake — Test speed — Ease of writing Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 52. Types of Detox Test (not rigid categories) — Boot test — Play-around test — The most important moneymaking feature, happy path flow — Secondary feature happy paths Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 53. Questions? Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 54. 4. Detox on CI Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 55. CI for native mobile apps is hard Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 56. 1. Variations between CI Platforms Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 57. 2. Dependent on details of specific versions On GitHub Actions, Detox works for me on macos-12 and times out on macos-13 Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 58. 3. Slow Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 59. 4. Expensive if you pay by the hour Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 60. 5. If you have a suite that passes on developer machines, it's hard to get it all passing on CI at once Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 61. My GitHub Actions Detox CI Setup Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 62. To the YAML! Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 63. name: Detox on: push: branches: - main pull_request: types: [opened, synchronize, reopened] Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 64. jobs: test: runs-on: macos-12 steps: Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 65. - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: node-version: 18 cache: "yarn" Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 66. - name: Cache Pods dependencies uses: actions/cache@v3 with: path: ios/Pods key: ${{ runner.OS }}-pods-cache-${{ hashFiles('**/ios/Podfile.lock') }} restore-keys: | ${{ runner.OS }}-pods-cache- - name: Install npm dependencies run: yarn install --frozen-lockfile - name: Install iOS dependencies run: npx pod-install Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 67. - name: Install Detox CLI run: | brew tap wix/brew brew install applesimutils npm install -g detox-cli Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 68. - name: Build App for Detox run: detox build -c ios.sim.release - uses: futureware-tech/simulator-action@v2 with: model: "iPhone 14" - name: Run Detox run: detox test -c ios.sim.release Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 69. Recommendation — Pick your potential CI platform — Try to get a boot test passing on CI — If it doesn't work, try another platform Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 70. 5. Local Detox development workflow Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 71. 3 Stages Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 72. Stage 1: Test Existing Features Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 73. Stage 2: Test Features As You Add Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 74. Stage 3: Test-Driven Development Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 75. Getting Better All the Time: How to Escape Bad Code Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 76. To the code! learntdd.in/react-native Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 77. Why TDD? — Thorough test coverage. — Code that is easy to test. — Minimal code. Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 78. 3 Stages 1. Test some existing features 2. Test new features as you add them 3. Test-driven development Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 79. Questions? Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 80. What We Covered Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 81. 1. What kinds of things to test with Detox Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 82. 1. What kinds of things to test with Detox Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 83. 2. Faking the API layer Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 84. 3. How much to test with Detox — Boot test — Play-around test — The most important moneymaking feature, happy path flow — Secondary feature happy paths Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 85. 4. Detox on CI GitHub Actions example config Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 86. 5. Stages of Detox development 1. Test some existing features 2. Test new features as you add them 3. Test-driven development Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 87. What We Covered 1. What kinds of things to test with Detox 2. Faking the API layer 3. How much of your app to test with Detox 4. Detox on CI 5. Local Detox development workflow Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 88. Thanks! Questions? Josh Justice [email protected] https://rnte.st/london23 Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23
  • 89. Thanks! Josh Justice [email protected] https://rnte.st/london23 Effective Detox Testing - Josh Justice - React Advanced - 2023-10-25 - https://rnte.st/london23