SlideShare uma empresa Scribd logo
1 de 64
Baixar para ler offline
© Zan Markan 2016 - @zmarkan
Android Testing Support Library
The Nitty Gritty
© Zan Markan 2016 - @zmarkan
Testing 101
• on JVM vs on device
• unit / integration / functional / end to end
• Robolectric, Calabash, Instrumentation, Robotium,
Appium
© Zan Markan 2016 - @zmarkan
"Support"
• Android framework vs Support libraries
• Trend to unbundle
• support-v4, appcompat-v7, recyclerview, ...
© Zan Markan 2016 - @zmarkan
"The support library is
basically a mountain
of hacks"
— Chris Banes, Google
© Zan Markan 2016 - @zmarkan
Android Testing
Support Library
© Zan Markan 2016 - @zmarkan
Good Old Times...
• jUnit3 syntax
• Remember
ActivityInstrumentationTestCase2<MainActi
vit>?
© Zan Markan 2016 - @zmarkan
More jUnit3 goodness
• overriding setUp() and tearDown()
• testPrefixedMethods() &
test_prefixedMethods()
• Ignorance Inheritance is bliss
© Zan Markan 2016 - @zmarkan
Welcome to the present
• jUnit4 syntax
• No more extending
• @Test, @Before, @After, @AfterClass,...
• ActivityTestRule, InstrumentationRegistry
© Zan Markan 2016 - @zmarkan
What else is in there?
• Espresso
• More Espresso (there's a lot to it)
• UIAutomator
• Test Runner
• Test Rules
• ...
© Zan Markan 2016 - @zmarkan
What else is in there?
© Zan Markan 2016 - @zmarkan
But First...The setup
(note: AS does that on it's own if you create a new project -
these instructions will mostly apply for legacy projects)
© Zan Markan 2016 - @zmarkan
Gradle
• Set your test runner to be AndroidJUnitRunner
• Add dependencies
• Voila!
© Zan Markan 2016 - @zmarkan
Error:Conflict with dependency 'com.android.support:support-annotations'.
Resolved versions for app (23.2.1) and test app (23.1.1) differ.
See http://g.co/androidstudio/app-test-app-conflict for details.
© Zan Markan 2016 - @zmarkan
Gradle
• Set your test runner to be AndroidJUnitRunner
• Add dependencies
• Voila!
• Resolve dependencies
© Zan Markan 2016 - @zmarkan
Dependency resolutions
• App and Test app depend on different lib versions
• Run ./gradlew :app:dependencies
• ! in the compile and androidTestCompile tasks
© Zan Markan 2016 - @zmarkan
Resolve with
• Force dependency versions in the test APK
• exclude dependency (everywhere applicable)
• use Resolution strategy
© Zan Markan 2016 - @zmarkan
Force versions in test APK
// Resolve conflicts between main and test APK:
androidTestCompile "com.android.support:support-annotations:$rootProject.supportLibraryVersion"
androidTestCompile "com.android.support:support-v4:$rootProject.supportLibraryVersion"
Source: github.com/googlesamples/android-
architecture/blob/todo-mvp/todoapp/app/build.gradle
© Zan Markan 2016 - @zmarkan
Gradle
• Set your test runner to be AndroidJUnitRunner
• Add dependencies
• Resolve dependencies
• Voila!
© Zan Markan 2016 - @zmarkan
© Zan Markan 2016 - @zmarkan
Espresso - components
• View interactions & assertions
• Hamcrest syntax
• No (unnecessary) waits
© Zan Markan 2016 - @zmarkan
Espresso - API
Cheat sheet:
google.github.io/android-testing-support-library/docs/
espresso/cheatsheet
© Zan Markan 2016 - @zmarkan
Poking the screen
onView(withId(R.id.button)).perform(click());
© Zan Markan 2016 - @zmarkan
Poking the screen
onView(withId(R.id.button)).perform(click());
• allOf, anyOf, ...
• withParent, withText...
• isDisplayed, isDialog...
© Zan Markan 2016 - @zmarkan
Espresso - contrib
• RecyclerView
• Drawers
• Pickers
• Accessibility
© Zan Markan 2016 - @zmarkan
Espresso++
• Custom matchers
• Custom ViewActions
• Idling resources
• Page objects
• Intent mocking
© Zan Markan 2016 - @zmarkan
Custom matchers
• Find a view in the hierarchy
• Good for custom views & components
• Override:
• describeTo
• matchesSafely
© Zan Markan 2016 - @zmarkan
Custom matchers
interface MyView{
boolean hasCustomProperty();
}
static BoundedMatcher withCustomPropery() {
return new BoundedMatcher<Object, MyView>(MyView.class){
@Override
public void describeTo(Description description) {
description.appendText("Custom property is enabled");
}
@Override
protected boolean matchesSafely(MyView item) {
return item.hasCustomProperty();
}
};
}
© Zan Markan 2016 - @zmarkan
Custom ViewActions
• Same story as matchers, just a bit more extensive
• example allows us to scroll in NestedScrollView
• github.com/zmarkan/Android-Espresso-
ScrollableScroll
© Zan Markan 2016 - @zmarkan
Custom ViewActions - API
public class ScrollableUtils {
public static ViewAction scrollableScrollTo() {
return actionWithAssertions(new ScrollableScrollToAction());
}
}
© Zan Markan 2016 - @zmarkan
Implementation...
public class ScrollableScrollToAction implements ViewAction{
private static final String TAG = com.zmarkan.nestedscroll.action.ScrollableScrollToAction.class.getSimpleName();
@SuppressWarnings("unchecked")
@Override
public Matcher<View> getConstraints() {
return allOf(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE), isDescendantOfA(anyOf(
isAssignableFromClassOrInterface(ScrollingView.class))));
}
@Override
public void perform(UiController uiController, View view) {
if (isDisplayingAtLeast(90).matches(view)) {
Log.i(TAG, "View is already displayed. Returning.");
return;
}
Rect rect = new Rect();
view.getDrawingRect(rect);
if (!view.requestRectangleOnScreen(rect, true /* immediate */)) {
Log.w(TAG, "Scrolling to view was requested, but none of the parents scrolled.");
}
uiController.loopMainThreadUntilIdle();
if (!isDisplayingAtLeast(90).matches(view)) {
throw new PerformException.Builder()
.withActionDescription(this.getDescription())
.withViewDescription(HumanReadables.describe(view))
.withCause(new RuntimeException(
"Scrolling to view was attempted, but the view is not displayed"))
.build();
}
}
@Override
public String getDescription() {
return "scroll to";
}
}
© Zan Markan 2016 - @zmarkan
Implementation...
@Override
public Matcher<View> getConstraints() {
return allOf(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE), isDescendantOfA(anyOf(
isAssignableFromClassOrInterface(ScrollingView.class))));
}
© Zan Markan 2016 - @zmarkan
Implementation...
@Override
public void perform(UiController uiController, View view) {
if (isDisplayingAtLeast(90).matches(view)) {
Log.i(TAG, "View is already displayed. Returning.");
return;
}
Rect rect = new Rect();
view.getDrawingRect(rect);
if (!view.requestRectangleOnScreen(rect, true /* immediate */)) {
Log.w(TAG, "Scrolling to view was requested, but none of the parents scrolled.");
}
uiController.loopMainThreadUntilIdle();
if (!isDisplayingAtLeast(90).matches(view)) {
throw new PerformException.Builder()
.withActionDescription(this.getDescription())
.withViewDescription(HumanReadables.describe(view))
.withCause(new RuntimeException(
"Scrolling to view was attempted, but the view is not displayed"))
.build();
}
}
© Zan Markan 2016 - @zmarkan
Don't panic.
• Take something that works
• ...like scrollTo() in regular Espresso for ScrollView
• modify it
• profit
© Zan Markan 2016 - @zmarkan
Custom IdlingResource
• A better way to wait
• Use when you have background stuff going on
• Override:
• getName
• isIdleNow
• registerIdleTransitionCallback
© Zan Markan 2016 - @zmarkan
Custom IdlingResource
public class CustomIdlingResource implements IdlingResource{
private ResourceCallback resourceCallback;
private EventBus bus;
private boolean loadingCompleted = false;
public CustomIdlingResource(EventBus bus){
bus.register(this);
}
public void onEvent(LoadingCompletedEvent event){
loadingCompleted = true;
isIdleNow();
}
}
© Zan Markan 2016 - @zmarkan
Custom IdlingResource
@Override
public String getName() {
return CustomIdlingResource.class.getName();
}
@Override
public void registerIdleTransitionCallback(
ResourceCallback resourceCallback) {
this.resourceCallback = resourceCallback;
}
@Override
public boolean isIdleNow() {
boolean idle = loadingCompleted;
if (idle && resourceCallback != null) {
resourceCallback.onTransitionToIdle();
bus.unregister(this);
}
return idle;
}
}
© Zan Markan 2016 - @zmarkan
Page Object Pattern
• Build your own DSL
• Every screen is a Page
• Page-specific actions and verifications
• (as seen in Calabash, etc...)
© Zan Markan 2016 - @zmarkan
Page Class
public class MainViewTestUtils {
public void enterUserName(String text){
/* espresso goes here
*/ }
public void enterPassword(String text){
/* ... */ }
public void pressContinue(){
/* ... */ }
public void assertErrorShown(boolean shown){ /* ... */ }
}
© Zan Markan 2016 - @zmarkan
Page Class in test
@Test
public void errorShownWhenPasswordIncorrect(){
MainViewTestUtils view = new MainViewTestUtils();
view.enterUsername(username);
view.enterPassword(incorrectPassword);
view.pressContinue();
view.assertErrorShown(true);
}
© Zan Markan 2016 - @zmarkan
To boldly go...
© Zan Markan 2016 - @zmarkan
UI Automator
• Interact with any installed app
• Use to create full end-to-end tests
• Can coexist with Espresso in the same app
• Use uiautomatorviewer command to find items in
the hierarchy
© Zan Markan 2016 - @zmarkan
UI Automator viewer
© Zan Markan 2016 - @zmarkan
UI Automator syntax
UiDevice device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation();
device.pressHome();
device.findObject(new UiSelector().descriptionContains("Google search")).clickAndWaitForNewWindow();
© Zan Markan 2016 - @zmarkan
Test Runner
© Zan Markan 2016 - @zmarkan
Test Runner
• Spins up tests...
• and runs them
• Customise to prepare mocks
• Easier run/debug via command line
© Zan Markan 2016 - @zmarkan
Extending the Runner
• Use custom Application class
• Provide mocked dependencies
• Specify this new runner in build.gradle
• Kotlin Test Runner
© Zan Markan 2016 - @zmarkan
Extending the Runner
public class CustomRunner extends AndroidJUnitRunner{
@Override
public Application newApplication(ClassLoader cl, String className, Context context)
throws InstantiationException, IllegalAccessException, ClassNotFoundException {
return Instrumentation.newApplication(TestApplication.class, context);
}
}
© Zan Markan 2016 - @zmarkan
Running on the Command
line
• Run module/package/class/method
• Run Large/Medium/Small test only
• Shard to run in parallel
• Debug without reinstalling
© Zan Markan 2016 - @zmarkan
Simple API
• send commands to runner via ADB (adb shell
[commands])
• am instrument -w -e class
your.full.classname#methodName
your.test.package.name/
your.test.Runner.class
• d.android.com/tools/testing/testing_otheride.html
© Zan Markan 2016 - @zmarkan
Test Rules
© Zan Markan 2016 - @zmarkan
Test Rules
• Set starting activity / Service
• Replace ActivityInstrumentationTestCase2
• (in most cases)
• Add / Extend to create more components
© Zan Markan 2016 - @zmarkan
Test Rules - examples
• MockWebServerRule - sets up MockWebServer
when required
• Source: github.com/artem-zinnatullin/
qualitymatters
© Zan Markan 2016 - @zmarkan
© Zan Markan 2016 - @zmarkan
Firebase test lab
• Simple setup
• CI support (via gcloud)
• Support for VMs
• firebase.google.com/docs/test-lab
• Robo test for automated testing
© Zan Markan 2016 - @zmarkan
Espresso Test
Recorder
• Since AS 2.2 preview 3
• Generates test code after clicking on screen
• (Not necessarily nice code)
• tools.android.com/tech-docs/test-recorder
© Zan Markan 2016 - @zmarkan
Above & Beyond?
• Espresso Web for WebViews
• JankTestHelper
• Stuff is being added.
© Zan Markan 2016 - @zmarkan
Best of all?
© Zan Markan 2016 - @zmarkan
It's all open source!
© Zan Markan 2016 - @zmarkan
Pusher
/ˈpʊʃ ər/
noun
1. Platform of APIs for building highly connected apps
2. Hiring in London !
© Zan Markan 2016 - @zmarkan
fin
• ! www.spacecowboyrocketcompany.com
• " @zmarkan
• # zan at markan dot me
• $ androidchat.co (zmarkan)
• %& @zmarkan
© Zan Markan 2016 - @zmarkan
© Zan Markan 2016 - @zmarkan
• google.github.io/android-testing-support-library/
contribute
• Quality Matters - Artem Zinnatulin
• d.android.com/tools/testing-support-library
• github.com/googlesamples/android-testing
• chiuki.github.io/advanced-android-espresso
© Zan Markan 2016 - @zmarkan
• Espresso: Brian Legate (Flickr)
• Hyperdrive: Youtube
• Road Runner: BrownZelip (Flickr)
• Back to the future: Youtube
• Titanic / unit tests passing: Twitter
© Zan Markan 2016 - @zmarkan

