SlideShare una empresa de Scribd logo
1 de 50
Descargar para leer sin conexión
Mobile testing
in the cloud
Andrei Diaconu
http://www.andreidiaconu.com http://www.androidiasi.ro
Andrei Diaconu Android Iasi
Me
1. Mobile testing
2. in the cloud
2 Options
Simple Java Unit Tests
UI tests
2 Options
Simple Java Unit Tests
UI tests
Test components in isolation
Super fast
2 Options
Simple Java Unit Tests
UI tests
Test components in isolation
Super fast
Simulate user interaction
Slow and need Android
+
Inside man Outside man
Inside man Outside man
• Access to code
• Can change anything
• Can simulate situations
• Uses accessibility
• Simulates a user
• Can run on any app
Inside man Outside man
Inside man Outside man
Instrumentation
Framework
UiAutomator
Inside man Outside man
How they work
UiAutomator
AppiumDriver
JUnit
Instrumentation
Framework
JUnit
Instrumentation
Framework
UiAutomator
JUnit
Let's validate
this scenario
onView(withText("Favorites"))

.perform(click());


onView(withId(R.id.swipe_to_refresh))

.perform(swipeDown());



onView(withText(containsString("There are no Sessions")))

.check(matches(isDisplayed()));
onView(withText("Favorites"))

.perform(click());


onView(withId(R.id.swipe_to_refresh))

.perform(swipeDown());



onView(withText(containsString("There are no Sessions")))

.check(matches(isDisplayed()));
onView(withText("Favorites"))

.perform(click());


onView(withId(R.id.swipe_to_refresh))

.perform(swipeDown());



onView(withText(containsString("There are no Sessions")))

.check(matches(isDisplayed()));
Let's validate
this scenario
Record from Android Studio
driver
.findElement(containsText("Favorites"))

.click();


driver.swipe(300, 300, 300, 600, 1500);



assertTrue(
driver
.findElement(containsText("There are no Sessions"))

.isDisplayed());
...
private By containsText(String text){

return By.xpath("//*[contains(@text,'"+text+"')]");

}
driver
.findElement(containsText("Favorites"))

.click();


driver.swipe(300, 300, 300, 600, 1500);



assertTrue(
driver
.findElement(containsText("There are no Sessions"))

.isDisplayed());
...
private By containsText(String text){

return By.xpath("//*[contains(@text,'"+text+"')]");

}
driver
.findElement(containsText("Favorites"))

.click();


driver.swipe(300, 300, 300, 600, 1500);



assertTrue(
driver
.findElement(containsText("There are no Sessions"))

.isDisplayed());
...
private By containsText(String text){

return By.xpath("//*[contains(@text,'"+text+"')]");

}
driver
.findElement(containsText("Favorites"))

.click();


driver.swipe(300, 300, 300, 600, 1500);



assertTrue(
driver
.findElement(containsText("There are no Sessions"))

.isDisplayed());
...
private By containsText(String text){

return By.xpath("//*[contains(@text,'"+text+"')]");

}
Mobile testing
in the cloud
in the cloud
Firebase Test Lab
Upload app and instrumentation apk
Select devices and configurations
Wait for tests to complete
View results, including Screenshots + Video
Galaxy Tab 3
Nexus 7Nexus 5
Nexus 4
Lg G3
Select devices and configurations
Configure from Android Studio
Run from Android Studio
Amazon Device Farm
More options,
including Appium
More devices
Knows a few other tricks
Less stable
On Amazon you can also manual test
So what should you pick?
OR
OR
Record from Android Studio
Firebase codelab (including Jenkins integration):
https://codelabs.developers.google.com/codelabs/firebase-test-lab/index.html
Testing codelab (including Espresso):
https://codelabs.developers.google.com/codelabs/android-testing/#0
Codecamp App:
https://play.google.com/store/apps/details?id=ro.androidiasi.codecamp.iasi.live
Android Iasi:
http://androidiasi.ro
Android Iasi Discussion Group:
http://bit.ly/android-iasi
Resources
http://www.androidiasi.ro
http://bit.ly/android-iasi

