As the number of smartphone users is expected to hit the 5 billion mark next year, we can confidently assume that the popularity and demand of mobile apps will continue to grow. Naturally, mobile apps do require testing, but a lot of it is done manually. The most difficult part of automated testing on mobile, is only the tip of the testing pyramid - E2E tests. The core of the problem with E2E is flakiness, which results in unreliable tests.
At Wix, we believe the only way to tackle this flakiness head on is by moving from black box testing to gray box testing. And for that, React Native mobile apps automation library - Detox - is being created.
Detox is a mobile automation tool. Detox tests your mobile app while it's running in a real device/simulator, interacting with it just like a real user.
Cross Platform: Write cross-platform tests in JavaScript.
Runs on Devices : Gain confidence to ship by testing your app on a device/simulator just like a real user.
Automatically Synchronized: Stops flakiness at the core by monitoring asynchronous operations in your app.
Made For CI: Execute your E2E tests on CI platforms like Travis without grief.
Test Runner Independent: Use Mocha, AVA, or any other JavaScript test runner you like.
Debuggable: Modern async-await API allows breakpoints in asynchronous tests to work as expected.
Introduction To Appium With RobotframeworkSyam Sasi
This document provides an introduction to Appium, a cross-platform solution for automating tests on native, hybrid and mobile web apps. It discusses Appium's philosophy of using the same code across platforms and leveraging existing knowledge of WebDriver APIs. Requirements for iOS and Android are listed. Advantages of Appium include using favorite programming languages, testing on real devices and simulators, supporting multiple frameworks, and integrating with CI/CD pipelines. Initial setup can be challenging and image recognition is still a work in progress. Source code for an Appium workshop is provided.
The document provides an introduction and overview of using Google Mock (gmock) for testing in C++. It discusses key concepts like the system under test (SUT), test doubles, mocks, stubs, and fragile tests. It then provides a tutorial example of defining a mock class for a Turtle interface to allow testing code that depends on drawing functions without executing the real drawing implementation.
The 'this' keyword in JavaScript refers to the owner of the function that is being executed. The value of 'this' is determined by how the function is called. In a global context, 'this' refers to the global object (window). In a constructor function called with 'new', 'this' refers to the newly created object. In event handlers, 'this' refers to the element that received the event. The value of 'this' can be explicitly set by using call, apply, or bind.
The document discusses Google Test, an open source unit testing framework for C++ that can also be used for testing C code, providing an overview of its features and how to implement unit tests using common patterns like test fixtures, assertions, and death tests to validate expected failures. It also covers best practices for writing effective unit tests, including keeping tests independent, focused, and fast-running.
Postman is an API development tool that allows users to design, manage, run, test, document, and share APIs. It provides features like request building, documentation, environments, test automation, and collaboration. Alternatives include Paw, Insomnia, command line tools like cURL, and services from Apigee and Apiary. The document recommends using any tool that helps share APIs, especially for complex projects and team collaboration.
Mockito a simple, intuitive mocking frameworkPhat VU
The document discusses using Mockito, a mocking framework for Java, to create mocks of dependencies for unit testing. It covers the basics of Mockito including creating and configuring mocks, stubbing return values and exceptions, argument matching, capturing arguments, and verifying mock behavior. The document provides examples of common Mockito usage patterns like Given-When-Then and annotations to simplify mock injection.
Detox is a mobile automation tool. Detox tests your mobile app while it's running in a real device/simulator, interacting with it just like a real user.
Cross Platform: Write cross-platform tests in JavaScript.
Runs on Devices : Gain confidence to ship by testing your app on a device/simulator just like a real user.
Automatically Synchronized: Stops flakiness at the core by monitoring asynchronous operations in your app.
Made For CI: Execute your E2E tests on CI platforms like Travis without grief.
Test Runner Independent: Use Mocha, AVA, or any other JavaScript test runner you like.
Debuggable: Modern async-await API allows breakpoints in asynchronous tests to work as expected.
Introduction To Appium With RobotframeworkSyam Sasi
This document provides an introduction to Appium, a cross-platform solution for automating tests on native, hybrid and mobile web apps. It discusses Appium's philosophy of using the same code across platforms and leveraging existing knowledge of WebDriver APIs. Requirements for iOS and Android are listed. Advantages of Appium include using favorite programming languages, testing on real devices and simulators, supporting multiple frameworks, and integrating with CI/CD pipelines. Initial setup can be challenging and image recognition is still a work in progress. Source code for an Appium workshop is provided.
The document provides an introduction and overview of using Google Mock (gmock) for testing in C++. It discusses key concepts like the system under test (SUT), test doubles, mocks, stubs, and fragile tests. It then provides a tutorial example of defining a mock class for a Turtle interface to allow testing code that depends on drawing functions without executing the real drawing implementation.
The 'this' keyword in JavaScript refers to the owner of the function that is being executed. The value of 'this' is determined by how the function is called. In a global context, 'this' refers to the global object (window). In a constructor function called with 'new', 'this' refers to the newly created object. In event handlers, 'this' refers to the element that received the event. The value of 'this' can be explicitly set by using call, apply, or bind.
The document discusses Google Test, an open source unit testing framework for C++ that can also be used for testing C code, providing an overview of its features and how to implement unit tests using common patterns like test fixtures, assertions, and death tests to validate expected failures. It also covers best practices for writing effective unit tests, including keeping tests independent, focused, and fast-running.
Postman is an API development tool that allows users to design, manage, run, test, document, and share APIs. It provides features like request building, documentation, environments, test automation, and collaboration. Alternatives include Paw, Insomnia, command line tools like cURL, and services from Apigee and Apiary. The document recommends using any tool that helps share APIs, especially for complex projects and team collaboration.
Mockito a simple, intuitive mocking frameworkPhat VU
The document discusses using Mockito, a mocking framework for Java, to create mocks of dependencies for unit testing. It covers the basics of Mockito including creating and configuring mocks, stubbing return values and exceptions, argument matching, capturing arguments, and verifying mock behavior. The document provides examples of common Mockito usage patterns like Given-When-Then and annotations to simplify mock injection.
The document discusses using Postman for API testing over 10 days. It covers topics like the Postman UI, creating and organizing API requests and collections, using variables and environments, running collections from the command line and generating HTML reports, and common authentication, authorization, and status codes.
The document discusses automation testing for mobile apps using Appium. Appium allows for cross-platform mobile app testing by using the same tests across iOS and Android platforms. It functions by proxying commands to the devices to run tests using technologies like UIAutomation for iOS and UiAutomator for Android. While useful for local testing, Appium has limitations for scaling tests in continuous integration environments, where services like Sauce Labs are better suited.
Wiremock es una herramienta para convertir servicios HTTP en mock y así poder testear tu código aislándolo de servicios HTTP (como servicios Rest).
Slides de apoyo a la charla sobre la herramienta en el Open South Code de 2016 en Málaga (España)
Retrofit is a type-safe REST client library for Android and Java that allows defining REST APIs as Java interfaces. It simplifies HTTP communication by converting remote APIs into declarative interfaces. It supports synchronous, asynchronous, and observable API consumption. The Retrofit library was created by Square.
Selenium is a tool for automating web application testing that allows tests to be written in various programming languages; it has multiple components including Selenium IDE for recording and playback of tests in Firefox, and Selenium RC which allows tests to be run from external languages and provides more power and flexibility than the IDE. Tests can be used to check for correct behavior and responses across different browsers and platforms as well as catch regressions.
Test Design and Automation for REST APIIvan Katunou
This document discusses test design and automation for REST API applications. It covers topics such as the characteristics of RESTful APIs, test design and coverage, and automation. For test design and coverage, it recommends testing endpoints, request methods, headers, bodies, response codes, headers, and bodies. It also discusses testing search, pagination, versioning, and more. For automation, it recommends tools like Postman, RestAssured, and using object mapping, builders, and JSON schema validation for test data. The presenter's contact information is provided at the end.
Automation testing can be performed using Selenium WebDriver which provides advantages like frequent regression testing, rapid feedback to developers, and finding defects missed by manual testing. Selenium has evolved over time, initially starting as a project called WebDriver at Google to solve Selenium's pain points. It now supports various browsers and locators can be used to identify elements on the page for automation.
The document discusses unit testing methods like stubbing and mocking. It introduces Mockito, a mocking framework that makes creating mock objects easier. Mockito allows generating mock objects, setting mock behavior using matchers, and verifying mock interactions. It also discusses partial mocking with spies and cautions against over-specifying mock behavior, which can lead to brittle tests. PowerMock is introduced as an extension to Mockito that enables mocking additional constructs like static methods.
This document discusses various types of API testing including functionality, usability, reliability, load, creativity, security, proficiency, and documentation testing. It provides two examples of API tests - one to test getting a list of countries and another to test getting details of a single country. Key aspects covered include generating test data, preparing variables, using prepared variables in tests, running test collections, and reviewing test results. The overall document provides guidance on developing comprehensive API tests.
Sitam Jana presents on mobile automation. The document discusses challenges in mobile testing like compatibility and regression testing. It then covers mobile automation tools like Appium, Robotium and MonkeyRunner that can automate testing on Android and iOS. The last sections provide steps to set up the environment and demonstrate MonkeyRunner through sample code and configuration in Eclipse.
This document provides an introduction to unit testing in Python and the Pytest framework. It discusses writing unit test code using the unittest framework and Pytest, how to test functions and handle failures. It also covers features of Pytest like skipping and expected failures, fixture setup/teardown, and distributed testing using the xdist plugin.
API Testing. Streamline your testing process.Andrey Oleynik
Slides from IT talk: «API Testing. Streamline your testing process. A step by step tutorial»
Code on github: https://github.com/a-oleynik/soap-ui
Webinar on youtube: https://www.youtube.com/watch?v=x2ALtuCjuUo
DataArt P. https://www.meetup.com/ru-RU/DataArt-Wroclaw-IT-talk/events/246967484/?eventId=246967484 Wroclaw, 2018, February 15
An automated testing tool by SmartBear – TestComplete is a comprehensive product with umpteen features and capabilities to make it one of the most liked testing tools encompassing a variety of applications like Desktop, Mobile Web and RIA with technologies like .NET, Java and more.
Visit: http://softwaretestingsolution.com/ to get a free POC of our services.
Handle Exceptions in Selenium Webdriver | EdurekaEdureka!
** Selenium Certification Training: https://www.edureka.co/testing-with-selenium-webdriver **
This Edureka PPT on Exceptions in Selenium Webdriver will talk about exception handling in selenium. It will also tell you about various types of exceptions and how to handle them using various methods. Below topics are covered in this PPT:
What is Exception handling?
Exception Hierarchy
Checked vs Unchecked Exceptions
Types of Exceptions
Exception Methods
Selenium playlist: https://goo.gl/NmuzXE
Selenium Blog playlist: http://bit.ly/2B7C3QR
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
This document provides an overview of the TestNG testing framework, including its features, benefits, installation process, and comparisons to JUnit. TestNG is a testing framework inspired by JUnit and designed to cover all categories of tests. It allows for multi-threaded, grouped, dependent, and parameterized testing. TestNG has advantages over JUnit like flexible grouping of tests, dependency testing, and integration with tools. The document demonstrates how to use TestNG annotations, XML configuration, parameters, data providers, factories, listeners and more. It also summarizes the key differences between TestNG and JUnit.
The document discusses JUnit 5, the next generation of the JUnit testing framework for Java. Key aspects include a new programming model using extensions, support for Java 8 features, and ways to migrate from earlier JUnit versions. The new framework consists of the JUnit Platform launcher, the JUnit Jupiter API for writing tests, and the JUnit Vintage engine for running JUnit 3 and 4 tests.
Mobile Application Testing involves testing functionality, performance, compatibility, security and more across different mobile devices, platforms, and networks. Some key challenges include testing on a variety of devices with different hardware, operating systems, and mobile networks as well as coping with frequent requirement changes in an agile development environment. Automation is difficult given short iterations and lack of tools designed for collaborative agile processes.
An introduction to api testing | David TzemachDavid Tzemach
WHAT IS API?
MOTIVATION TO TEST API
WHAT IS AN API TESTING?
WHAT TESTS SHOULD BE PERFORMED ON API’S
WHAT ARE THE TYPES OF DEFECTS THAT API TESTING WILL HELP REMOVE?
WHAT ARE THE CHALLENGES OF API TESTING?
QA Fest 2018. Adam Stasiak. React Native is Coming – the story of hybrid mobi...QAFest
Main idea of this talk is to show what technologies can be used for cross-platform mobile app development and how to deal with UI tests automation for them. I will outline set of challenges every tester and developer needs to conquer and give some tips how to solve them. During this talk I will present how to apply UI tests in React Native project using Detox framework.
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...Applitools
The document summarizes the shifting landscape of mobile test automation over the past 5 years. It discusses the major open source and proprietary frameworks for iOS and Android testing, including Appium, Espresso, XCUITest, EarlGrey, Detox, and others. It provides an overview of each framework's capabilities and adoption. It also envisions where mobile automation may be headed in the next 5 years, such as supporting new form factors, platforms, and types of testing beyond functional testing.
The document discusses using Postman for API testing over 10 days. It covers topics like the Postman UI, creating and organizing API requests and collections, using variables and environments, running collections from the command line and generating HTML reports, and common authentication, authorization, and status codes.
The document discusses automation testing for mobile apps using Appium. Appium allows for cross-platform mobile app testing by using the same tests across iOS and Android platforms. It functions by proxying commands to the devices to run tests using technologies like UIAutomation for iOS and UiAutomator for Android. While useful for local testing, Appium has limitations for scaling tests in continuous integration environments, where services like Sauce Labs are better suited.
Wiremock es una herramienta para convertir servicios HTTP en mock y así poder testear tu código aislándolo de servicios HTTP (como servicios Rest).
Slides de apoyo a la charla sobre la herramienta en el Open South Code de 2016 en Málaga (España)
Retrofit is a type-safe REST client library for Android and Java that allows defining REST APIs as Java interfaces. It simplifies HTTP communication by converting remote APIs into declarative interfaces. It supports synchronous, asynchronous, and observable API consumption. The Retrofit library was created by Square.
Selenium is a tool for automating web application testing that allows tests to be written in various programming languages; it has multiple components including Selenium IDE for recording and playback of tests in Firefox, and Selenium RC which allows tests to be run from external languages and provides more power and flexibility than the IDE. Tests can be used to check for correct behavior and responses across different browsers and platforms as well as catch regressions.
Test Design and Automation for REST APIIvan Katunou
This document discusses test design and automation for REST API applications. It covers topics such as the characteristics of RESTful APIs, test design and coverage, and automation. For test design and coverage, it recommends testing endpoints, request methods, headers, bodies, response codes, headers, and bodies. It also discusses testing search, pagination, versioning, and more. For automation, it recommends tools like Postman, RestAssured, and using object mapping, builders, and JSON schema validation for test data. The presenter's contact information is provided at the end.
Automation testing can be performed using Selenium WebDriver which provides advantages like frequent regression testing, rapid feedback to developers, and finding defects missed by manual testing. Selenium has evolved over time, initially starting as a project called WebDriver at Google to solve Selenium's pain points. It now supports various browsers and locators can be used to identify elements on the page for automation.
The document discusses unit testing methods like stubbing and mocking. It introduces Mockito, a mocking framework that makes creating mock objects easier. Mockito allows generating mock objects, setting mock behavior using matchers, and verifying mock interactions. It also discusses partial mocking with spies and cautions against over-specifying mock behavior, which can lead to brittle tests. PowerMock is introduced as an extension to Mockito that enables mocking additional constructs like static methods.
This document discusses various types of API testing including functionality, usability, reliability, load, creativity, security, proficiency, and documentation testing. It provides two examples of API tests - one to test getting a list of countries and another to test getting details of a single country. Key aspects covered include generating test data, preparing variables, using prepared variables in tests, running test collections, and reviewing test results. The overall document provides guidance on developing comprehensive API tests.
Sitam Jana presents on mobile automation. The document discusses challenges in mobile testing like compatibility and regression testing. It then covers mobile automation tools like Appium, Robotium and MonkeyRunner that can automate testing on Android and iOS. The last sections provide steps to set up the environment and demonstrate MonkeyRunner through sample code and configuration in Eclipse.
This document provides an introduction to unit testing in Python and the Pytest framework. It discusses writing unit test code using the unittest framework and Pytest, how to test functions and handle failures. It also covers features of Pytest like skipping and expected failures, fixture setup/teardown, and distributed testing using the xdist plugin.
API Testing. Streamline your testing process.Andrey Oleynik
Slides from IT talk: «API Testing. Streamline your testing process. A step by step tutorial»
Code on github: https://github.com/a-oleynik/soap-ui
Webinar on youtube: https://www.youtube.com/watch?v=x2ALtuCjuUo
DataArt P. https://www.meetup.com/ru-RU/DataArt-Wroclaw-IT-talk/events/246967484/?eventId=246967484 Wroclaw, 2018, February 15
An automated testing tool by SmartBear – TestComplete is a comprehensive product with umpteen features and capabilities to make it one of the most liked testing tools encompassing a variety of applications like Desktop, Mobile Web and RIA with technologies like .NET, Java and more.
Visit: http://softwaretestingsolution.com/ to get a free POC of our services.
Handle Exceptions in Selenium Webdriver | EdurekaEdureka!
** Selenium Certification Training: https://www.edureka.co/testing-with-selenium-webdriver **
This Edureka PPT on Exceptions in Selenium Webdriver will talk about exception handling in selenium. It will also tell you about various types of exceptions and how to handle them using various methods. Below topics are covered in this PPT:
What is Exception handling?
Exception Hierarchy
Checked vs Unchecked Exceptions
Types of Exceptions
Exception Methods
Selenium playlist: https://goo.gl/NmuzXE
Selenium Blog playlist: http://bit.ly/2B7C3QR
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
This document provides an overview of the TestNG testing framework, including its features, benefits, installation process, and comparisons to JUnit. TestNG is a testing framework inspired by JUnit and designed to cover all categories of tests. It allows for multi-threaded, grouped, dependent, and parameterized testing. TestNG has advantages over JUnit like flexible grouping of tests, dependency testing, and integration with tools. The document demonstrates how to use TestNG annotations, XML configuration, parameters, data providers, factories, listeners and more. It also summarizes the key differences between TestNG and JUnit.
The document discusses JUnit 5, the next generation of the JUnit testing framework for Java. Key aspects include a new programming model using extensions, support for Java 8 features, and ways to migrate from earlier JUnit versions. The new framework consists of the JUnit Platform launcher, the JUnit Jupiter API for writing tests, and the JUnit Vintage engine for running JUnit 3 and 4 tests.
Mobile Application Testing involves testing functionality, performance, compatibility, security and more across different mobile devices, platforms, and networks. Some key challenges include testing on a variety of devices with different hardware, operating systems, and mobile networks as well as coping with frequent requirement changes in an agile development environment. Automation is difficult given short iterations and lack of tools designed for collaborative agile processes.
An introduction to api testing | David TzemachDavid Tzemach
WHAT IS API?
MOTIVATION TO TEST API
WHAT IS AN API TESTING?
WHAT TESTS SHOULD BE PERFORMED ON API’S
WHAT ARE THE TYPES OF DEFECTS THAT API TESTING WILL HELP REMOVE?
WHAT ARE THE CHALLENGES OF API TESTING?
QA Fest 2018. Adam Stasiak. React Native is Coming – the story of hybrid mobi...QAFest
Main idea of this talk is to show what technologies can be used for cross-platform mobile app development and how to deal with UI tests automation for them. I will outline set of challenges every tester and developer needs to conquer and give some tips how to solve them. During this talk I will present how to apply UI tests in React Native project using Detox framework.
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...Applitools
The document summarizes the shifting landscape of mobile test automation over the past 5 years. It discusses the major open source and proprietary frameworks for iOS and Android testing, including Appium, Espresso, XCUITest, EarlGrey, Detox, and others. It provides an overview of each framework's capabilities and adoption. It also envisions where mobile automation may be headed in the next 5 years, such as supporting new form factors, platforms, and types of testing beyond functional testing.
Guide to End-to-End Detox Testing Headspinflufftailshop
In the dynamic world of mobile app development, delivering exceptional user experiences and ensuring top-notch quality in React Native applications is essential. Enter Detox automation testing—an invaluable tool designed specifically for React Native. With streamlined testing processes, Detox empowers developers to optimize development cycles and confidently deliver high-performing applications.
iOS Practice Leaders Community Meet-up.
“Unit Testing in iOS” by Maxim Koshtenko
- why we need tests and what their use in applications’ developing on a project is;
- how one should and should not test source code;
- review of some of the most popular tools which make test-writing easier;
- how to switch to unit-testing on a project which already exists.
Top100summit 谷歌-scott-improve your automated web application testingdrewz lin
This document discusses improving automated web application testing. It begins with an introduction and agenda. Some key points:
- Testing at Google expects test code quality to match production code quality. Tests must be maintainable and meet engineering standards.
- The present focuses on Selenium/WebDriver automation best practices and things to avoid. Base classes and locator organization can help improve test robustness and maintainability.
- The future may include more exploratory testing tools like WebTestingExplorer for automated exploratory testing.
Overall the document provides guidance on using Selenium/WebDriver for web application testing in a best practices way, focusing on test code quality, maintainability, and anticipating future changes. It emphasizes organizing tests through
- The document discusses various topics around testing Android applications such as creating test projects, different types of tests (unit, integration, UI, etc.), testing frameworks like JUnit, using annotations, running and debugging tests.
- It provides an overview of key concepts and tools required for testing including testing on emulators and real devices, using mocks, assertions and view assertions in tests.
- The document demonstrates how to structure tests, write test cases with different assertions and annotations, and debug issues by running tests in Eclipse and from the command line.
A. Sirota "Building an Automation Solution based on Appium"DataArt
This document provides an overview of building an automation solution using Appium. It discusses tools for mobile test automation, common pain points in testing, tips for running tests on real devices versus emulators, integrating mobile testing into a CI/CD pipeline, and using cloud services for testing. Examples are provided for testing a QR code scanning app and verifying call quality between two devices. Links to additional Appium documentation and cloud testing services are also included.
The document discusses various topics related to Android testing including:
- Best practice is to create a separate test project rather than including tests in the main project. This keeps tests stripped out of the main code and easier/faster to run.
- Tests can be run from Eclipse or from the command line with options to run all tests, a single test class/method, or filter by category.
- The Android SDK tools, emulator/AVD, and tools like uiautomatorviewer and uiautomator are needed to perform UI tests.
- Different types of tests include unit tests, integration tests to check components work together, acceptance tests for QA, and performance tests to check system behavior.
[QE 2018] Adam Stasiak – Nadchodzi React Native – czyli o testowaniu mobilnyc...Future Processing
Świat technologii mobilnych od pewnego czasu przechodzi rewolucję – odchodzi się od natywnych aplikacji mobilnych. Jak zatem twórcy aplikacji mobilnych odpowiadają na potrzeby rynku? Czy osoby automatyzujące testy aplikacji mobilnych mają do dyspozycji narzędzia gotowe na technologie, takie jak React Native czy Flutter? Czy można uniknąć pisania oddzielnego kodu testów dla Androida i iOS-a?
W czasie wykładu, na przykładzie aplikacji stworzonej w oparciu o technologię React Native oraz narzędzia Detox, Adam przedstawił praktyczną implementację testów end-to-end oraz ich konfigurację z Continuous Integration.
The document describes LinkedIn's approach to releasing updates for their flagship mobile app three times per day (dubbed "3x3") in order to enable faster iteration. Key aspects included distributed and parallel testing across devices and emulators, refactoring tests for speed, creating consistent test environments, static analysis of code, and feature flagging to reduce risk and enable A/B testing of changes. The approach helped reduce release cycles from monthly to daily but further automation of areas like production releases and performance testing was still needed. Distributing workload and leveraging services like TestFlight and Google Play helped scale testing across many devices.
Software testing: an introduction - 2017XavierDevroey
Software testing involves dynamically verifying that a program behaves as expected on a finite set of test cases. This is done because exhaustively testing every possible case is not feasible. Unit testing involves testing individual program units such as classes through automated tests that make assertions about the output. JUnit is a unit testing framework for Java that uses annotations to identify test methods and make assertions about the results.
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to realityDaniel Gallego Vico
This presentation shows how to be a pragmatic Android programmer by showing real examples of applications/products developed in BQ attending to three important topics:
- Why and how to implement a pragmatic CLEAN architecture with a custom dependency injection framework and ReactiveX features.
- Why and how to implement unit, integration, view and smoke tests in every CLEAN layer and what tools should be used.
- Why and how to implement pragmatic Continuous
Development/Testing/Integration/Delivery by showing several tricks, plugins and snippets that you could use as a daily basis.
The document discusses unit testing in Grails using the Spock testing framework. It covers the basics of unit testing including goals, advantages, and challenges. It then provides an overview of Spock and examples of writing unit tests in Spock including mocking methods, domains, configurations, and dependencies. The document also discusses how to write unit tests for controllers and integration tests in Grails using Spock.
React Native is slowly becoming the preferred choice for developing mobile applications. If you are already a web developer, you will find that most of the principles of coding remain the same as it uses the same design as React. But the development flow might feel a bit overwhelming for someone who is creating a React Native app for the first time.
In this talk, I will describe the various tools and methods that can simplify your development workflow. I will talk about the whys and hows of debugging, performance optimizations and improved release cycles so that the next time you are developing a React Native application, you feel at home.
This document discusses the PARS framework for building distributed web applications across multiple screens. It presents three approaches to multiscreen applications - fixed services, cooperating apps, and distributed apps. The PARS framework allows parts of an app to migrate or replicate across devices dynamically. It describes the PARS architecture using components, state synchronization, and messaging. Issues around component migration, replication, and network adaptation are discussed. The document concludes by mentioning standards like the Presentation API and asking for questions.
Getting High on Espresso! discusses Android testing frameworks and how to use Espresso for UI testing. It explains that Espresso is simple, reliable, and durable for test automation. The document demonstrates writing a test with Espresso to launch an app, search for items, view details, and share an item. It also discusses using Spoon to generate HTML reports for Espresso tests to run on multiple devices in parallel and take screenshots for debugging.
Similar to Detox: tackling the flakiness of mobile automation (20)
6. Why React Native?
We are JavaScript company (~500 FEDs);
Wix knows and had great experience with React;
Velocity (!);
Multi-Platform solution;
Behind React Native stands a big company (Facebook);
Community.
7. Terminology
Native – Developed for a specific platform.
JS – Shared code between platforms.
Components – UI elements provided by React Native or build on
demand.
Bridge – Used by React Native to pass information between the
Native side and JS side and vice versa.
8. The Bridge
JavaScriptBridgeNative
User clicked a button in app:
User Click Native button
handler
N -> JS
Handler logic
Handler response
+ UI rendering
instructions
N <- JSBuild Native
views
9. Problems in React Native
Maturity – new technology (since 2015);
Documentation – it’s still in the making;
No Platforms parity;
No solid Navigation solution;
Testing – native + JavaScript;
The bridge – what should be allowed to go over it;
Complex environment.
10. Native vs React Native
Native React Native
Objective-C/Swift/Java/Kotlin JavaScript
Static type Dynamic type
Multi-Threaded Single-Threaded
Simply run it Use Packager
Manual UI Flexbox
12. Types of automated tests
3 main types of automated tests:
• Unit tests;
• Mocked E2E;
• Production E2E.
13. Unit Tests
PROS CONS
Pure code oriented Pure code oriented
Easy to write + maintain Does not represent actual user flows
Improves code quality Does not reflect app quality
Find bugs easily
14. Mocked E2E
PROS CONS
Closer to code & product Hard to setup and write
Stable Gives limited confidence
Easy to maintain
15. Production E2E
PROS CONS
Mock real user experience Slow
Easy to setup Hard to maintain
Easy to write Less cost effective
High confidence Flaky
16. E2E Flakiness
Traditional method of dealing with flakiness is adding various
“sleep”
commands throughout the test.
Why?
To force a certain execution order.
18. What is Detox?
In one sentence:
Gray box End-to-End testing and automation library
for mobile apps.
19. Detox is...
• Cross Platform – iOS and Android;
• Made for CI;
• Test Runner Independent;
• Automatically Synchronized.
20. Black Box vs Gray Box
Black Box A method of testing stuff from the outside,
without knowing what’s going on internally.
Gray Box Allows the test framework to monitor the app
from the inside and actually synchronize
with it.
24. Device Configurations
• Defined in package.json file;
Param Details
binaryPath Relative path to the app due to be tested
testBinaryPath (optional, Android only): relative path to the test app (apk)
type
Device type, available options
are ios.simulator, ios.none, android.emulator, and android.attached.
name
Device name, aligns to the device list available through xcrun simctl
list
build [optional] Build command (either xcodebuild, react-native run-ios, etc...)
26. Server and Test Runner
• Server configuration can be
specified generally or per specific
device configuration.
• Test Runner configuration is
Mocha by default, can define a
different one (e.g. Jest, AVA).
"detox": {
...
"session": {
"server": "ws://localhost:8099",
"sessionId": "YourProjectSessionId"
}
}
"detox": {
...
"test-runner": "jest"
"runner-config": "path/to/config.json"
}
31. detox.beforeEach()
• Called at the start of every test.
declare function beforeEach(testSummary: {
title: string;
fullName: string;
status: 'running';
})
32. detox.afterEach()
• Called at the end of the test;
• Must return failed or passed value.
declare function afterEach(testSummary: {
title: string;
fullName: string;
status: 'failed' | 'passed';
})
33. detox.cleanup()
• Should be triggered when detox.afterEach() finishes;
• Phase where Detox server shuts down.
after(async () => {
await detox.cleanup();
})
37. device.launchApp()
Parameters to set:
restart app
set runtime permissions
add additional launch arguments
launch with notifications
launch with specific language
launch from a fresh installation
launch from URL
launch with user activity
disable touch indicators (iOS)
initialize the URL blacklist
51. Synchronization
• EarlGrey provides a synchronization mechanism;
• Tracks dispatch queue, operation queue, network, animations,
etc;
• Waits for app to be idle.
What if app does not become idle?
52. Disabling
• App is busy – does not reach
idle state;
• Usual use case – animated
elements;
• Disable before entering screen
with such element;
54. waitFor()⏱
• Manual sync;
• Must have a timeout;
• Use together with an expectation.
await waitFor(element(by.id('UniqueId204'))).toBeVisible().withTimeout(2000);
await expect(element(by.id('UniqueId204'))).toBeVisible();
56. Demo
Scenario:
• log into the app;
• join a site with Invite Code;
• verify site in Home tab;
• hide site from Home tab;
• unhide site;
• verify it’s visible.