Mais conteúdo relacionado

Mais procurados

Overview of the AngularJS framework
Overview of the AngularJS framework Overview of the AngularJS framework
Overview of the AngularJS framework Yakov Fain
 
Using ReactJS in AngularJS
Using ReactJS in AngularJSUsing ReactJS in AngularJS
Using ReactJS in AngularJSBoris Dinkevich
 
Java Intro: Unit1. Hello World
Java Intro: Unit1. Hello WorldJava Intro: Unit1. Hello World
Java Intro: Unit1. Hello WorldYakov Fain
 
Test Driven Development with JavaFX
Test Driven Development with JavaFXTest Driven Development with JavaFX
Test Driven Development with JavaFXHendrik Ebbers
 
The Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.jsThe Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.jsNicholas Jansma
 
Cloud Foundy Java Client V 2.0 #cf_tokyo
Cloud Foundy Java Client V 2.0 #cf_tokyoCloud Foundy Java Client V 2.0 #cf_tokyo
Cloud Foundy Java Client V 2.0 #cf_tokyoToshiaki Maki
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Rich Web Experie...
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Rich Web Experie...Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Rich Web Experie...
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Rich Web Experie...Matt Raible
 
Vaadin and Spring at Devoxx UK 2015
Vaadin and Spring at Devoxx UK 2015Vaadin and Spring at Devoxx UK 2015
Vaadin and Spring at Devoxx UK 2015Sami Ekblad
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupalsparkfabrik
 
