Test Driven Development with Spring Boot - Testing the Harder StuffVMware Tanzu
SpringOne Platform 2017
Madhura Bhave, Pivotal; Sannidhi Jalukar, Pivotal
Ever wonder how to test a hard problem like caching or write an integration test without making an external API call? Or come across a situation where testing something was so hard that it never got tested? A lot of developers today find themselves in situations where they are unsure of how to write light-weight unit tests. In our presentation, we will talk about how to do Test-driven development for a Spring Boot application and how some of the latest Spring Boot annotations and utilities make that easy. We will deep dive into some tricky real world testing scenarios that have baffled us in the past such as database queries, caching, reactive components, and message brokers.
Test Driven Development with Spring Boot - Testing the Harder StuffVMware Tanzu
SpringOne Platform 2017
Madhura Bhave, Pivotal; Sannidhi Jalukar, Pivotal
Ever wonder how to test a hard problem like caching or write an integration test without making an external API call? Or come across a situation where testing something was so hard that it never got tested? A lot of developers today find themselves in situations where they are unsure of how to write light-weight unit tests. In our presentation, we will talk about how to do Test-driven development for a Spring Boot application and how some of the latest Spring Boot annotations and utilities make that easy. We will deep dive into some tricky real world testing scenarios that have baffled us in the past such as database queries, caching, reactive components, and message brokers.
Engage and retain users in the android world - Droidcon Italy 2016Matteo Bonifazi
Making your app engaging, so that users who have installed it actually use it, is crucial to your app’s success. In this speech, we explore a number of Android and Google features you can take advantage of that help make your app a more useful and embedded part of the user’s Android experience.
A Separation of Concerns: Clean Architecture on AndroidOutware Mobile
Presented at YOW! Connected 2015 by Kamal Kamal Mohamed & Ryan Hodgman
As an Android developer, I want to deliver features without making compromises on code quality.
Scenario 1 - Given I am dealing with 1000+ line activities, When I have to develop a complicated feature, Then I waste time orienting myself and fixing bugs.
Scenario 2 - Given I have integrated a backend API directly into my app logic, When that API changes, Then I have to refactor large segments of unrelated logic in order to utilise the new API.
Scenario 3 - Given I have cleanly architected my application, When business/presentation/backend logic changes, Then I can easily update the relevant code without breaking unrelated features!
In this talk, two Android developers will present their take on what a cleanly architected app looks like and why it makes our lives easier. A well-defined separation of concerns has benefits not just for our sanity as developers, but also for the project workflow as it allows multiple developers to collaborate on a single feature with ease. We will be exploring how the domain-driven approach can improve code clarity, allow you to easily write tests, and provide a scalable infrastructure for you to quickly iterate on. Join us on our path of discovery as we discuss the advantages, drawbacks and implementation specifics in the context of a small sample project.
Mastering the NDK with Android Studio 2.0 and the gradle-experimental pluginXavier Hallade
Android Studio is finally fully supporting the NDK so you can easily integrate C/C++ inside Android applications.
While this support is still experimental, it’s promising and worth already doing the final jump from other IDEs and build systems.
After a short introduction on what is the NDK, learn how to use it from Android Studio while avoiding several classic pitfalls.
Crafting Great Hypotheses - Droidcon 2016Hoang Huynh
Building business apps is no joke.
As designers, we are often asked to create apps that have the wow factor, they need to be distinctive, and we are rarely appreciated when we create something pragmatic, something that simply works.
Moving forward in the face of uncertainty, it is essential to devise a plan, an UX roadmap that includes research, objectives and tests.
In a world where success is just when preparation meets opportunity, starting with ready to be validated solid hypotheses is the secret sauce to a project without risks. Are you a risk taker?
A realtime infrastructure for Android apps: Firebase may be what you need..an...Alessandro Martellucci
Growing up as Cloud Database, today supported by Google, it presents itself as a powerful platform for mobile and web applications.
These slides give you an overview and an introduction to the Firebase NoSQL database, how to integrate it into your Android app and how to put it into a realtime context!
Data Binding in Action using MVVM patternFabio Collini
The Data Binding framework was one of Google’s announcements at I/O 2015, it’s a big change in the code organization of an Android app. Some developers are sceptical about this framework but, if used in the “right way”, it’s very powerful and it allows to remove a lot of redundant boilerplate code from activities and fragments.
In this talk we’ll start from the Data Binding basic concepts and then we’ll see how to use it to improve the architecture of a typical Android application applying the Model View ViewModel pattern. Using this pattern you need to write less code to create an app that can be easily tested using JVM and instrumentation tests.
Android Clean Architecture for DummiesKengo Suzuki
Brief tutorial of implementing very primitive app(single list view) using Android Clean Architecture. It won't describe what and why, but rather, how to use it.
Continuous Delivery for Cross-Platform Mobile AppsMovel
The Cross-Platform Build Pipeline
• Check in code
• Run a build (compile)
• Run tests - Mocha, or Jasmine and Protractor after build
• Run Cordova build
• Create binary deployable files -> APK, IPA, XAP file (platform binaries)
• Deploy platform binary to a emulator
• Run functional tests on the emulator -> Espresso from Google, mock wire
• Signing or packaging
• Submit to test store (internal, beta testing)
• Send emails to beta testers with links to the app
MOPCON 2015 - Tips of Mobile Continuous Deliveryanistar sung
This deck was my sharing in MOPCON 2015. I told about some tips of continuous delivery in mobile development environment and what we did in Taiwan Yahoo. How to make a success strategy for mobile continuous delivery.
Continuous Delivery: Playing with Immutable servers @commitporto 2016João Cravo
Continuous Delivery is the trend process of the moment. It helps companies to deliver their products in a faster and trustful way.
Immutable Server is not a new concept. However, thanks to advent of IaaS like AWS, it becomes easier embrace the idea and use its amazing advantages.
Mindera tries to adopt these concepts in their projects. It has never been so cool to watch our CD pipeline build and destroy our application’s infrastructure. It's so awesome that we want to share it with you.
As your app code gets larger and more complex, it makes sense to break your project out into smaller reusable components. But what’s the best way to do this? How can you clearly version your internal libraries? What kind of setup and maintenance can you expect? How much could it slow down development time?
In this talk we’ll dive into the various ways you can manage internal library dependencies. We’ll chat about the current state of Android dependency management, Gradle multi-project builds, Git submodules, and creating a private maven repository in Artifactory. The speaker will share real-world examples, and the pros and cons of each approach.
Dave Liddament - международный спикер и разработчик в Lamp Bristol. Мы пригласили его выступить у нас на конференции 8 декабря с темой «Effective Code Review».
⠀
There are so many benefits from code review; lower development costs, increased code quality, quick up-skilling and on-boarding of team members. Despite these benefits many teams don’t have code review as part of their process at all. Others don’t get the gains they should from it.
⠀
This talk first outlines the business case for code review. It then explores how to make code review effective, specifically looking at:
⠀
• Expectations of what can be achieved with code review.
• What should be covered by code review (including example code)
• What should not be covered by code review
• How to write code that makes code review easy
• What makes good code review comments
• What makes good responses to code review comments
⠀
Finally to wrap up you'll be shown how to enable a code review with Github. Spoiler alert: It can be done it under 5 mins!So if you are on a team that isn’t using code review, or isn’t using it effectively then you should be at this talk.
CODEiD – это всеукраинское сообщество PHP-разработчиков. Наша цель — создать сильное сообщество всех, кто увлечен PHP-разработкой, и принимать в нашем уютном приморском городе коллег со всей Украины и мира.
Engage and retain users in the android world - Droidcon Italy 2016Matteo Bonifazi
Making your app engaging, so that users who have installed it actually use it, is crucial to your app’s success. In this speech, we explore a number of Android and Google features you can take advantage of that help make your app a more useful and embedded part of the user’s Android experience.
A Separation of Concerns: Clean Architecture on AndroidOutware Mobile
Presented at YOW! Connected 2015 by Kamal Kamal Mohamed & Ryan Hodgman
As an Android developer, I want to deliver features without making compromises on code quality.
Scenario 1 - Given I am dealing with 1000+ line activities, When I have to develop a complicated feature, Then I waste time orienting myself and fixing bugs.
Scenario 2 - Given I have integrated a backend API directly into my app logic, When that API changes, Then I have to refactor large segments of unrelated logic in order to utilise the new API.
Scenario 3 - Given I have cleanly architected my application, When business/presentation/backend logic changes, Then I can easily update the relevant code without breaking unrelated features!
In this talk, two Android developers will present their take on what a cleanly architected app looks like and why it makes our lives easier. A well-defined separation of concerns has benefits not just for our sanity as developers, but also for the project workflow as it allows multiple developers to collaborate on a single feature with ease. We will be exploring how the domain-driven approach can improve code clarity, allow you to easily write tests, and provide a scalable infrastructure for you to quickly iterate on. Join us on our path of discovery as we discuss the advantages, drawbacks and implementation specifics in the context of a small sample project.
Mastering the NDK with Android Studio 2.0 and the gradle-experimental pluginXavier Hallade
Android Studio is finally fully supporting the NDK so you can easily integrate C/C++ inside Android applications.
While this support is still experimental, it’s promising and worth already doing the final jump from other IDEs and build systems.
After a short introduction on what is the NDK, learn how to use it from Android Studio while avoiding several classic pitfalls.
Crafting Great Hypotheses - Droidcon 2016Hoang Huynh
Building business apps is no joke.
As designers, we are often asked to create apps that have the wow factor, they need to be distinctive, and we are rarely appreciated when we create something pragmatic, something that simply works.
Moving forward in the face of uncertainty, it is essential to devise a plan, an UX roadmap that includes research, objectives and tests.
In a world where success is just when preparation meets opportunity, starting with ready to be validated solid hypotheses is the secret sauce to a project without risks. Are you a risk taker?
A realtime infrastructure for Android apps: Firebase may be what you need..an...Alessandro Martellucci
Growing up as Cloud Database, today supported by Google, it presents itself as a powerful platform for mobile and web applications.
These slides give you an overview and an introduction to the Firebase NoSQL database, how to integrate it into your Android app and how to put it into a realtime context!
Data Binding in Action using MVVM patternFabio Collini
The Data Binding framework was one of Google’s announcements at I/O 2015, it’s a big change in the code organization of an Android app. Some developers are sceptical about this framework but, if used in the “right way”, it’s very powerful and it allows to remove a lot of redundant boilerplate code from activities and fragments.
In this talk we’ll start from the Data Binding basic concepts and then we’ll see how to use it to improve the architecture of a typical Android application applying the Model View ViewModel pattern. Using this pattern you need to write less code to create an app that can be easily tested using JVM and instrumentation tests.
Android Clean Architecture for DummiesKengo Suzuki
Brief tutorial of implementing very primitive app(single list view) using Android Clean Architecture. It won't describe what and why, but rather, how to use it.
Continuous Delivery for Cross-Platform Mobile AppsMovel
The Cross-Platform Build Pipeline
• Check in code
• Run a build (compile)
• Run tests - Mocha, or Jasmine and Protractor after build
• Run Cordova build
• Create binary deployable files -> APK, IPA, XAP file (platform binaries)
• Deploy platform binary to a emulator
• Run functional tests on the emulator -> Espresso from Google, mock wire
• Signing or packaging
• Submit to test store (internal, beta testing)
• Send emails to beta testers with links to the app
MOPCON 2015 - Tips of Mobile Continuous Deliveryanistar sung
This deck was my sharing in MOPCON 2015. I told about some tips of continuous delivery in mobile development environment and what we did in Taiwan Yahoo. How to make a success strategy for mobile continuous delivery.
Continuous Delivery: Playing with Immutable servers @commitporto 2016João Cravo
Continuous Delivery is the trend process of the moment. It helps companies to deliver their products in a faster and trustful way.
Immutable Server is not a new concept. However, thanks to advent of IaaS like AWS, it becomes easier embrace the idea and use its amazing advantages.
Mindera tries to adopt these concepts in their projects. It has never been so cool to watch our CD pipeline build and destroy our application’s infrastructure. It's so awesome that we want to share it with you.
As your app code gets larger and more complex, it makes sense to break your project out into smaller reusable components. But what’s the best way to do this? How can you clearly version your internal libraries? What kind of setup and maintenance can you expect? How much could it slow down development time?
In this talk we’ll dive into the various ways you can manage internal library dependencies. We’ll chat about the current state of Android dependency management, Gradle multi-project builds, Git submodules, and creating a private maven repository in Artifactory. The speaker will share real-world examples, and the pros and cons of each approach.
Dave Liddament - международный спикер и разработчик в Lamp Bristol. Мы пригласили его выступить у нас на конференции 8 декабря с темой «Effective Code Review».
⠀
There are so many benefits from code review; lower development costs, increased code quality, quick up-skilling and on-boarding of team members. Despite these benefits many teams don’t have code review as part of their process at all. Others don’t get the gains they should from it.
⠀
This talk first outlines the business case for code review. It then explores how to make code review effective, specifically looking at:
⠀
• Expectations of what can be achieved with code review.
• What should be covered by code review (including example code)
• What should not be covered by code review
• How to write code that makes code review easy
• What makes good code review comments
• What makes good responses to code review comments
⠀
Finally to wrap up you'll be shown how to enable a code review with Github. Spoiler alert: It can be done it under 5 mins!So if you are on a team that isn’t using code review, or isn’t using it effectively then you should be at this talk.
CODEiD – это всеукраинское сообщество PHP-разработчиков. Наша цель — создать сильное сообщество всех, кто увлечен PHP-разработкой, и принимать в нашем уютном приморском городе коллег со всей Украины и мира.
Continuous delivery of embedded systems embedded meetupMike Long
Continuous Delivery is all the rage, but many of the practices are not applied in the embedded world because the literature seems to focus on the web development community. That is a great shame, because there is a great deal we can apply on our embedded software development projects. This talk will show you how to apply some of the key techniques, such as embedded versioning and software traceability, embedded continuous delivery pipelines, acceptance testing with hardware, automatic deployment to hardware, continuous deployment. Beyond that, the talk will show some real-life examples of companies who are at the leading edge of this adoption.
Talk given at the Oslo Embedded Software meetup group.
Optimising Your Front End Workflow With Symfony, Twig, Bower and GulpMatthew Davis
We take great care in our back end coding workflow, optimising, automating and abstracting as much as is possible. So why don't we do that with our front end code?
We'll take a look at some tools to help us take our front end workflow to the next level, and hopefully optimise our load times in the process!
We'll be looking at using Twig templates and optimising them for the different areas of your application, integrating Bower and Gulp for managing assets and processing our front-end code to avoid repetitive tasks - looking at how that impacts the typical Symfony workflow.
Do Your Homework! Writing tests for Data Science and Stochastic Code - David ...PyData
To productionize data science work (and have it taken seriously by software engineers, CTOs, clients, or the open source community), you need to write tests! Except… how can you test code that performs nondeterministic tasks like natural language parsing and modeling? This talk presents an approach to testing probabilistic functions in code, illustrated with concrete examples written for Pytest.
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...Gáspár Nagy
BDD is a method that focuses on defining the requirements based on the expected behavior; DDD is a method that uses a ubiquitous language all across the solution; UX helps design user interactions based on user behavior… and Selenium WebDriver (or similar) is a tool that is mostly used to ignore all these and automate the app using clicks on HTML elements…
In this session you will explore options how to improve testing efficiency by looking at UI automation from a different angle by analyzing and understanding the UI concepts used in the application, matching them to domain model elements and build an automation solution that focuses on these.
Presentation about SEO for IAB Belgium @Google Offices BXL (intermediate level)
TOC:
- The SEO Pyramid
- Which ranking factors matter
- SEO trends
- SEO Migration
- New sites & SEO
- Social Media & SEO
- International SEO
- Local SEO
- Video & Image SEO
- Keyword Research (finally done right)
- Optimizing your website / writing content
Similar to World-Class Testing Development Pipeline for Android (20)
Water scarcity is the lack of fresh water resources to meet the standard water demand. There are two type of water scarcity. One is physical. The other is economic water scarcity.
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
Democratizing Fuzzing at Scale by Abhishek Aryaabh.arya
Presented at NUS: Fuzzing and Software Security Summer School 2024
This keynote talks about the democratization of fuzzing at scale, highlighting the collaboration between open source communities, academia, and industry to advance the field of fuzzing. It delves into the history of fuzzing, the development of scalable fuzzing platforms, and the empowerment of community-driven research. The talk will further discuss recent advancements leveraging AI/ML and offer insights into the future evolution of the fuzzing landscape.
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
Event Management System Vb Net Project Report.pdfKamal Acharya
In present era, the scopes of information technology growing with a very fast .We do not see any are untouched from this industry. The scope of information technology has become wider includes: Business and industry. Household Business, Communication, Education, Entertainment, Science, Medicine, Engineering, Distance Learning, Weather Forecasting. Carrier Searching and so on.
My project named “Event Management System” is software that store and maintained all events coordinated in college. It also helpful to print related reports. My project will help to record the events coordinated by faculties with their Name, Event subject, date & details in an efficient & effective ways.
In my system we have to make a system by which a user can record all events coordinated by a particular faculty. In our proposed system some more featured are added which differs it from the existing system such as security.
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
About
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Technical Specifications
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
Key Features
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface
• Compatible with MAFI CCR system
• Copatiable with IDM8000 CCR
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
Application
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Quality defects in TMT Bars, Possible causes and Potential Solutions.PrashantGoswami42
Maintaining high-quality standards in the production of TMT bars is crucial for ensuring structural integrity in construction. Addressing common defects through careful monitoring, standardized processes, and advanced technology can significantly improve the quality of TMT bars. Continuous training and adherence to quality control measures will also play a pivotal role in minimizing these defects.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
World-Class Testing Development Pipeline for Android
1. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
World-Class Testing Development Pipeline for Android
Pedro Vicente Gómez Sánchez
Senior Mobile Developer at Karumi
pedro@karumi.com
@pedro_g_s
github.com/pedrovgs
2. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
3. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Alberto Gragera
Technical Director
Jorge Barroso
Google Developer Expert
Davide Mendolia
Senior Full Stack Engineer
Sergio Gutierrez
Senior Mobile Engineer
4. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Let’s talk about testing!
5. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
This talk starts with some common
problems.
6. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
What do we have to test and how?
7. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
What if our code is not testable?
8. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Just because our tests are passing doesn’t
mean your code is working.
9. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Any conclusions?
10. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
We are doing something wrong if we can’t trust
our tests. We need a solution.
11. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
The Solution: Testable Code + Testing Pipeline
12. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
The Software Architecture used has to
hide implementation details.
13. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Dependency Inversion Principle is
going to guide your Architecture.
DIP is the most important S.O.L.I.D.
principle.
14. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Architecture - Testable Code
Activity
View
Presenter
Use
Case
Repository
Repository
Domain
Model
Data
Source
Data
Source
Data Source
Implementation
Data Source
Implementation
Use
Case
Use
Case
15. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Architecture is not enough.
16. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Testing Development Pipeline
17. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Your Testing Development Pipeline should
define what you are going to test and how.
18. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
What do I want to test?
19. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Test my code implements the business
requirements.
20. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Test my API Client, HTTP requests/responses
and JSON parsing, are working as expected.
21. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Test the user is watching in the App UI the
expected messages.
22. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
In other words…
23. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Test our Business Logic independently of
frameworks or libraries.
Test our integration with the API.
Test our application UI.
24. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
These three points define part of the Testing
Development Pipeline.
These three points define what we want to test.
25. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
How are we going to test this?
26. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Test my code implements the business
requirements.
27. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Think in the test scope and try to check the state
of the software at the end of the test execution.
Use the Dependency Inversion Principle to be
able to use test doubles to simulate different test
scenarios and adjust the test scope.
Business Logic Tests
28. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Show me the code!
29. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Check the state of the
software at the end of
the test execution
30. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Implementation
Details are replaced
using Test Doubles.
The SUT is the
GameBoy, the GBZ80
and the GPU.
31. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Infrastructure needed?
32. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
The usage of test
doubles are the key to
adjust the test scope.
The Application architecture
will help use to hide
implementation details
applying the dependency
inversion principle
33. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Now we can test our business logic
without depending on any framework
or library. Inside an isolated
environment.
The Result
34. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Test my API Client, HTTP requests/responses
and JSON parsing, are working as expected.
35. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Start a fake server we have under control
checking the API client is working given some
preconfigured scenarios.
API Client tests
36. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Show me the code!
37. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Given some HTTP
responses the final
authentication state is
correct.
38. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Given a Json file with
the response, an http
status code, and an
endpoint the parsing is
correct.
39. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Infrastructure needed?
40. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Initializes a fake http
server where we can
configure responses.
41. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Now we can check if our integration
with the API Client is working as it
should.
The Result
42. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Test the user is watching in the App UI the
expected messages.
43. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
UI Tests
Replace some dependencies using test doubles from
the testing application to be able to simulate different
scenarios and check the UI is showing the correct
information.
44. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Show me the code!
45. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Code Injected from
the test application.
46. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Asserts from the UI
point of view.
47. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Asserts from the User
Interface point of
view.
48. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Helper methods or
different creational
patterns to create
initial scenarios.
49. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Infrastructure needed?
50. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Configure your
dependency injection
library from your
Application class.
51. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Mocking Library
Helper Methods
52. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Replace Application’s
dependency container
with a custom
configuration.
53. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Now we can write UI tests easily.
The Result
54. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
The Testing Development Pipeline is complete
now.
Now we know what to test and how.
55. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Now we can trust our tests.
56. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Tools and libraries?
57. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Business Logic Tests
● JUnit.
● Mockito.
58. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
API Client Tests
● JUnit.
● Mockito.
● MockWebServer.
60. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
References
● World-Class Testing Development Pipeline for Android blog post series.
● Kata Contacts. GitHub Repository.
● Kata TODO API Client. GitHub Repository.
● Kata Super Heroes. GitHub Repository.
● Android GameBoy Emulator. GitHub Repository.
● Google Testing Blog. Testing state vs interaction.
61. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Questions?