Más contenido relacionado

Destacado

Raj Subramanian - Mobile Web Testing
Raj Subramanian - Mobile Web TestingRaj Subramanian - Mobile Web Testing
Raj Subramanian - Mobile Web Testing
QA or the Highway
 

Destacado (15)

Raj Subramanian - Mobile Web Testing
Raj Subramanian - Mobile Web TestingRaj Subramanian - Mobile Web Testing
Raj Subramanian - Mobile Web Testing
 
QA Fes 2016. Claudiu Draghia. Testing Challenges
QA Fes 2016. Claudiu Draghia. Testing ChallengesQA Fes 2016. Claudiu Draghia. Testing Challenges
QA Fes 2016. Claudiu Draghia. Testing Challenges
 
Mobile web or native app
Mobile web or native appMobile web or native app
Mobile web or native app
 
Web App VS. Hybrid App VS. Native App?
Web App VS. Hybrid App VS. Native App?Web App VS. Hybrid App VS. Native App?
Web App VS. Hybrid App VS. Native App?
 
Extended Finite State Machine - EFSM
Extended Finite State Machine - EFSMExtended Finite State Machine - EFSM
Extended Finite State Machine - EFSM
 
Mobile App Testing Strategy by RapidValue Solutions
Mobile App Testing Strategy by RapidValue SolutionsMobile App Testing Strategy by RapidValue Solutions
Mobile App Testing Strategy by RapidValue Solutions
 
Mobile web vs. native apps: It's not about technology, it's about psychology
Mobile web vs. native apps: It's not about technology, it's about psychologyMobile web vs. native apps: It's not about technology, it's about psychology
Mobile web vs. native apps: It's not about technology, it's about psychology
 
Mobile App Testing
Mobile App TestingMobile App Testing
Mobile App Testing
 
QA Fest 2016. Александр Неделяев. Браузерные помощники тестировщика
QA Fest 2016. Александр Неделяев. Браузерные помощники тестировщикаQA Fest 2016. Александр Неделяев. Браузерные помощники тестировщика
QA Fest 2016. Александр Неделяев. Браузерные помощники тестировщика
 
Mobile application testing
Mobile application testingMobile application testing
Mobile application testing
 
Mobile Application Testing
Mobile Application TestingMobile Application Testing
Mobile Application Testing
 
Mobile Application Testing Training Presentation
Mobile Application Testing Training PresentationMobile Application Testing Training Presentation
Mobile Application Testing Training Presentation
 
QA Fest 2016. Андрей Мясников. Тест-дизайн для чайников
QA Fest 2016. Андрей Мясников. Тест-дизайн для чайниковQA Fest 2016. Андрей Мясников. Тест-дизайн для чайников
QA Fest 2016. Андрей Мясников. Тест-дизайн для чайников
 
Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with Selenium
 
Cloud based Testing Mobile Apps
Cloud based Testing Mobile AppsCloud based Testing Mobile Apps
Cloud based Testing Mobile Apps
 

Similar a Mobile testing in the cloud

Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building Android
Droidcon Berlin
 
2012 java one-con3648
2012 java one-con36482012 java one-con3648
2012 java one-con3648
Eing Ong
 

Similar a Mobile testing in the cloud (20)

Tests everywhere
Tests everywhereTests everywhere
Tests everywhere
 
Rockstar Android Testing (Mobile TechCon Munich 2014)
Rockstar Android Testing (Mobile TechCon Munich 2014)Rockstar Android Testing (Mobile TechCon Munich 2014)
Rockstar Android Testing (Mobile TechCon Munich 2014)
 
Fight back android fragmentation
Fight back android fragmentationFight back android fragmentation
Fight back android fragmentation
 
Kirin - Making Single Page Web Apps with a Native UI
Kirin - Making Single Page Web Apps with a Native UIKirin - Making Single Page Web Apps with a Native UI
Kirin - Making Single Page Web Apps with a Native UI
 
Android testing
Android testingAndroid testing
Android testing
 