Zero downtime deploys for Rails apps
Zero downtime deploys for Rails appsZero downtime deploys for Rails apps
Zero downtime deploys for Rails appspedrobelo
 
Android Building, Testing and reversing
Android Building, Testing and reversingAndroid Building, Testing and reversing
Android Building, Testing and reversingEnrique López Mañas
 
The Modern Java Web Developer - JavaOne 2013
The Modern Java Web Developer - JavaOne 2013The Modern Java Web Developer - JavaOne 2013
The Modern Java Web Developer - JavaOne 2013Matt Raible
 
Enterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudEnterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudCarlos Sanchez
 
Spring Boot and Microservices
Spring Boot and MicroservicesSpring Boot and Microservices
Spring Boot and Microservicesseges
 

Mais procurados (20)

Overview of the AngularJS framework
Overview of the AngularJS framework Overview of the AngularJS framework
Overview of the AngularJS framework
 
Using ReactJS in AngularJS
Using ReactJS in AngularJSUsing ReactJS in AngularJS
Using ReactJS in AngularJS
 
Java Intro: Unit1. Hello World
Java Intro: Unit1. Hello WorldJava Intro: Unit1. Hello World
Java Intro: Unit1. Hello World
 
Test Driven Development with JavaFX
Test Driven Development with JavaFXTest Driven Development with JavaFX
Test Driven Development with JavaFX
 
Angular2 for Beginners
Angular2 for BeginnersAngular2 for Beginners
Angular2 for Beginners
 
Vue js and Dyploma
Vue js and DyplomaVue js and Dyploma
Vue js and Dyploma
 
The Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.jsThe Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.js
 
Cloud Foundy Java Client V 2.0 #cf_tokyo
Cloud Foundy Java Client V 2.0 #cf_tokyoCloud Foundy Java Client V 2.0 #cf_tokyo
Cloud Foundy Java Client V 2.0 #cf_tokyo
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Rich Web Experie...
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Rich Web Experie...Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Rich Web Experie...
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Rich Web Experie...
 
Vaadin and Spring at Devoxx UK 2015
Vaadin and Spring at Devoxx UK 2015Vaadin and Spring at Devoxx UK 2015
Vaadin and Spring at Devoxx UK 2015
 
Epoxy 介紹
Epoxy 介紹Epoxy 介紹
Epoxy 介紹
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupal
 
Zero downtime deploys for Rails apps
Zero downtime deploys for Rails appsZero downtime deploys for Rails apps
Zero downtime deploys for Rails apps
 
Android Building, Testing and reversing
Android Building, Testing and reversingAndroid Building, Testing and reversing
Android Building, Testing and reversing
 
The Modern Java Web Developer - JavaOne 2013
The Modern Java Web Developer - JavaOne 2013The Modern Java Web Developer - JavaOne 2013
The Modern Java Web Developer - JavaOne 2013
 
Enterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudEnterprise Build And Test In The Cloud
Enterprise Build And Test In The Cloud
 
Spring Boot and Microservices
Spring Boot and MicroservicesSpring Boot and Microservices
Spring Boot and Microservices
 
Spring boot
Spring bootSpring boot
Spring boot
 
Introduction of React.js
Introduction of React.jsIntroduction of React.js
Introduction of React.js
 
Spring Boot Tutorial
Spring Boot TutorialSpring Boot Tutorial
Spring Boot Tutorial
 

Destaque

Android Automation & Testing
Android Automation & TestingAndroid Automation & Testing
Android Automation & Testingsveinungkb
 
Hololens: Primo Contatto - Marco Dal Pino - Codemotion Milan 2016
Hololens: Primo Contatto - Marco Dal Pino - Codemotion Milan 2016Hololens: Primo Contatto - Marco Dal Pino - Codemotion Milan 2016
Hololens: Primo Contatto - Marco Dal Pino - Codemotion Milan 2016Codemotion
 
Nobody likes working with you - Luigi G. Valle - Codemotion Milan 2016
Nobody likes working with you - Luigi G. Valle - Codemotion Milan 2016Nobody likes working with you - Luigi G. Valle - Codemotion Milan 2016
Nobody likes working with you - Luigi G. Valle - Codemotion Milan 2016Codemotion
 
