SlideShare une entreprise Scribd logo
1  sur  82
Télécharger pour lire hors ligne
REACT Native is coming
The story of hybrid mobile application testing
Agenda
Agenda
1. Introduction
2. Cross-platform frameworks for mobile development
3. UI testing approaches for hybrid apps
4. Detox guide for applying UI tests in React Native projects
Agenda
1. Introduction
2. Cross-platform frameworks for mobile development
3. UI testing approaches for hybrid apps
4. Detox guide for applying UI tests in React Native projects
Agenda
1. Introduction
2. Cross-platform frameworks for mobile development
3. UI testing approaches for hybrid apps
4. Detox guide for applying UI tests in React Native projects
Agenda
1. Introduction
2. Cross-platform frameworks for mobile development
3. UI testing approaches for hybrid apps
4. Detox guide for applying UI tests in React Native projects
Long Story Short
SOme Time Ago...
Customers
And Their
money
meantime in Software Houses
But Now
Customers
And Their
money
Oh no !
O Nie !
Para Pollo !
Zonk !
Meanwhile in Software Houses
Cross Platform frameworks
How to Automate this as before ???
The Native white Box Test
The Native white Box Test
+ Fast
+ Easy setup
+ Wide range of open source
helpers
+ Compatible with Cloud Device
Farms
The Native white Box Test
+ Fast
+ Easy setup
+ Wide range of open source
helpers
+ Compatible with Cloud Device
Farms
− Different languages in project
repository
− Duplicated test code
The Cross Platform Black Box Test
The Cross Platform Black Box Test
+ Many supported languages
+ Wide community
+ Similar to Selenium
+ Single test code base
+ Compatible with Cloud Device
Farms
The Cross Platform Black Box Test
+ Many supported languages
+ Wide community
+ Similar to Selenium
+ Single test code base
+ Compatible with Cloud Device
Farms
− Slow
− Difficult debugging
− Lack of stability
The Cross Platform White Box Test
The Cross Platform White Box Test
+ Fast
+ Easy setup
+ Single test code base
+ The same language as default
project one
+ Close integration with source
code
+ API designed for a specific
platform
The Cross Platform White Box Test
+ Fast
+ Easy setup
+ Single test code base
+ The same language as default
project one
+ Close integration with source
code
+ API designed for a specific
platform
− No way / difficult to integrate
with Cloud Device Farm
− No outspread community
− Often still not developed
enough
Based on experience
with React Native
Automation Guide with Detox - cross platform React Native
Framework
How to add Detox to an existing project - Package.json file
How to add Detox to an existing project - Package.json file
"detox": {
How to add Detox to an existing project - Package.json file
"detox": {
"configurations": {
How to add Detox to an existing project - Package.json file
"detox": {
"configurations": {
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/PolideaSample.app",
"build": "xcodebuild -project ios/PolideaSample.xcodeproj -scheme PolideaSample -configuration Debug -sdk
iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"name": "iPhone X"
},
"android.emu.debug": {
"binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk",
"build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..",
"type": "android.emulator",
"name": "Nexus_5X_API_24"
}
}
}
}
How to add Detox to an existing project - Package.json file
"detox": {
"configurations": {
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/PolideaSample.app",
"build": "xcodebuild -project ios/PolideaSample.xcodeproj -scheme PolideaSample -configuration Debug -sdk
iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"name": "iPhone X"
},
"android.emu.debug": {
"binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk",
"build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..",
"type": "android.emulator",
"name": "Nexus_5X_API_24"
}
}
}
}
How to add Detox to an existing project - Package.json file
"detox": {
"configurations": {
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/PolideaSample.app",
"build": "xcodebuild -project ios/PolideaSample.xcodeproj -scheme PolideaSample -configuration Debug -sdk
iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"name": "iPhone X"
},
"android.emu.debug": {
"binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk",
"build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..",
"type": "android.emulator",
"name": "Nexus_5X_API_24"
}
}
}
}
How to add Detox to an existing project - Package.json file
"detox": {
"configurations": {
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/PolideaSample.app",
"build": "xcodebuild -project ios/PolideaSample.xcodeproj -scheme PolideaSample -configuration Debug -sdk
iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"name": "iPhone X"
},
"android.emu.debug": {
"binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk",
"build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..",
"type": "android.emulator",
"name": "Nexus_5X_API_24"
}
}
}
}
How to add Detox to an existing project - Package.json file
"detox": {
"configurations": {
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/PolideaSample.app",
"build": "xcodebuild -project ios/PolideaSample.xcodeproj -scheme PolideaSample -configuration Debug -sdk
iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"name": "iPhone X"
},
"android.emu.debug": {
"binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk",
"build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..",
"type": "android.emulator",
"name": "Nexus_5X_API_24"
}
}
}
}
How to make apps testable?
<Text
style={styles.textStyle}>
{!this.state.clicked? defaultButtonText: "Polidea"}
</Text>
<Text
accessible= {true}
testID= {"ButtonText"}
accessibilityLabel= {"ButtonTextDesc"}
style={styles.textStyle}>
{!this.state.clicked? defaultButtonText: "Polidea"}
</Text>
How to make apps testable?
<Text
accessible= {true}
testID= {"ButtonText"}
accessibilityLabel= {"ButtonTextDesc"}
style={styles.textStyle}>
{!this.state.clicked? defaultButtonText: "Polidea"}
</Text>
How to write Test scripts - API Overview
Detox Object
Test plan
configuration
Device Object
Key events, Gestures,
Device settings
Matchers, Actions, Expectations
Finding Views, User’s actions, Validation
API
How to write Test scripts - Init script by example
How to write Test scripts - Init script by example
require('babel-polyfill');
How to write Test scripts - Init script by example
require('babel-polyfill');
const detox = require('detox');
How to write Test scripts - Init script by example
require('babel-polyfill');
const detox = require('detox');
const config = require('../package.json').detox;
before(async () => {
How to write Test scripts - Init script by example
require('babel-polyfill');
const detox = require('detox');
const config = require('../package.json').detox;
before(async () => {
await detox.init(config);
How to write Test scripts - Init script by example
require('babel-polyfill');
const detox = require('detox');
const config = require('../package.json').detox;
before(async () => {
await detox.init(config);
});
after(async () => {
How to write Test scripts - Init script by example
require('babel-polyfill');
const detox = require('detox');
const config = require('../package.json').detox;
before(async () => {
await detox.init(config);
});
after(async () => {
await detox.cleanup();
});
How to write Test scripts - Test class by example
How to write Test scripts - Test class by example
describe('Example', () => {
How to write Test scripts - Test class by example
describe('Example', () => {
beforeEach(async () => {
How to write Test scripts - Test class by example
describe('Example', () => {
beforeEach(async () => {
await
How to write Test scripts - Test class by example
describe('Example', () => {
beforeEach(async () => {
await device
How to write Test scripts - Test class by example
describe('Example', () => {
beforeEach(async () => {
await device.reloadReactNative();
How to write Test scripts - Test class by example
describe('Example', () => {
beforeEach(async () => {
await device.reloadReactNative();
await waitFor
How to write Test scripts - Test class by example
describe('Example', () => {
beforeEach(async () => {
await device.reloadReactNative();
await waitFor(element
How to write Test scripts - Test class by example
describe('Example', () => {
beforeEach(async () => {
await device.reloadReactNative();
await waitFor(element(by.id('ButtonText')))
How to write Test scripts - Test class by example
describe('Example', () => {
beforeEach(async () => {
await device.reloadReactNative();
await waitFor(element(by.id('ButtonText'))).toBeVisible()
How to write Test scripts - Test class by example
describe('Example', () => {
beforeEach(async () => {
await device.reloadReactNative();
await waitFor(element(by.id('ButtonText'))).toBeVisible().withTimeout(10000);
});
How to write Test scripts - Test class by example
describe('Example', () => {
beforeEach(async () => {
await device.reloadReactNative();
await waitFor(element(by.id('ButtonText'))).toBeVisible().withTimeout(10000);
});
it
How to write Test scripts - Test class by example
describe('Example', () => {
beforeEach(async () => {
await device.reloadReactNative();
await waitFor(element(by.id('ButtonText'))).toBeVisible().withTimeout(10000);
});
it ('should Press me text be morphed in Polidea title after click on button',async ()
=>{
How to write Test scripts - Test class by example
describe('Example', () => {
beforeEach(async () => {
await device.reloadReactNative();
await waitFor(element(by.id('ButtonText'))).toBeVisible().withTimeout(10000);
});
it ('should Press me text be morphed in Polidea title after click on button',async ()
=>{
await element(by.id('ButtonText'))
How to write Test scripts - Test class by example
describe('Example', () => {
beforeEach(async () => {
await device.reloadReactNative();
await waitFor(element(by.id('ButtonText'))).toBeVisible().withTimeout(10000);
});
it ('should Press me text be morphed in Polidea title after click on button',async ()
=>{
await element(by.id('ButtonText')).tap();
How to write Test scripts - Test class by example
describe('Example', () => {
beforeEach(async () => {
await device.reloadReactNative();
await waitFor(element(by.id('ButtonText'))).toBeVisible().withTimeout(10000);
});
it ('should Press me text be morphed in Polidea title after click on button',async ()
=>{
await element(by.id('ButtonText')).tap();
await waitFor(element(by.text("Press Me")))
How to write Test scripts - Test class by example
describe('Example', () => {
beforeEach(async () => {
await device.reloadReactNative();
await waitFor(element(by.id('ButtonText'))).toBeVisible().withTimeout(10000);
});
it ('should Press me text be morphed in Polidea title after click on button',async ()
=>{
await element(by.id('ButtonText')).tap();
await waitFor(element(by.text("Press Me"))).toNotExist()
How to write Test scripts - Test class by example
describe('Example', () => {
beforeEach(async () => {
await device.reloadReactNative();
await waitFor(element(by.id('ButtonText'))).toBeVisible().withTimeout(10000);
});
it ('should Press me text be morphed in Polidea title after click on button',async ()
=>{
await element(by.id('ButtonText')).tap();
await waitFor(element(by.text("Press Me"))).toNotExist().withTimeout(2000);
How to write Test scripts - Test class by example
describe('Example', () => {
beforeEach(async () => {
await device.reloadReactNative();
await waitFor(element(by.id('ButtonText'))).toBeVisible().withTimeout(10000);
});
it ('should Press me text be morphed in Polidea title after click on button',async ()
=>{
await element(by.id('ButtonText')).tap();
await waitFor(element(by.text("Press Me"))).toNotExist().withTimeout(2000);
await waitFor(element(by.text("Polidea"))).toBeVisible().withTimeout(100);
});
})
How to integrate With CI - Gitlab CI
How to integrate With CI - Gitlab CI
detox_test:iOS: detox_test:android:
How to integrate With CI - Gitlab CI
detox_test:iOS:
stage: test
before_script:
detox_test:android:
stage: test
before_script:
How to integrate With CI - Gitlab CI
detox_test:iOS:
stage: test
before_script:
detox_test:android:
stage: test
before_script:
- adb connect pixel:5555; sh ./scripts/waitForDevice.sh
pixel
How to integrate With CI - Gitlab CI
detox_test:iOS:
stage: test
before_script:
- brew tap wix/brew
- brew install --HEAD applesimutils
- npm install -g detox-cli
- npm install -g react-native-cli
- npm install
detox_test:android:
stage: test
before_script:
- adb connect pixel:5555; sh ./scripts/waitForDevice.sh
pixel
- mkdir -p ./detox_node/
- npm install --prefix ./detox_node/ -g detox-cli
- npm install --prefix ./detox_node/ -g react-native-cli
- npm install
How to integrate With CI - Gitlab CI
detox_test:iOS:
stage: test
before_script:
- brew tap wix/brew
- brew install --HEAD applesimutils
- npm install -g detox-cli
- npm install -g react-native-cli
- npm install
script:
detox_test:android:
stage: test
before_script:
- adb connect pixel:5555; sh ./scripts/waitForDevice.sh
pixel
- mkdir -p ./detox_node/
- npm install --prefix ./detox_node/ -g detox-cli
- npm install --prefix ./detox_node/ -g react-native-cli
- npm install
script:
How to integrate With CI - Gitlab CI
detox_test:iOS:
stage: test
before_script:
- brew tap wix/brew
- brew install --HEAD applesimutils
- npm install -g detox-cli
- npm install -g react-native-cli
- npm install
script:
- react-native start --port 2137 &
detox_test:android:
stage: test
before_script:
- adb connect pixel:5555; sh ./scripts/waitForDevice.sh
pixel
- mkdir -p ./detox_node/
- npm install --prefix ./detox_node/ -g detox-cli
- npm install --prefix ./detox_node/ -g react-native-cli
- npm install
script:
- ./detox_node/bin/react-native start --port 2137 &
How to integrate With CI - Gitlab CI
detox_test:iOS:
stage: test
before_script:
- brew tap wix/brew
- brew install --HEAD applesimutils
- npm install -g detox-cli
- npm install -g react-native-cli
- npm install
script:
- react-native start --port 2137 &
- detox build -c ios.sim.debug
detox_test:android:
stage: test
before_script:
- adb connect pixel:5555; sh ./scripts/waitForDevice.sh
pixel
- mkdir -p ./detox_node/
- npm install --prefix ./detox_node/ -g detox-cli
- npm install --prefix ./detox_node/ -g react-native-cli
- npm install
script:
- ./detox_node/bin/react-native start --port 2137 &
- ./detox_node/bin/detox build -c android.emu.debug
How to integrate With CI - Gitlab CI
detox_test:iOS:
stage: test
before_script:
- brew tap wix/brew
- brew install --HEAD applesimutils
- npm install -g detox-cli
- npm install -g react-native-cli
- npm install
script:
- react-native start --port 2137 &
- detox build -c ios.sim.debug
- detox test -c ios.sim.debug
detox_test:android:
stage: test
before_script:
- adb connect pixel:5555; sh ./scripts/waitForDevice.sh
pixel
- mkdir -p ./detox_node/
- npm install --prefix ./detox_node/ -g detox-cli
- npm install --prefix ./detox_node/ -g react-native-cli
- npm install
script:
- ./detox_node/bin/react-native start --port 2137 &
- ./detox_node/bin/detox build -c android.emu.debug
- ./detox_node/bin/detox test -c android.emu.debug
How to integrate With CI - Gitlab CI
detox_test:iOS:
stage: test
before_script:
- brew tap wix/brew
- brew install --HEAD applesimutils
- npm install -g detox-cli
- npm install -g react-native-cli
- npm install
script:
- react-native start --port 2137 &
- detox build -c ios.sim.debug
- detox test -c ios.sim.debug
- kill -9 $(lsof -n -i4TCP:2137)
detox_test:android:
stage: test
before_script:
- adb connect pixel:5555; sh ./scripts/waitForDevice.sh
pixel
- mkdir -p ./detox_node/
- npm install --prefix ./detox_node/ -g detox-cli
- npm install --prefix ./detox_node/ -g react-native-cli
- npm install
script:
- ./detox_node/bin/react-native start --port 2137 &
- ./detox_node/bin/detox build -c android.emu.debug
- ./detox_node/bin/detox test -c android.emu.debug
- kill -9 $(lsof -n -i4TCP:2137)
How to integrate With CI - Gitlab CI
detox_test:iOS:
stage: test
before_script:
- brew tap wix/brew
- brew install --HEAD applesimutils
- npm install -g detox-cli
- npm install -g react-native-cli
- npm install
script:
- react-native start --port 2137 &
- detox build -c ios.sim.debug
- detox test -c ios.sim.debug
- kill -9 $(lsof -n -i4TCP:2137)
tags:
detox_test:android:
stage: test
before_script:
- adb connect pixel:5555; sh ./scripts/waitForDevice.sh
pixel
- mkdir -p ./detox_node/
- npm install --prefix ./detox_node/ -g detox-cli
- npm install --prefix ./detox_node/ -g react-native-cli
- npm install
script:
- ./detox_node/bin/react-native start --port 2137 &
- ./detox_node/bin/detox build -c android.emu.debug
- ./detox_node/bin/detox test -c android.emu.debug
- kill -9 $(lsof -n -i4TCP:2137)
tags:
How to integrate With CI - Gitlab CI
detox_test:iOS:
stage: test
before_script:
- brew tap wix/brew
- brew install --HEAD applesimutils
- npm install -g detox-cli
- npm install -g react-native-cli
- npm install
script:
- react-native start --port 2137 &
- detox build -c ios.sim.debug
- detox test -c ios.sim.debug
- kill -9 $(lsof -n -i4TCP:2137)
tags:
- xcode-9.2
detox_test:android:
stage: test
before_script:
- adb connect pixel:5555; sh ./scripts/waitForDevice.sh
pixel
- mkdir -p ./detox_node/
- npm install --prefix ./detox_node/ -g detox-cli
- npm install --prefix ./detox_node/ -g react-native-cli
- npm install
script:
- ./detox_node/bin/react-native start --port 2137 &
- ./detox_node/bin/detox build -c android.emu.debug
- ./detox_node/bin/detox test -c android.emu.debug
- kill -9 $(lsof -n -i4TCP:2137)
tags:
- android-emu
How to integrate With CI - Gitlab CI
detox_test:iOS:
stage: test
before_script:
- brew tap wix/brew
- brew install --HEAD applesimutils
- npm install -g detox-cli
- npm install -g react-native-cli
- npm install
script:
- react-native start --port 2137 &
- detox build -c ios.sim.debug
- detox test -c ios.sim.debug
- kill -9 $(lsof -n -i4TCP:2137)
tags:
- xcode-9.2
detox_test:android:
stage: test
before_script:
- adb connect pixel:5555; sh ./scripts/waitForDevice.sh
pixel
- mkdir -p ./detox_node/
- npm install --prefix ./detox_node/ -g detox-cli
- npm install --prefix ./detox_node/ -g react-native-cli
- npm install
script:
- ./detox_node/bin/react-native start --port 2137 &
- ./detox_node/bin/detox build -c android.emu.debug
- ./detox_node/bin/detox test -c android.emu.debug
- kill -9 $(lsof -n -i4TCP:2137)
tags:
- android-emu
services:
- name: android-emulator:latest
How to integrate With CI - Gitlab CI
detox_test:iOS:
stage: test
before_script:
- brew tap wix/brew
- brew install --HEAD applesimutils
- npm install -g detox-cli
- npm install -g react-native-cli
- npm install
script:
- react-native start --port 2137 &
- detox build -c ios.sim.debug
- detox test -c ios.sim.debug
- kill -9 $(lsof -n -i4TCP:2137)
tags:
- xcode-9.2
detox_test:android:
stage: test
before_script:
- adb connect pixel:5555; sh ./scripts/waitForDevice.sh
pixel
- mkdir -p ./detox_node/
- npm install --prefix ./detox_node/ -g detox-cli
- npm install --prefix ./detox_node/ -g react-native-cli
- npm install
script:
- ./detox_node/bin/react-native start --port 2137 &
- ./detox_node/bin/detox build -c android.emu.debug
- ./detox_node/bin/detox test -c android.emu.debug
- kill -9 $(lsof -n -i4TCP:2137)
tags:
- android-emu
services:
- name: android-emulator:latest
alias: pixel
How to integrate With CI - Gitlab CI
detox_test:iOS:
stage: test
before_script:
- brew tap wix/brew
- brew install --HEAD applesimutils
- npm install -g detox-cli
- npm install -g react-native-cli
- npm install
script:
- react-native start --port 2137 &
- detox build -c ios.sim.debug
- detox test -c ios.sim.debug
- kill -9 $(lsof -n -i4TCP:2137)
tags:
- xcode-9.2
detox_test:android:
stage: test
before_script:
- adb connect pixel:5555; sh ./scripts/waitForDevice.sh
pixel
- mkdir -p ./detox_node/
- npm install --prefix ./detox_node/ -g detox-cli
- npm install --prefix ./detox_node/ -g react-native-cli
- npm install
script:
- ./detox_node/bin/react-native start --port 2137 &
- ./detox_node/bin/detox build -c android.emu.debug
- ./detox_node/bin/detox test -c android.emu.debug
- kill -9 $(lsof -n -i4TCP:2137)
tags:
- android-emu
services:
- name: android-emulator:latest
alias: pixel
entrypoint: ["/start-emulator.sh", "android-23",
"x86", "pixel"]
Show time!
Key TAkeaways
● Cross platform apps can be tested with the same
frameworks as native ones
● For typical apps you can avoid code duplication and use
cross-platform frameworks
● Detox is a great tool for React Native UI testing
Questions ? :)
Thank You!
You can read about Testing and more at
polidea.com/blog
@astasiak93
Icons by: Freepik and Roundicons

Contenu connexe

Tendances

Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015 Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015
Joe Ferguson
 

Tendances (20)

Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio Code
 
Testing Web Applications
Testing Web ApplicationsTesting Web Applications
Testing Web Applications
 
Unit testing - A&BP CC
Unit testing - A&BP CCUnit testing - A&BP CC
Unit testing - A&BP CC
 
Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!Modern Release Engineering in a Nutshell - Why Researchers should Care!
Modern Release Engineering in a Nutshell - Why Researchers should Care!
 
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
 
Efficient JavaScript Unit Testing, May 2012
Efficient JavaScript Unit Testing, May 2012Efficient JavaScript Unit Testing, May 2012
Efficient JavaScript Unit Testing, May 2012
 
The Play Framework at LinkedIn
The Play Framework at LinkedInThe Play Framework at LinkedIn
The Play Framework at LinkedIn
 
Codeception introduction and use in Yii
Codeception introduction and use in YiiCodeception introduction and use in Yii
Codeception introduction and use in Yii
 
PHP Unit Testing in Yii
PHP Unit Testing in YiiPHP Unit Testing in Yii
PHP Unit Testing in Yii
 
React Ecosystem
React EcosystemReact Ecosystem
React Ecosystem
 
Front-End Testing: Demystified
Front-End Testing: DemystifiedFront-End Testing: Demystified
Front-End Testing: Demystified
 
Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015 Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015
 
Testing PHP with Codeception
Testing PHP with CodeceptionTesting PHP with Codeception
Testing PHP with Codeception
 
Apache ant
Apache antApache ant
Apache ant
 
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
 
Command Box ColdFusion Package Manager, Automation
Command Box ColdFusion Package Manager, AutomationCommand Box ColdFusion Package Manager, Automation
Command Box ColdFusion Package Manager, Automation
 
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
 
JavaLand - Integration Testing How-to
JavaLand - Integration Testing How-toJavaLand - Integration Testing How-to
JavaLand - Integration Testing How-to
 
High Performance JavaScript 2011
High Performance JavaScript 2011High Performance JavaScript 2011
High Performance JavaScript 2011
 
Unit-testing and E2E testing in JS
Unit-testing and E2E testing in JSUnit-testing and E2E testing in JS
Unit-testing and E2E testing in JS
 

Similaire à [QE 2018] Adam Stasiak – Nadchodzi React Native – czyli o testowaniu mobilnych aplikacji hybrydowych

Trying Continuous Delivery - pyconjp 2012
Trying Continuous Delivery - pyconjp 2012Trying Continuous Delivery - pyconjp 2012
Trying Continuous Delivery - pyconjp 2012
Toru Furukawa
 
Appium mobile web+dev conference
Appium   mobile web+dev conferenceAppium   mobile web+dev conference
Appium mobile web+dev conference
Isaac Murchie
 

Similaire à [QE 2018] Adam Stasiak – Nadchodzi React Native – czyli o testowaniu mobilnych aplikacji hybrydowych (20)

Cocoapods and Most common used library in Swift
Cocoapods and Most common used library in SwiftCocoapods and Most common used library in Swift
Cocoapods and Most common used library in Swift
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile Devices
 
Hosting Your Own OTA Update Service
Hosting Your Own OTA Update ServiceHosting Your Own OTA Update Service
Hosting Your Own OTA Update Service
 
Trying Continuous Delivery - pyconjp 2012
Trying Continuous Delivery - pyconjp 2012Trying Continuous Delivery - pyconjp 2012
Trying Continuous Delivery - pyconjp 2012
 
Intro to appcelerator
Intro to appceleratorIntro to appcelerator
Intro to appcelerator
 
Nativescript with angular 2
Nativescript with angular 2Nativescript with angular 2
Nativescript with angular 2
 
Tutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJSTutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJS
 
Fastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS AppsFastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS Apps
 
Angularjs Tutorial for Beginners
Angularjs Tutorial for BeginnersAngularjs Tutorial for Beginners
Angularjs Tutorial for Beginners
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 
Electron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easyElectron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easy
 
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidence
 
JDD 2017: 7 things which you should care about before release your code to pr...
JDD 2017: 7 things which you should care about before release your code to pr...JDD 2017: 7 things which you should care about before release your code to pr...
JDD 2017: 7 things which you should care about before release your code to pr...
 
Appium mobile web+dev conference
Appium   mobile web+dev conferenceAppium   mobile web+dev conference
Appium mobile web+dev conference
 
Expo - Zero to App.pptx
Expo - Zero to App.pptxExpo - Zero to App.pptx
Expo - Zero to App.pptx
 
Running Microservices on AWS Elastic Beanstalk
Running Microservices on AWS Elastic BeanstalkRunning Microservices on AWS Elastic Beanstalk
Running Microservices on AWS Elastic Beanstalk
 
Appium workship, Mobile Web+Dev Conference
Appium workship,  Mobile Web+Dev ConferenceAppium workship,  Mobile Web+Dev Conference
Appium workship, Mobile Web+Dev Conference
 
Titanium Studio [Updated - 18/12/2011]
Titanium Studio [Updated - 18/12/2011]Titanium Studio [Updated - 18/12/2011]
Titanium Studio [Updated - 18/12/2011]
 
React Native for ReactJS Devs
React Native for ReactJS DevsReact Native for ReactJS Devs
React Native for ReactJS Devs
 

Plus de Future Processing

Plus de Future Processing (20)

DPTO_Inżynieria oprogramowania to proces uczenia się.pdf
DPTO_Inżynieria oprogramowania to proces uczenia się.pdfDPTO_Inżynieria oprogramowania to proces uczenia się.pdf
DPTO_Inżynieria oprogramowania to proces uczenia się.pdf
 
DPTO_QA w świecie wartości biznesowych.pdf
DPTO_QA w świecie wartości biznesowych.pdfDPTO_QA w świecie wartości biznesowych.pdf
DPTO_QA w świecie wartości biznesowych.pdf
 
DPTO_Hello_Clean_Architekture.pdf
DPTO_Hello_Clean_Architekture.pdfDPTO_Hello_Clean_Architekture.pdf
DPTO_Hello_Clean_Architekture.pdf
 
[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze
[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze
[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze
 
[Quality Meetup #20] Dorota Tadych - Hyperion - wystarczy jeden shake
[Quality Meetup #20] Dorota Tadych - Hyperion - wystarczy jeden shake[Quality Meetup #20] Dorota Tadych - Hyperion - wystarczy jeden shake
[Quality Meetup #20] Dorota Tadych - Hyperion - wystarczy jeden shake
 
[Quality Meetup #19] Magdalena Drechsler-Nowak - Tester w pułapce myślenia
[Quality Meetup #19] Magdalena Drechsler-Nowak - Tester w pułapce myślenia[Quality Meetup #19] Magdalena Drechsler-Nowak - Tester w pułapce myślenia
[Quality Meetup #19] Magdalena Drechsler-Nowak - Tester w pułapce myślenia
 
[Quality Meetup #19] Adrian Gonciarz - Testerska ruletka
[Quality Meetup #19] Adrian Gonciarz - Testerska ruletka[Quality Meetup #19] Adrian Gonciarz - Testerska ruletka
[Quality Meetup #19] Adrian Gonciarz - Testerska ruletka
 
[FDD 2018] Krzysztof Sikora - Jak Service Fabric rozwiąże twoje problemy z mi...
[FDD 2018] Krzysztof Sikora - Jak Service Fabric rozwiąże twoje problemy z mi...[FDD 2018] Krzysztof Sikora - Jak Service Fabric rozwiąże twoje problemy z mi...
[FDD 2018] Krzysztof Sikora - Jak Service Fabric rozwiąże twoje problemy z mi...
 
[FDD 2018] Ł. Turchan, A. Hulist, M. Duchnowski - CUDA - results over coffee ...
[FDD 2018] Ł. Turchan, A. Hulist, M. Duchnowski - CUDA - results over coffee ...[FDD 2018] Ł. Turchan, A. Hulist, M. Duchnowski - CUDA - results over coffee ...
[FDD 2018] Ł. Turchan, A. Hulist, M. Duchnowski - CUDA - results over coffee ...
 
[FDD 2018] Lech Kalinowski - Prywatny Blockchain
[FDD 2018] Lech Kalinowski - Prywatny Blockchain[FDD 2018] Lech Kalinowski - Prywatny Blockchain
[FDD 2018] Lech Kalinowski - Prywatny Blockchain
 
[FDD 2018] W. Malara, K. Kotowski - Autoenkodery – czyli zalety funkcji F(X)≈X
[FDD 2018] W. Malara, K. Kotowski - Autoenkodery – czyli zalety funkcji F(X)≈X[FDD 2018] W. Malara, K. Kotowski - Autoenkodery – czyli zalety funkcji F(X)≈X
[FDD 2018] W. Malara, K. Kotowski - Autoenkodery – czyli zalety funkcji F(X)≈X
 
[FDD 2018] Jarosław Ogiegło - Ludzie, zabezpieczajcie się! Wprowadzenie do OA...
[FDD 2018] Jarosław Ogiegło - Ludzie, zabezpieczajcie się! Wprowadzenie do OA...[FDD 2018] Jarosław Ogiegło - Ludzie, zabezpieczajcie się! Wprowadzenie do OA...
[FDD 2018] Jarosław Ogiegło - Ludzie, zabezpieczajcie się! Wprowadzenie do OA...
 
[JuraSIC! Meetup] Krzysztof Sikora- Jak Service Fabric rozwiąże twoje problem...
[JuraSIC! Meetup] Krzysztof Sikora- Jak Service Fabric rozwiąże twoje problem...[JuraSIC! Meetup] Krzysztof Sikora- Jak Service Fabric rozwiąże twoje problem...
[JuraSIC! Meetup] Krzysztof Sikora- Jak Service Fabric rozwiąże twoje problem...
 
[JuraSIC! Meetup] Mateusz Stasch - Monady w .NET
[JuraSIC! Meetup] Mateusz Stasch - Monady w .NET[JuraSIC! Meetup] Mateusz Stasch - Monady w .NET
[JuraSIC! Meetup] Mateusz Stasch - Monady w .NET
 
[QE 2018] Aleksandra Kornecka – Kognitywne podejście do testowania aplikacji ...
[QE 2018] Aleksandra Kornecka – Kognitywne podejście do testowania aplikacji ...[QE 2018] Aleksandra Kornecka – Kognitywne podejście do testowania aplikacji ...
[QE 2018] Aleksandra Kornecka – Kognitywne podejście do testowania aplikacji ...
 
[QE 2018] Łukasz Gawron – Testing Batch and Streaming Spark Applications
[QE 2018] Łukasz Gawron – Testing Batch and Streaming Spark Applications[QE 2018] Łukasz Gawron – Testing Batch and Streaming Spark Applications
[QE 2018] Łukasz Gawron – Testing Batch and Streaming Spark Applications
 
[QE 2018] Marek Puchalski – Web Application Security Test Automation
[QE 2018] Marek Puchalski – Web Application Security Test Automation[QE 2018] Marek Puchalski – Web Application Security Test Automation
[QE 2018] Marek Puchalski – Web Application Security Test Automation
 
[QE 2018] Rob Lambert – How to Thrive as a Software Tester
[QE 2018] Rob Lambert – How to Thrive as a Software Tester[QE 2018] Rob Lambert – How to Thrive as a Software Tester
[QE 2018] Rob Lambert – How to Thrive as a Software Tester
 
[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps
[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps
[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps
 
[QE 2018] Arnika Hryszko – Testy, które tworzą się same (prawie)
[QE 2018] Arnika Hryszko – Testy, które tworzą się same (prawie)[QE 2018] Arnika Hryszko – Testy, które tworzą się same (prawie)
[QE 2018] Arnika Hryszko – Testy, które tworzą się same (prawie)
 

Dernier

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Dernier (20)

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 

[QE 2018] Adam Stasiak – Nadchodzi React Native – czyli o testowaniu mobilnych aplikacji hybrydowych

  • 1. REACT Native is coming The story of hybrid mobile application testing
  • 3. Agenda 1. Introduction 2. Cross-platform frameworks for mobile development 3. UI testing approaches for hybrid apps 4. Detox guide for applying UI tests in React Native projects
  • 4. Agenda 1. Introduction 2. Cross-platform frameworks for mobile development 3. UI testing approaches for hybrid apps 4. Detox guide for applying UI tests in React Native projects
  • 5. Agenda 1. Introduction 2. Cross-platform frameworks for mobile development 3. UI testing approaches for hybrid apps 4. Detox guide for applying UI tests in React Native projects
  • 6. Agenda 1. Introduction 2. Cross-platform frameworks for mobile development 3. UI testing approaches for hybrid apps 4. Detox guide for applying UI tests in React Native projects
  • 11. Oh no ! O Nie ! Para Pollo ! Zonk !
  • 14. How to Automate this as before ???
  • 15. The Native white Box Test
  • 16. The Native white Box Test + Fast + Easy setup + Wide range of open source helpers + Compatible with Cloud Device Farms
  • 17. The Native white Box Test + Fast + Easy setup + Wide range of open source helpers + Compatible with Cloud Device Farms − Different languages in project repository − Duplicated test code
  • 18. The Cross Platform Black Box Test
  • 19. The Cross Platform Black Box Test + Many supported languages + Wide community + Similar to Selenium + Single test code base + Compatible with Cloud Device Farms
  • 20. The Cross Platform Black Box Test + Many supported languages + Wide community + Similar to Selenium + Single test code base + Compatible with Cloud Device Farms − Slow − Difficult debugging − Lack of stability
  • 21. The Cross Platform White Box Test
  • 22. The Cross Platform White Box Test + Fast + Easy setup + Single test code base + The same language as default project one + Close integration with source code + API designed for a specific platform
  • 23. The Cross Platform White Box Test + Fast + Easy setup + Single test code base + The same language as default project one + Close integration with source code + API designed for a specific platform − No way / difficult to integrate with Cloud Device Farm − No outspread community − Often still not developed enough
  • 24. Based on experience with React Native
  • 25. Automation Guide with Detox - cross platform React Native Framework
  • 26. How to add Detox to an existing project - Package.json file
  • 27. How to add Detox to an existing project - Package.json file "detox": {
  • 28. How to add Detox to an existing project - Package.json file "detox": { "configurations": {
  • 29. How to add Detox to an existing project - Package.json file "detox": { "configurations": { "ios.sim.debug": { "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/PolideaSample.app", "build": "xcodebuild -project ios/PolideaSample.xcodeproj -scheme PolideaSample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build", "type": "ios.simulator", "name": "iPhone X" }, "android.emu.debug": { "binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk", "build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..", "type": "android.emulator", "name": "Nexus_5X_API_24" } } } }
  • 30. How to add Detox to an existing project - Package.json file "detox": { "configurations": { "ios.sim.debug": { "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/PolideaSample.app", "build": "xcodebuild -project ios/PolideaSample.xcodeproj -scheme PolideaSample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build", "type": "ios.simulator", "name": "iPhone X" }, "android.emu.debug": { "binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk", "build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..", "type": "android.emulator", "name": "Nexus_5X_API_24" } } } }
  • 31. How to add Detox to an existing project - Package.json file "detox": { "configurations": { "ios.sim.debug": { "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/PolideaSample.app", "build": "xcodebuild -project ios/PolideaSample.xcodeproj -scheme PolideaSample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build", "type": "ios.simulator", "name": "iPhone X" }, "android.emu.debug": { "binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk", "build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..", "type": "android.emulator", "name": "Nexus_5X_API_24" } } } }
  • 32. How to add Detox to an existing project - Package.json file "detox": { "configurations": { "ios.sim.debug": { "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/PolideaSample.app", "build": "xcodebuild -project ios/PolideaSample.xcodeproj -scheme PolideaSample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build", "type": "ios.simulator", "name": "iPhone X" }, "android.emu.debug": { "binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk", "build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..", "type": "android.emulator", "name": "Nexus_5X_API_24" } } } }
  • 33. How to add Detox to an existing project - Package.json file "detox": { "configurations": { "ios.sim.debug": { "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/PolideaSample.app", "build": "xcodebuild -project ios/PolideaSample.xcodeproj -scheme PolideaSample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build", "type": "ios.simulator", "name": "iPhone X" }, "android.emu.debug": { "binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk", "build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..", "type": "android.emulator", "name": "Nexus_5X_API_24" } } } }
  • 34. How to make apps testable? <Text style={styles.textStyle}> {!this.state.clicked? defaultButtonText: "Polidea"} </Text> <Text accessible= {true} testID= {"ButtonText"} accessibilityLabel= {"ButtonTextDesc"} style={styles.textStyle}> {!this.state.clicked? defaultButtonText: "Polidea"} </Text>
  • 35. How to make apps testable? <Text accessible= {true} testID= {"ButtonText"} accessibilityLabel= {"ButtonTextDesc"} style={styles.textStyle}> {!this.state.clicked? defaultButtonText: "Polidea"} </Text>
  • 36. How to write Test scripts - API Overview Detox Object Test plan configuration Device Object Key events, Gestures, Device settings Matchers, Actions, Expectations Finding Views, User’s actions, Validation API
  • 37. How to write Test scripts - Init script by example
  • 38. How to write Test scripts - Init script by example require('babel-polyfill');
  • 39. How to write Test scripts - Init script by example require('babel-polyfill'); const detox = require('detox');
  • 40. How to write Test scripts - Init script by example require('babel-polyfill'); const detox = require('detox'); const config = require('../package.json').detox; before(async () => {
  • 41. How to write Test scripts - Init script by example require('babel-polyfill'); const detox = require('detox'); const config = require('../package.json').detox; before(async () => { await detox.init(config);
  • 42. How to write Test scripts - Init script by example require('babel-polyfill'); const detox = require('detox'); const config = require('../package.json').detox; before(async () => { await detox.init(config); }); after(async () => {
  • 43. How to write Test scripts - Init script by example require('babel-polyfill'); const detox = require('detox'); const config = require('../package.json').detox; before(async () => { await detox.init(config); }); after(async () => { await detox.cleanup(); });
  • 44. How to write Test scripts - Test class by example
  • 45. How to write Test scripts - Test class by example describe('Example', () => {
  • 46. How to write Test scripts - Test class by example describe('Example', () => { beforeEach(async () => {
  • 47. How to write Test scripts - Test class by example describe('Example', () => { beforeEach(async () => { await
  • 48. How to write Test scripts - Test class by example describe('Example', () => { beforeEach(async () => { await device
  • 49. How to write Test scripts - Test class by example describe('Example', () => { beforeEach(async () => { await device.reloadReactNative();
  • 50. How to write Test scripts - Test class by example describe('Example', () => { beforeEach(async () => { await device.reloadReactNative(); await waitFor
  • 51. How to write Test scripts - Test class by example describe('Example', () => { beforeEach(async () => { await device.reloadReactNative(); await waitFor(element
  • 52. How to write Test scripts - Test class by example describe('Example', () => { beforeEach(async () => { await device.reloadReactNative(); await waitFor(element(by.id('ButtonText')))
  • 53. How to write Test scripts - Test class by example describe('Example', () => { beforeEach(async () => { await device.reloadReactNative(); await waitFor(element(by.id('ButtonText'))).toBeVisible()
  • 54. How to write Test scripts - Test class by example describe('Example', () => { beforeEach(async () => { await device.reloadReactNative(); await waitFor(element(by.id('ButtonText'))).toBeVisible().withTimeout(10000); });
  • 55. How to write Test scripts - Test class by example describe('Example', () => { beforeEach(async () => { await device.reloadReactNative(); await waitFor(element(by.id('ButtonText'))).toBeVisible().withTimeout(10000); }); it
  • 56. How to write Test scripts - Test class by example describe('Example', () => { beforeEach(async () => { await device.reloadReactNative(); await waitFor(element(by.id('ButtonText'))).toBeVisible().withTimeout(10000); }); it ('should Press me text be morphed in Polidea title after click on button',async () =>{
  • 57. How to write Test scripts - Test class by example describe('Example', () => { beforeEach(async () => { await device.reloadReactNative(); await waitFor(element(by.id('ButtonText'))).toBeVisible().withTimeout(10000); }); it ('should Press me text be morphed in Polidea title after click on button',async () =>{ await element(by.id('ButtonText'))
  • 58. How to write Test scripts - Test class by example describe('Example', () => { beforeEach(async () => { await device.reloadReactNative(); await waitFor(element(by.id('ButtonText'))).toBeVisible().withTimeout(10000); }); it ('should Press me text be morphed in Polidea title after click on button',async () =>{ await element(by.id('ButtonText')).tap();
  • 59. How to write Test scripts - Test class by example describe('Example', () => { beforeEach(async () => { await device.reloadReactNative(); await waitFor(element(by.id('ButtonText'))).toBeVisible().withTimeout(10000); }); it ('should Press me text be morphed in Polidea title after click on button',async () =>{ await element(by.id('ButtonText')).tap(); await waitFor(element(by.text("Press Me")))
  • 60. How to write Test scripts - Test class by example describe('Example', () => { beforeEach(async () => { await device.reloadReactNative(); await waitFor(element(by.id('ButtonText'))).toBeVisible().withTimeout(10000); }); it ('should Press me text be morphed in Polidea title after click on button',async () =>{ await element(by.id('ButtonText')).tap(); await waitFor(element(by.text("Press Me"))).toNotExist()
  • 61. How to write Test scripts - Test class by example describe('Example', () => { beforeEach(async () => { await device.reloadReactNative(); await waitFor(element(by.id('ButtonText'))).toBeVisible().withTimeout(10000); }); it ('should Press me text be morphed in Polidea title after click on button',async () =>{ await element(by.id('ButtonText')).tap(); await waitFor(element(by.text("Press Me"))).toNotExist().withTimeout(2000);
  • 62. How to write Test scripts - Test class by example describe('Example', () => { beforeEach(async () => { await device.reloadReactNative(); await waitFor(element(by.id('ButtonText'))).toBeVisible().withTimeout(10000); }); it ('should Press me text be morphed in Polidea title after click on button',async () =>{ await element(by.id('ButtonText')).tap(); await waitFor(element(by.text("Press Me"))).toNotExist().withTimeout(2000); await waitFor(element(by.text("Polidea"))).toBeVisible().withTimeout(100); }); })
  • 63. How to integrate With CI - Gitlab CI
  • 64. How to integrate With CI - Gitlab CI detox_test:iOS: detox_test:android:
  • 65. How to integrate With CI - Gitlab CI detox_test:iOS: stage: test before_script: detox_test:android: stage: test before_script:
  • 66. How to integrate With CI - Gitlab CI detox_test:iOS: stage: test before_script: detox_test:android: stage: test before_script: - adb connect pixel:5555; sh ./scripts/waitForDevice.sh pixel
  • 67. How to integrate With CI - Gitlab CI detox_test:iOS: stage: test before_script: - brew tap wix/brew - brew install --HEAD applesimutils - npm install -g detox-cli - npm install -g react-native-cli - npm install detox_test:android: stage: test before_script: - adb connect pixel:5555; sh ./scripts/waitForDevice.sh pixel - mkdir -p ./detox_node/ - npm install --prefix ./detox_node/ -g detox-cli - npm install --prefix ./detox_node/ -g react-native-cli - npm install
  • 68. How to integrate With CI - Gitlab CI detox_test:iOS: stage: test before_script: - brew tap wix/brew - brew install --HEAD applesimutils - npm install -g detox-cli - npm install -g react-native-cli - npm install script: detox_test:android: stage: test before_script: - adb connect pixel:5555; sh ./scripts/waitForDevice.sh pixel - mkdir -p ./detox_node/ - npm install --prefix ./detox_node/ -g detox-cli - npm install --prefix ./detox_node/ -g react-native-cli - npm install script:
  • 69. How to integrate With CI - Gitlab CI detox_test:iOS: stage: test before_script: - brew tap wix/brew - brew install --HEAD applesimutils - npm install -g detox-cli - npm install -g react-native-cli - npm install script: - react-native start --port 2137 & detox_test:android: stage: test before_script: - adb connect pixel:5555; sh ./scripts/waitForDevice.sh pixel - mkdir -p ./detox_node/ - npm install --prefix ./detox_node/ -g detox-cli - npm install --prefix ./detox_node/ -g react-native-cli - npm install script: - ./detox_node/bin/react-native start --port 2137 &
  • 70. How to integrate With CI - Gitlab CI detox_test:iOS: stage: test before_script: - brew tap wix/brew - brew install --HEAD applesimutils - npm install -g detox-cli - npm install -g react-native-cli - npm install script: - react-native start --port 2137 & - detox build -c ios.sim.debug detox_test:android: stage: test before_script: - adb connect pixel:5555; sh ./scripts/waitForDevice.sh pixel - mkdir -p ./detox_node/ - npm install --prefix ./detox_node/ -g detox-cli - npm install --prefix ./detox_node/ -g react-native-cli - npm install script: - ./detox_node/bin/react-native start --port 2137 & - ./detox_node/bin/detox build -c android.emu.debug
  • 71. How to integrate With CI - Gitlab CI detox_test:iOS: stage: test before_script: - brew tap wix/brew - brew install --HEAD applesimutils - npm install -g detox-cli - npm install -g react-native-cli - npm install script: - react-native start --port 2137 & - detox build -c ios.sim.debug - detox test -c ios.sim.debug detox_test:android: stage: test before_script: - adb connect pixel:5555; sh ./scripts/waitForDevice.sh pixel - mkdir -p ./detox_node/ - npm install --prefix ./detox_node/ -g detox-cli - npm install --prefix ./detox_node/ -g react-native-cli - npm install script: - ./detox_node/bin/react-native start --port 2137 & - ./detox_node/bin/detox build -c android.emu.debug - ./detox_node/bin/detox test -c android.emu.debug
  • 72. How to integrate With CI - Gitlab CI detox_test:iOS: stage: test before_script: - brew tap wix/brew - brew install --HEAD applesimutils - npm install -g detox-cli - npm install -g react-native-cli - npm install script: - react-native start --port 2137 & - detox build -c ios.sim.debug - detox test -c ios.sim.debug - kill -9 $(lsof -n -i4TCP:2137) detox_test:android: stage: test before_script: - adb connect pixel:5555; sh ./scripts/waitForDevice.sh pixel - mkdir -p ./detox_node/ - npm install --prefix ./detox_node/ -g detox-cli - npm install --prefix ./detox_node/ -g react-native-cli - npm install script: - ./detox_node/bin/react-native start --port 2137 & - ./detox_node/bin/detox build -c android.emu.debug - ./detox_node/bin/detox test -c android.emu.debug - kill -9 $(lsof -n -i4TCP:2137)
  • 73. How to integrate With CI - Gitlab CI detox_test:iOS: stage: test before_script: - brew tap wix/brew - brew install --HEAD applesimutils - npm install -g detox-cli - npm install -g react-native-cli - npm install script: - react-native start --port 2137 & - detox build -c ios.sim.debug - detox test -c ios.sim.debug - kill -9 $(lsof -n -i4TCP:2137) tags: detox_test:android: stage: test before_script: - adb connect pixel:5555; sh ./scripts/waitForDevice.sh pixel - mkdir -p ./detox_node/ - npm install --prefix ./detox_node/ -g detox-cli - npm install --prefix ./detox_node/ -g react-native-cli - npm install script: - ./detox_node/bin/react-native start --port 2137 & - ./detox_node/bin/detox build -c android.emu.debug - ./detox_node/bin/detox test -c android.emu.debug - kill -9 $(lsof -n -i4TCP:2137) tags:
  • 74. How to integrate With CI - Gitlab CI detox_test:iOS: stage: test before_script: - brew tap wix/brew - brew install --HEAD applesimutils - npm install -g detox-cli - npm install -g react-native-cli - npm install script: - react-native start --port 2137 & - detox build -c ios.sim.debug - detox test -c ios.sim.debug - kill -9 $(lsof -n -i4TCP:2137) tags: - xcode-9.2 detox_test:android: stage: test before_script: - adb connect pixel:5555; sh ./scripts/waitForDevice.sh pixel - mkdir -p ./detox_node/ - npm install --prefix ./detox_node/ -g detox-cli - npm install --prefix ./detox_node/ -g react-native-cli - npm install script: - ./detox_node/bin/react-native start --port 2137 & - ./detox_node/bin/detox build -c android.emu.debug - ./detox_node/bin/detox test -c android.emu.debug - kill -9 $(lsof -n -i4TCP:2137) tags: - android-emu
  • 75. How to integrate With CI - Gitlab CI detox_test:iOS: stage: test before_script: - brew tap wix/brew - brew install --HEAD applesimutils - npm install -g detox-cli - npm install -g react-native-cli - npm install script: - react-native start --port 2137 & - detox build -c ios.sim.debug - detox test -c ios.sim.debug - kill -9 $(lsof -n -i4TCP:2137) tags: - xcode-9.2 detox_test:android: stage: test before_script: - adb connect pixel:5555; sh ./scripts/waitForDevice.sh pixel - mkdir -p ./detox_node/ - npm install --prefix ./detox_node/ -g detox-cli - npm install --prefix ./detox_node/ -g react-native-cli - npm install script: - ./detox_node/bin/react-native start --port 2137 & - ./detox_node/bin/detox build -c android.emu.debug - ./detox_node/bin/detox test -c android.emu.debug - kill -9 $(lsof -n -i4TCP:2137) tags: - android-emu services: - name: android-emulator:latest
  • 76. How to integrate With CI - Gitlab CI detox_test:iOS: stage: test before_script: - brew tap wix/brew - brew install --HEAD applesimutils - npm install -g detox-cli - npm install -g react-native-cli - npm install script: - react-native start --port 2137 & - detox build -c ios.sim.debug - detox test -c ios.sim.debug - kill -9 $(lsof -n -i4TCP:2137) tags: - xcode-9.2 detox_test:android: stage: test before_script: - adb connect pixel:5555; sh ./scripts/waitForDevice.sh pixel - mkdir -p ./detox_node/ - npm install --prefix ./detox_node/ -g detox-cli - npm install --prefix ./detox_node/ -g react-native-cli - npm install script: - ./detox_node/bin/react-native start --port 2137 & - ./detox_node/bin/detox build -c android.emu.debug - ./detox_node/bin/detox test -c android.emu.debug - kill -9 $(lsof -n -i4TCP:2137) tags: - android-emu services: - name: android-emulator:latest alias: pixel
  • 77. How to integrate With CI - Gitlab CI detox_test:iOS: stage: test before_script: - brew tap wix/brew - brew install --HEAD applesimutils - npm install -g detox-cli - npm install -g react-native-cli - npm install script: - react-native start --port 2137 & - detox build -c ios.sim.debug - detox test -c ios.sim.debug - kill -9 $(lsof -n -i4TCP:2137) tags: - xcode-9.2 detox_test:android: stage: test before_script: - adb connect pixel:5555; sh ./scripts/waitForDevice.sh pixel - mkdir -p ./detox_node/ - npm install --prefix ./detox_node/ -g detox-cli - npm install --prefix ./detox_node/ -g react-native-cli - npm install script: - ./detox_node/bin/react-native start --port 2137 & - ./detox_node/bin/detox build -c android.emu.debug - ./detox_node/bin/detox test -c android.emu.debug - kill -9 $(lsof -n -i4TCP:2137) tags: - android-emu services: - name: android-emulator:latest alias: pixel entrypoint: ["/start-emulator.sh", "android-23", "x86", "pixel"]
  • 79.
  • 80. Key TAkeaways ● Cross platform apps can be tested with the same frameworks as native ones ● For typical apps you can avoid code duplication and use cross-platform frameworks ● Detox is a great tool for React Native UI testing
  • 82. Thank You! You can read about Testing and more at polidea.com/blog @astasiak93 Icons by: Freepik and Roundicons