Automated ui testing
Automated ui testingAutomated ui testing
Automated ui testing
 
Robotium framework & Jenkins CI tools - TdT@Cluj #19
Robotium framework & Jenkins CI tools - TdT@Cluj #19Robotium framework & Jenkins CI tools - TdT@Cluj #19
Robotium framework & Jenkins CI tools - TdT@Cluj #19
 
Android Building, Testing and reversing
Android Building, Testing and reversingAndroid Building, Testing and reversing
Android Building, Testing and reversing
 
Mobile developer is Software developer
Mobile developer is Software developerMobile developer is Software developer
Mobile developer is Software developer
 
Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building Android
 
2012 java one-con3648
2012 java one-con36482012 java one-con3648
2012 java one-con3648
 
Using Robots for App Testing
Using Robots for App Testing Using Robots for App Testing
Using Robots for App Testing
 
Android UI Testing with uiautomator
Android UI Testing with uiautomatorAndroid UI Testing with uiautomator
Android UI Testing with uiautomator
 
Introduction To Mobile-Automation
Introduction To Mobile-AutomationIntroduction To Mobile-Automation
Introduction To Mobile-Automation
 
探討Web ui自動化測試工具
探討Web ui自動化測試工具探討Web ui自動化測試工具
探討Web ui自動化測試工具
 
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToCross Platform Appium Tests: How To
Cross Platform Appium Tests: How To
 
Automated UI Testing for Web and Native Apps on iOS and Android
Automated UI Testing for  Web and Native Apps on iOS and AndroidAutomated UI Testing for  Web and Native Apps on iOS and Android
Automated UI Testing for Web and Native Apps on iOS and Android
 
Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015
 
Selenium in the palm of your hand: Appium and automated mobile testing
Selenium in the palm of your hand: Appium and automated mobile testingSelenium in the palm of your hand: Appium and automated mobile testing
Selenium in the palm of your hand: Appium and automated mobile testing
 
Pragmatic UI testing with Compose Semantics.pdf
Pragmatic UI testing with Compose Semantics.pdfPragmatic UI testing with Compose Semantics.pdf
Pragmatic UI testing with Compose Semantics.pdf
 

Más de Diaconu Andrei-Tudor

Más de Diaconu Andrei-Tudor (7)

ListView vs RecyclerView
ListView vs RecyclerViewListView vs RecyclerView
ListView vs RecyclerView
 
Prezentarea ta mai buna
Prezentarea ta mai bunaPrezentarea ta mai buna
Prezentarea ta mai buna
 
Performance tools Droidcon Eastern Europe
Performance tools Droidcon Eastern EuropePerformance tools Droidcon Eastern Europe
Performance tools Droidcon Eastern Europe
 
FiiPractic 2015 - Adroid Pro - Day 7 - Follow-up Day
FiiPractic 2015 - Adroid Pro - Day 7 - Follow-up DayFiiPractic 2015 - Adroid Pro - Day 7 - Follow-up Day
FiiPractic 2015 - Adroid Pro - Day 7 - Follow-up Day
 
FiiPractic 2015 - Adroid Pro - Day 5 - SQL Day
FiiPractic 2015 - Adroid Pro - Day 5 - SQL DayFiiPractic 2015 - Adroid Pro - Day 5 - SQL Day
FiiPractic 2015 - Adroid Pro - Day 5 - SQL Day
 
FiiPractic 2015 - Adroid Pro - Day 3 - API Day
FiiPractic 2015 - Adroid Pro - Day 3 - API DayFiiPractic 2015 - Adroid Pro - Day 3 - API Day
FiiPractic 2015 - Adroid Pro - Day 3 - API Day
 
FiiPractic 2015 - Adroid Pro - Day 1 - UI Day
FiiPractic 2015 - Adroid Pro - Day 1 - UI DayFiiPractic 2015 - Adroid Pro - Day 1 - UI Day
FiiPractic 2015 - Adroid Pro - Day 1 - UI Day
 

Último

CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
anilsa9823
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
anilsa9823
 

Último (7)

9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7
 
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
 

Mobile testing in the cloud