Hearthstone: an analysis of game network protocols - Marco Cuciniello, Andrea...
Hearthstone: an analysis of game network protocols - Marco Cuciniello, Andrea...Hearthstone: an analysis of game network protocols - Marco Cuciniello, Andrea...
Hearthstone: an analysis of game network protocols - Marco Cuciniello, Andrea...Codemotion
 
Put yourself in the appsec pipe - Paolo Perego - Codemotion Milan 2016
Put yourself in the appsec pipe - Paolo Perego - Codemotion Milan 2016Put yourself in the appsec pipe - Paolo Perego - Codemotion Milan 2016
Put yourself in the appsec pipe - Paolo Perego - Codemotion Milan 2016Codemotion
 
Virtual Reality gaming: analysis of Yon Paradox development - Fabio Mosca - C...
Virtual Reality gaming: analysis of Yon Paradox development - Fabio Mosca - C...Virtual Reality gaming: analysis of Yon Paradox development - Fabio Mosca - C...
Virtual Reality gaming: analysis of Yon Paradox development - Fabio Mosca - C...Codemotion
 
Pronti per la legge sulla data protection GDPR? No Panic! - Stefano Sali, Dom...
Pronti per la legge sulla data protection GDPR? No Panic! - Stefano Sali, Dom...Pronti per la legge sulla data protection GDPR? No Panic! - Stefano Sali, Dom...
Pronti per la legge sulla data protection GDPR? No Panic! - Stefano Sali, Dom...Codemotion
 
Keynote: Community Innovation Alaina Percival - Codemotion Milan 2016
Keynote: Community Innovation Alaina Percival - Codemotion Milan 2016Keynote: Community Innovation Alaina Percival - Codemotion Milan 2016
Keynote: Community Innovation Alaina Percival - Codemotion Milan 2016Codemotion
 
Keynote: The Most Important Thing - Mike Lee - Codemotion Milan 2016
Keynote: The Most Important Thing - Mike Lee - Codemotion Milan 2016Keynote: The Most Important Thing - Mike Lee - Codemotion Milan 2016
Keynote: The Most Important Thing - Mike Lee - Codemotion Milan 2016Codemotion
 
The game design behind Redout - Giuseppe Enrico Franchi - Codemotion Milan 2016
The game design behind Redout - Giuseppe Enrico Franchi - Codemotion Milan 2016The game design behind Redout - Giuseppe Enrico Franchi - Codemotion Milan 2016
The game design behind Redout - Giuseppe Enrico Franchi - Codemotion Milan 2016Codemotion
 
Wearable Botnets and Happy Hacked Drivers - Andrea Pompili - Codemotion Milan...
Wearable Botnets and Happy Hacked Drivers - Andrea Pompili - Codemotion Milan...Wearable Botnets and Happy Hacked Drivers - Andrea Pompili - Codemotion Milan...
Wearable Botnets and Happy Hacked Drivers - Andrea Pompili - Codemotion Milan...Codemotion
 
Milano Chatbots Meetup - Paolo Montrasio - Codemotion Milan 2016
Milano Chatbots Meetup - Paolo Montrasio - Codemotion Milan 2016Milano Chatbots Meetup - Paolo Montrasio - Codemotion Milan 2016
Milano Chatbots Meetup - Paolo Montrasio - Codemotion Milan 2016Codemotion
 
Elixir and Lambda talk with a Telegram bot - Paolo Montrasio - Codemotion Mil...
Elixir and Lambda talk with a Telegram bot - Paolo Montrasio - Codemotion Mil...Elixir and Lambda talk with a Telegram bot - Paolo Montrasio - Codemotion Mil...
Elixir and Lambda talk with a Telegram bot - Paolo Montrasio - Codemotion Mil...Codemotion
 
Games of Simplicity - Pozzi; Molinari - Codemotion Milan 2016
Games of Simplicity - Pozzi; Molinari - Codemotion Milan 2016Games of Simplicity - Pozzi; Molinari - Codemotion Milan 2016
Games of Simplicity - Pozzi; Molinari - Codemotion Milan 2016Codemotion
 
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...Codemotion
 
Public speaking 4 geeks - Lorenzo Barbieri - Codemotion Milan 2016
Public speaking 4 geeks - Lorenzo Barbieri - Codemotion Milan 2016Public speaking 4 geeks - Lorenzo Barbieri - Codemotion Milan 2016
Public speaking 4 geeks - Lorenzo Barbieri - Codemotion Milan 2016Codemotion
 
Big Data, Small Dashboard - Andrea Maietta - Codemotion Milan 2016
Big Data, Small Dashboard - Andrea Maietta - Codemotion Milan 2016Big Data, Small Dashboard - Andrea Maietta - Codemotion Milan 2016
Big Data, Small Dashboard - Andrea Maietta - Codemotion Milan 2016Codemotion
 
Microservices done right or SOA lessons learnt - Sean Farmar - Codemotion Mil...
Microservices done right or SOA lessons learnt - Sean Farmar - Codemotion Mil...Microservices done right or SOA lessons learnt - Sean Farmar - Codemotion Mil...
Microservices done right or SOA lessons learnt - Sean Farmar - Codemotion Mil...Codemotion
 
Come rendere il proprio prodotto una bomba creandogli una intera community in...
Come rendere il proprio prodotto una bomba creandogli una intera community in...Come rendere il proprio prodotto una bomba creandogli una intera community in...
Come rendere il proprio prodotto una bomba creandogli una intera community in...Codemotion
 
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016Codemotion
 

Destaque (20)

Android Automation & Testing
Android Automation & TestingAndroid Automation & Testing
Android Automation & Testing
 
Hololens: Primo Contatto - Marco Dal Pino - Codemotion Milan 2016
Hololens: Primo Contatto - Marco Dal Pino - Codemotion Milan 2016Hololens: Primo Contatto - Marco Dal Pino - Codemotion Milan 2016
Hololens: Primo Contatto - Marco Dal Pino - Codemotion Milan 2016
 
Nobody likes working with you - Luigi G. Valle - Codemotion Milan 2016
Nobody likes working with you - Luigi G. Valle - Codemotion Milan 2016Nobody likes working with you - Luigi G. Valle - Codemotion Milan 2016
Nobody likes working with you - Luigi G. Valle - Codemotion Milan 2016
 
Hearthstone: an analysis of game network protocols - Marco Cuciniello, Andrea...
Hearthstone: an analysis of game network protocols - Marco Cuciniello, Andrea...Hearthstone: an analysis of game network protocols - Marco Cuciniello, Andrea...
Hearthstone: an analysis of game network protocols - Marco Cuciniello, Andrea...
 
Put yourself in the appsec pipe - Paolo Perego - Codemotion Milan 2016
Put yourself in the appsec pipe - Paolo Perego - Codemotion Milan 2016Put yourself in the appsec pipe - Paolo Perego - Codemotion Milan 2016
Put yourself in the appsec pipe - Paolo Perego - Codemotion Milan 2016
 
Virtual Reality gaming: analysis of Yon Paradox development - Fabio Mosca - C...
Virtual Reality gaming: analysis of Yon Paradox development - Fabio Mosca - C...Virtual Reality gaming: analysis of Yon Paradox development - Fabio Mosca - C...
Virtual Reality gaming: analysis of Yon Paradox development - Fabio Mosca - C...
 
Pronti per la legge sulla data protection GDPR? No Panic! - Stefano Sali, Dom...
Pronti per la legge sulla data protection GDPR? No Panic! - Stefano Sali, Dom...Pronti per la legge sulla data protection GDPR? No Panic! - Stefano Sali, Dom...
Pronti per la legge sulla data protection GDPR? No Panic! - Stefano Sali, Dom...
 
Keynote: Community Innovation Alaina Percival - Codemotion Milan 2016
Keynote: Community Innovation Alaina Percival - Codemotion Milan 2016Keynote: Community Innovation Alaina Percival - Codemotion Milan 2016
Keynote: Community Innovation Alaina Percival - Codemotion Milan 2016
 
Keynote: The Most Important Thing - Mike Lee - Codemotion Milan 2016
Keynote: The Most Important Thing - Mike Lee - Codemotion Milan 2016Keynote: The Most Important Thing - Mike Lee - Codemotion Milan 2016
Keynote: The Most Important Thing - Mike Lee - Codemotion Milan 2016
 
The game design behind Redout - Giuseppe Enrico Franchi - Codemotion Milan 2016
The game design behind Redout - Giuseppe Enrico Franchi - Codemotion Milan 2016The game design behind Redout - Giuseppe Enrico Franchi - Codemotion Milan 2016
The game design behind Redout - Giuseppe Enrico Franchi - Codemotion Milan 2016
 
Wearable Botnets and Happy Hacked Drivers - Andrea Pompili - Codemotion Milan...
Wearable Botnets and Happy Hacked Drivers - Andrea Pompili - Codemotion Milan...Wearable Botnets and Happy Hacked Drivers - Andrea Pompili - Codemotion Milan...
Wearable Botnets and Happy Hacked Drivers - Andrea Pompili - Codemotion Milan...
 
Milano Chatbots Meetup - Paolo Montrasio - Codemotion Milan 2016
Milano Chatbots Meetup - Paolo Montrasio - Codemotion Milan 2016Milano Chatbots Meetup - Paolo Montrasio - Codemotion Milan 2016
Milano Chatbots Meetup - Paolo Montrasio - Codemotion Milan 2016
 
Elixir and Lambda talk with a Telegram bot - Paolo Montrasio - Codemotion Mil...
Elixir and Lambda talk with a Telegram bot - Paolo Montrasio - Codemotion Mil...Elixir and Lambda talk with a Telegram bot - Paolo Montrasio - Codemotion Mil...
Elixir and Lambda talk with a Telegram bot - Paolo Montrasio - Codemotion Mil...
 
Games of Simplicity - Pozzi; Molinari - Codemotion Milan 2016
Games of Simplicity - Pozzi; Molinari - Codemotion Milan 2016Games of Simplicity - Pozzi; Molinari - Codemotion Milan 2016
Games of Simplicity - Pozzi; Molinari - Codemotion Milan 2016
 
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...
 
Public speaking 4 geeks - Lorenzo Barbieri - Codemotion Milan 2016
Public speaking 4 geeks - Lorenzo Barbieri - Codemotion Milan 2016Public speaking 4 geeks - Lorenzo Barbieri - Codemotion Milan 2016
Public speaking 4 geeks - Lorenzo Barbieri - Codemotion Milan 2016
 
Big Data, Small Dashboard - Andrea Maietta - Codemotion Milan 2016
Big Data, Small Dashboard - Andrea Maietta - Codemotion Milan 2016Big Data, Small Dashboard - Andrea Maietta - Codemotion Milan 2016
Big Data, Small Dashboard - Andrea Maietta - Codemotion Milan 2016
 
Microservices done right or SOA lessons learnt - Sean Farmar - Codemotion Mil...
Microservices done right or SOA lessons learnt - Sean Farmar - Codemotion Mil...Microservices done right or SOA lessons learnt - Sean Farmar - Codemotion Mil...
Microservices done right or SOA lessons learnt - Sean Farmar - Codemotion Mil...
 
Come rendere il proprio prodotto una bomba creandogli una intera community in...
Come rendere il proprio prodotto una bomba creandogli una intera community in...Come rendere il proprio prodotto una bomba creandogli una intera community in...
Come rendere il proprio prodotto una bomba creandogli una intera community in...
 
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
 

Semelhante a Android Testing Support Library: The Nitty Gritty - Zan Markan - Codemotion Milan 2016

Kick Start your Application Development and Management Strategy
Kick Start your Application Development and Management Strategy Kick Start your Application Development and Management Strategy
Kick Start your Application Development and Management Strategy WSO2
 
Reactive microservices with Micronaut - Greach 2018
Reactive microservices with Micronaut - Greach 2018Reactive microservices with Micronaut - Greach 2018
Reactive microservices with Micronaut - Greach 2018Alvaro Sanchez-Mariscal
 
Reactive microservices with Micronaut - GR8Conf EU 2018
Reactive microservices with Micronaut - GR8Conf EU 2018Reactive microservices with Micronaut - GR8Conf EU 2018
Reactive microservices with Micronaut - GR8Conf EU 2018Alvaro Sanchez-Mariscal
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introductionRasheed Waraich
 
Bootiful Reactive Testing - Mario Gray
Bootiful Reactive Testing - Mario GrayBootiful Reactive Testing - Mario Gray
Bootiful Reactive Testing - Mario GrayVMware Tanzu
 
Patterns Are Good For Managers
Patterns Are Good For ManagersPatterns Are Good For Managers
Patterns Are Good For ManagersAgileThought
 
Spring Cloud Function — Going Serverless
Spring Cloud Function — Going ServerlessSpring Cloud Function — Going Serverless
Spring Cloud Function — Going ServerlessGlobalLogic Ukraine
 
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller Patroklos Papapetrou (Pat)
 
Voxxed Days Thessaloniki 2016 - Keynote - JDK 9 : Big Changes To Make Java Sm...
Voxxed Days Thessaloniki 2016 - Keynote - JDK 9 : Big Changes To Make Java Sm...Voxxed Days Thessaloniki 2016 - Keynote - JDK 9 : Big Changes To Make Java Sm...
Voxxed Days Thessaloniki 2016 - Keynote - JDK 9 : Big Changes To Make Java Sm...Voxxed Days Thessaloniki
 
Migrate Early, Migrate Often: JDK release cadence strategies
Migrate Early, Migrate Often: JDK release cadence strategiesMigrate Early, Migrate Often: JDK release cadence strategies
Migrate Early, Migrate Often: JDK release cadence strategiesDanHeidinga
 
Single Page Application JS Framework Round up
Single Page Application JS Framework Round upSingle Page Application JS Framework Round up
Single Page Application JS Framework Round upFrank Duan
 
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...HostedbyConfluent
 
JDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java SmallerJDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java SmallerSimon Ritter
 
Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Doris Chen
 
Using Automatic Refactoring to Improve Energy Efficiency of Android Apps
Using Automatic Refactoring to Improve Energy Efficiency of Android AppsUsing Automatic Refactoring to Improve Energy Efficiency of Android Apps
Using Automatic Refactoring to Improve Energy Efficiency of Android AppsLuis Cruz
 
Spring Orielly
Spring OriellySpring Orielly
Spring Oriellyjbashask
 
Spring Cloud Servicesの紹介 #pcf_tokyo
Spring Cloud Servicesの紹介 #pcf_tokyoSpring Cloud Servicesの紹介 #pcf_tokyo
Spring Cloud Servicesの紹介 #pcf_tokyoToshiaki Maki
 

Semelhante a Android Testing Support Library: The Nitty Gritty - Zan Markan - Codemotion Milan 2016 (20)

Jigsaw modularity
Jigsaw modularityJigsaw modularity
Jigsaw modularity
 
Kick Start your Application Development and Management Strategy
Kick Start your Application Development and Management Strategy Kick Start your Application Development and Management Strategy
Kick Start your Application Development and Management Strategy
 
Reactive microservices with Micronaut - Greach 2018
Reactive microservices with Micronaut - Greach 2018Reactive microservices with Micronaut - Greach 2018
Reactive microservices with Micronaut - Greach 2018
 
Reactive microservices with Micronaut - GR8Conf EU 2018
Reactive microservices with Micronaut - GR8Conf EU 2018Reactive microservices with Micronaut - GR8Conf EU 2018
Reactive microservices with Micronaut - GR8Conf EU 2018
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introduction
 
Bootiful Reactive Testing - Mario Gray
Bootiful Reactive Testing - Mario GrayBootiful Reactive Testing - Mario Gray
Bootiful Reactive Testing - Mario Gray
 
Patterns Are Good For Managers
Patterns Are Good For ManagersPatterns Are Good For Managers
Patterns Are Good For Managers
 
Spring Cloud Function — Going Serverless
Spring Cloud Function — Going ServerlessSpring Cloud Function — Going Serverless
Spring Cloud Function — Going Serverless
 
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
 
Voxxed Days Thessaloniki 2016 - Keynote - JDK 9 : Big Changes To Make Java Sm...
Voxxed Days Thessaloniki 2016 - Keynote - JDK 9 : Big Changes To Make Java Sm...Voxxed Days Thessaloniki 2016 - Keynote - JDK 9 : Big Changes To Make Java Sm...
Voxxed Days Thessaloniki 2016 - Keynote - JDK 9 : Big Changes To Make Java Sm...
 
Migrate Early, Migrate Often: JDK release cadence strategies
Migrate Early, Migrate Often: JDK release cadence strategiesMigrate Early, Migrate Often: JDK release cadence strategies
Migrate Early, Migrate Often: JDK release cadence strategies
 
Single Page Application JS Framework Round up
Single Page Application JS Framework Round upSingle Page Application JS Framework Round up
Single Page Application JS Framework Round up
 
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
Developing Kafka Streams Applications with Upgradability in Mind with Neil Bu...
 
JDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java SmallerJDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java Smaller
 
Scala.js
Scala.jsScala.js
Scala.js
 
Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!
 
Os Haase
Os HaaseOs Haase
Os Haase
 
Using Automatic Refactoring to Improve Energy Efficiency of Android Apps
Using Automatic Refactoring to Improve Energy Efficiency of Android AppsUsing Automatic Refactoring to Improve Energy Efficiency of Android Apps
Using Automatic Refactoring to Improve Energy Efficiency of Android Apps
 
Spring Orielly
Spring OriellySpring Orielly
Spring Orielly
 
Spring Cloud Servicesの紹介 #pcf_tokyo
Spring Cloud Servicesの紹介 #pcf_tokyoSpring Cloud Servicesの紹介 #pcf_tokyo
Spring Cloud Servicesの紹介 #pcf_tokyo
 

Mais de Codemotion

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Codemotion
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyCodemotion
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaCodemotion
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserCodemotion
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Codemotion
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Codemotion
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Codemotion
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 - Codemotion
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Codemotion
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Codemotion
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Codemotion
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Codemotion
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Codemotion
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Codemotion
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Codemotion
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...Codemotion
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Codemotion
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Codemotion
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Codemotion
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Codemotion
 

Mais de Codemotion (20)

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending story
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storia
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard Altwasser
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
 

Último

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Último (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Android Testing Support Library: The Nitty Gritty - Zan Markan - Codemotion Milan 2016

  • 1. © Zan Markan 2016 - @zmarkan
  • 2. Android Testing Support Library The Nitty Gritty © Zan Markan 2016 - @zmarkan
  • 3. Testing 101 • on JVM vs on device • unit / integration / functional / end to end • Robolectric, Calabash, Instrumentation, Robotium, Appium © Zan Markan 2016 - @zmarkan
  • 4. "Support" • Android framework vs Support libraries • Trend to unbundle • support-v4, appcompat-v7, recyclerview, ... © Zan Markan 2016 - @zmarkan
  • 5. "The support library is basically a mountain of hacks" — Chris Banes, Google © Zan Markan 2016 - @zmarkan
  • 6. Android Testing Support Library © Zan Markan 2016 - @zmarkan
  • 7. Good Old Times... • jUnit3 syntax • Remember ActivityInstrumentationTestCase2<MainActi vit>? © Zan Markan 2016 - @zmarkan
  • 8. More jUnit3 goodness • overriding setUp() and tearDown() • testPrefixedMethods() & test_prefixedMethods() • Ignorance Inheritance is bliss © Zan Markan 2016 - @zmarkan
  • 9. Welcome to the present • jUnit4 syntax • No more extending • @Test, @Before, @After, @AfterClass,... • ActivityTestRule, InstrumentationRegistry © Zan Markan 2016 - @zmarkan
  • 10. What else is in there? • Espresso • More Espresso (there's a lot to it) • UIAutomator • Test Runner • Test Rules • ... © Zan Markan 2016 - @zmarkan
  • 11. What else is in there? © Zan Markan 2016 - @zmarkan
  • 12. But First...The setup (note: AS does that on it's own if you create a new project - these instructions will mostly apply for legacy projects) © Zan Markan 2016 - @zmarkan
  • 13. Gradle • Set your test runner to be AndroidJUnitRunner • Add dependencies • Voila! © Zan Markan 2016 - @zmarkan
  • 14. Error:Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (23.2.1) and test app (23.1.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details. © Zan Markan 2016 - @zmarkan
  • 15. Gradle • Set your test runner to be AndroidJUnitRunner • Add dependencies • Voila! • Resolve dependencies © Zan Markan 2016 - @zmarkan
  • 16. Dependency resolutions • App and Test app depend on different lib versions • Run ./gradlew :app:dependencies • ! in the compile and androidTestCompile tasks © Zan Markan 2016 - @zmarkan
  • 17. Resolve with • Force dependency versions in the test APK • exclude dependency (everywhere applicable) • use Resolution strategy © Zan Markan 2016 - @zmarkan
  • 18. Force versions in test APK // Resolve conflicts between main and test APK: androidTestCompile "com.android.support:support-annotations:$rootProject.supportLibraryVersion" androidTestCompile "com.android.support:support-v4:$rootProject.supportLibraryVersion" Source: github.com/googlesamples/android- architecture/blob/todo-mvp/todoapp/app/build.gradle © Zan Markan 2016 - @zmarkan
  • 19. Gradle • Set your test runner to be AndroidJUnitRunner • Add dependencies • Resolve dependencies • Voila! © Zan Markan 2016 - @zmarkan
  • 20. © Zan Markan 2016 - @zmarkan
  • 21. Espresso - components • View interactions & assertions • Hamcrest syntax • No (unnecessary) waits © Zan Markan 2016 - @zmarkan
  • 22. Espresso - API Cheat sheet: google.github.io/android-testing-support-library/docs/ espresso/cheatsheet © Zan Markan 2016 - @zmarkan
  • 24. Poking the screen onView(withId(R.id.button)).perform(click()); • allOf, anyOf, ... • withParent, withText... • isDisplayed, isDialog... © Zan Markan 2016 - @zmarkan
  • 25. Espresso - contrib • RecyclerView • Drawers • Pickers • Accessibility © Zan Markan 2016 - @zmarkan
  • 26. Espresso++ • Custom matchers • Custom ViewActions • Idling resources • Page objects • Intent mocking © Zan Markan 2016 - @zmarkan
  • 27. Custom matchers • Find a view in the hierarchy • Good for custom views & components • Override: • describeTo • matchesSafely © Zan Markan 2016 - @zmarkan
  • 28. Custom matchers interface MyView{ boolean hasCustomProperty(); } static BoundedMatcher withCustomPropery() { return new BoundedMatcher<Object, MyView>(MyView.class){ @Override public void describeTo(Description description) { description.appendText("Custom property is enabled"); } @Override protected boolean matchesSafely(MyView item) { return item.hasCustomProperty(); } }; } © Zan Markan 2016 - @zmarkan
  • 29. Custom ViewActions • Same story as matchers, just a bit more extensive • example allows us to scroll in NestedScrollView • github.com/zmarkan/Android-Espresso- ScrollableScroll © Zan Markan 2016 - @zmarkan
  • 30. Custom ViewActions - API public class ScrollableUtils { public static ViewAction scrollableScrollTo() { return actionWithAssertions(new ScrollableScrollToAction()); } } © Zan Markan 2016 - @zmarkan
  • 31. Implementation... public class ScrollableScrollToAction implements ViewAction{ private static final String TAG = com.zmarkan.nestedscroll.action.ScrollableScrollToAction.class.getSimpleName(); @SuppressWarnings("unchecked") @Override public Matcher<View> getConstraints() { return allOf(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE), isDescendantOfA(anyOf( isAssignableFromClassOrInterface(ScrollingView.class)))); } @Override public void perform(UiController uiController, View view) { if (isDisplayingAtLeast(90).matches(view)) { Log.i(TAG, "View is already displayed. Returning."); return; } Rect rect = new Rect(); view.getDrawingRect(rect); if (!view.requestRectangleOnScreen(rect, true /* immediate */)) { Log.w(TAG, "Scrolling to view was requested, but none of the parents scrolled."); } uiController.loopMainThreadUntilIdle(); if (!isDisplayingAtLeast(90).matches(view)) { throw new PerformException.Builder() .withActionDescription(this.getDescription()) .withViewDescription(HumanReadables.describe(view)) .withCause(new RuntimeException( "Scrolling to view was attempted, but the view is not displayed")) .build(); } } @Override public String getDescription() { return "scroll to"; } } © Zan Markan 2016 - @zmarkan
  • 32. Implementation... @Override public Matcher<View> getConstraints() { return allOf(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE), isDescendantOfA(anyOf( isAssignableFromClassOrInterface(ScrollingView.class)))); } © Zan Markan 2016 - @zmarkan
  • 33. Implementation... @Override public void perform(UiController uiController, View view) { if (isDisplayingAtLeast(90).matches(view)) { Log.i(TAG, "View is already displayed. Returning."); return; } Rect rect = new Rect(); view.getDrawingRect(rect); if (!view.requestRectangleOnScreen(rect, true /* immediate */)) { Log.w(TAG, "Scrolling to view was requested, but none of the parents scrolled."); } uiController.loopMainThreadUntilIdle(); if (!isDisplayingAtLeast(90).matches(view)) { throw new PerformException.Builder() .withActionDescription(this.getDescription()) .withViewDescription(HumanReadables.describe(view)) .withCause(new RuntimeException( "Scrolling to view was attempted, but the view is not displayed")) .build(); } } © Zan Markan 2016 - @zmarkan
  • 34. Don't panic. • Take something that works • ...like scrollTo() in regular Espresso for ScrollView • modify it • profit © Zan Markan 2016 - @zmarkan
  • 35. Custom IdlingResource • A better way to wait • Use when you have background stuff going on • Override: • getName • isIdleNow • registerIdleTransitionCallback © Zan Markan 2016 - @zmarkan
  • 36. Custom IdlingResource public class CustomIdlingResource implements IdlingResource{ private ResourceCallback resourceCallback; private EventBus bus; private boolean loadingCompleted = false; public CustomIdlingResource(EventBus bus){ bus.register(this); } public void onEvent(LoadingCompletedEvent event){ loadingCompleted = true; isIdleNow(); } } © Zan Markan 2016 - @zmarkan
  • 37. Custom IdlingResource @Override public String getName() { return CustomIdlingResource.class.getName(); } @Override public void registerIdleTransitionCallback( ResourceCallback resourceCallback) { this.resourceCallback = resourceCallback; } @Override public boolean isIdleNow() { boolean idle = loadingCompleted; if (idle && resourceCallback != null) { resourceCallback.onTransitionToIdle(); bus.unregister(this); } return idle; } } © Zan Markan 2016 - @zmarkan
  • 38. Page Object Pattern • Build your own DSL • Every screen is a Page • Page-specific actions and verifications • (as seen in Calabash, etc...) © Zan Markan 2016 - @zmarkan
  • 39. Page Class public class MainViewTestUtils { public void enterUserName(String text){ /* espresso goes here */ } public void enterPassword(String text){ /* ... */ } public void pressContinue(){ /* ... */ } public void assertErrorShown(boolean shown){ /* ... */ } } © Zan Markan 2016 - @zmarkan
  • 40. Page Class in test @Test public void errorShownWhenPasswordIncorrect(){ MainViewTestUtils view = new MainViewTestUtils(); view.enterUsername(username); view.enterPassword(incorrectPassword); view.pressContinue(); view.assertErrorShown(true); } © Zan Markan 2016 - @zmarkan
  • 41. To boldly go... © Zan Markan 2016 - @zmarkan
  • 42. UI Automator • Interact with any installed app • Use to create full end-to-end tests • Can coexist with Espresso in the same app • Use uiautomatorviewer command to find items in the hierarchy © Zan Markan 2016 - @zmarkan
  • 43. UI Automator viewer © Zan Markan 2016 - @zmarkan
  • 44. UI Automator syntax UiDevice device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation(); device.pressHome(); device.findObject(new UiSelector().descriptionContains("Google search")).clickAndWaitForNewWindow(); © Zan Markan 2016 - @zmarkan
  • 45. Test Runner © Zan Markan 2016 - @zmarkan
  • 46. Test Runner • Spins up tests... • and runs them • Customise to prepare mocks • Easier run/debug via command line © Zan Markan 2016 - @zmarkan
  • 47. Extending the Runner • Use custom Application class • Provide mocked dependencies • Specify this new runner in build.gradle • Kotlin Test Runner © Zan Markan 2016 - @zmarkan
  • 48. Extending the Runner public class CustomRunner extends AndroidJUnitRunner{ @Override public Application newApplication(ClassLoader cl, String className, Context context) throws InstantiationException, IllegalAccessException, ClassNotFoundException { return Instrumentation.newApplication(TestApplication.class, context); } } © Zan Markan 2016 - @zmarkan
  • 49. Running on the Command line • Run module/package/class/method • Run Large/Medium/Small test only • Shard to run in parallel • Debug without reinstalling © Zan Markan 2016 - @zmarkan
  • 50. Simple API • send commands to runner via ADB (adb shell [commands]) • am instrument -w -e class your.full.classname#methodName your.test.package.name/ your.test.Runner.class • d.android.com/tools/testing/testing_otheride.html © Zan Markan 2016 - @zmarkan
  • 51. Test Rules © Zan Markan 2016 - @zmarkan
  • 52. Test Rules • Set starting activity / Service • Replace ActivityInstrumentationTestCase2 • (in most cases) • Add / Extend to create more components © Zan Markan 2016 - @zmarkan
  • 53. Test Rules - examples • MockWebServerRule - sets up MockWebServer when required • Source: github.com/artem-zinnatullin/ qualitymatters © Zan Markan 2016 - @zmarkan
  • 54. © Zan Markan 2016 - @zmarkan
  • 55. Firebase test lab • Simple setup • CI support (via gcloud) • Support for VMs • firebase.google.com/docs/test-lab • Robo test for automated testing © Zan Markan 2016 - @zmarkan
  • 56. Espresso Test Recorder • Since AS 2.2 preview 3 • Generates test code after clicking on screen • (Not necessarily nice code) • tools.android.com/tech-docs/test-recorder © Zan Markan 2016 - @zmarkan
  • 57. Above & Beyond? • Espresso Web for WebViews • JankTestHelper • Stuff is being added. © Zan Markan 2016 - @zmarkan
  • 58. Best of all? © Zan Markan 2016 - @zmarkan
  • 59. It's all open source! © Zan Markan 2016 - @zmarkan
  • 60. Pusher /ˈpʊʃ ər/ noun 1. Platform of APIs for building highly connected apps 2. Hiring in London ! © Zan Markan 2016 - @zmarkan
  • 61. fin • ! www.spacecowboyrocketcompany.com • " @zmarkan • # zan at markan dot me • $ androidchat.co (zmarkan) • %& @zmarkan © Zan Markan 2016 - @zmarkan
  • 62. © Zan Markan 2016 - @zmarkan
  • 63. • google.github.io/android-testing-support-library/ contribute • Quality Matters - Artem Zinnatulin • d.android.com/tools/testing-support-library • github.com/googlesamples/android-testing • chiuki.github.io/advanced-android-espresso © Zan Markan 2016 - @zmarkan
  • 64. • Espresso: Brian Legate (Flickr) • Hyperdrive: Youtube • Road Runner: BrownZelip (Flickr) • Back to the future: Youtube • Titanic / unit tests passing: Twitter © Zan Markan 2016 - @zmarkan