A hands-on workshop to learn how to make your applications robust and refactoring easier. Enhance the trust on your code while learning the tricks of the trade.

Overview

Very likely you have been told about unit testing your code before. You may already know the theory and you would want to give it a try. But it is hard to walk this path alone since the first tests are also the hardest.

This hands-on workshop takes a different approach. Learn the concepts and use the de facto standard frameworks (JUnit 5 and XCTest) to write actual tests of realistic applications.

Reach the top of the Unit Test Mountain!

Learn how to

  • What are Unit Tests and how to write them

  • How to simplify the tests and have Clean tests too

  • When and how to use Test Doubles

  • What is TDD and how to practice it

  • How to unit test everything in your app, including the views

  • Make the quality of your code something better than a matter of faith!

Audience

This course is intended for Android mobile app developers who would like to improve the way they build their products. Attendees should have at the very least 6 months of experience developing Android applications (1 year preferred) and should be familiar with Kotlin development, know object-oriented programming and what a design pattern is.

A Java version is also available.

Syllabus

Day 1

Introduction to Unit Tests

  • Test return

  • Test state

  • Test behavior

Improving Tests

  • Reorganization of the test code

  • Reuse of fixtures

  • Reuse of convenience methods

Introduction to Test Doubles

  • Explanation of dummies, stubs, spies, mocks, and fakes

  • Implementation of doubles tests

Advanced Test Doubles

  • Implementation with mocking libraries (mockito-kotlin)

Day 2

Intro to TDD

  • TDD concepts and schools

  • Implementation of the red, green, refactoring sequence

  • First examples

TDD FTW!

  • TDD everywhere

  • Testing exceptions/errors

The Implications of the Architecture

  • Architecture concepts to get a more verifiable code

  • Unit testing MVVM

Day 3

Advanced Tests: Testing the Views

  • Identification of the verifiable aspects of the views with unit tests

  • Unit tests of View controllers and activities/fragments (with Robolectric & FragmentScenario)

Advanced Tests: Testing Network Calls

  • Unit tests of asynchronous tasks

  • Mocking the network

Suggested Additional Contents

  • Alternative testing and/or assertion frameworks (JUnit 4, Hamcrest, …)

  • Behavior Driven Development (BDD) and possible frameworks

  • Test && commit || revert

  • Integration Tests

  • Acceptance Tests

  • Smoke Tests

  • Advanced Coverage Measure

Extras

A git code repository with all the code of the course is available on demand.

Requirements

Maximize the outcome of this course by bringing your laptop with the most recent version of Android Studio ready and write the code with us!

Overview

Very likely you have been told about unit testing your code before. You may already know the theory and you would want to give it a try. But it is hard to walk this path alone since the first tests are also the hardest.

This hands-on workshop takes a different approach. Learn the concepts and use the de facto standard frameworks (JUnit 5 and XCTest) to write actual tests of realistic applications.

Reach the top of the Unit Test Mountain!

Learn how to

  • What are Unit Tests and how to write them

  • How to simplify the tests and have Clean tests too

  • When and how to use Test Doubles

  • What is TDD and how to practice it

  • How to unit test everything in your app, including the views

  • Make the quality of your code something better than a matter of faith!

Audience

This course is intended for Android or iOS mobile app developers who would like to improve the way they build their products. Attendees should have at the very least 6 months of experience developing Android or iOS applications (1 year preferred) and should be familiar with Kotlin or Swift development, know object-oriented programming and what a design pattern is.

Syllabus

Day 1

Introduction to Unit Tests

  • Test return

  • Test state

  • Test behavior

Improving Tests

  • Reorganization of the test code

  • Reuse of fixtures

  • Reuse of convenience methods

Introduction to Test Doubles

  • Explanation of dummies, stubs, spies, mocks, and fakes

  • Implementation of doubles tests

Advanced Test Doubles

  • Implementation with mocking libraries (mockito-kotlin)

  • Enhancing mocks (Swift)

Day 2

Intro to TDD

  • TDD concepts and schools

  • Implementation of the red, green, refactoring sequence

  • First examples

TDD FTW!

  • TDD everywhere

  • Testing exceptions/errors

The Implications of the Architecture

  • Architecture concepts to get a more verifiable code

  • Unit testing MVVM

Day 3

Advanced Tests: Testing the Views

  • Identification of the verifiable aspects with unit tests of the views

  • Unit testing the views:

    • (Android) Unit tests of View controllers and activities/fragments (with Robolectric & FragmentScenario)

    • (iOS) Running individual view controllers from the storyboard

Advanced Tests: Testing Network Calls

  • Unit tests of asynchronous tasks

  • Mocking the network

Suggested Additional Contents

  • Alternative testing and/or assertion frameworks (JUnit 4, Quick, Hamcrest, Nimble, …)

  • Behavior Driven Development (BDD) and possible frameworks

  • Test && commit || revert

  • Integration Tests

  • Acceptance Tests

  • Smoke Tests

  • Advanced Coverage Measure

  • (iOS) Unit testing Swift Package Manager artifacts.

Extras

A git code repository with all the code of the course is available on demand.

Requirements

Maximize the outcome of this course by bringing your laptop with the most recent version of Android Studio or Xcode ready and write the code with us!

Overview

Very likely you have been told about unit testing your code before. You may already know the theory and you would want to give it a try. But it is hard to walk this path alone since the first tests are also the hardest.

This hands-on workshop takes a different approach. Learn the concepts and use the de facto standard frameworks (JUnit 5 and XCTest) to write actual tests of realistic applications.

Reach the top of the Unit Test Mountain!

Learn how to

  • What are Unit Tests and how to write them

  • How to simplify the tests and have Clean tests too

  • When and how to use Test Doubles

  • What is TDD and how to practice it

  • How to unit test everything in your app, including the views

  • Make the quality of your code something better than a matter of faith!

Audience

This course is intended for iOS mobile app developers who would like to improve the way they build their products. Attendees should have at the very least 6 months of experience developing iOS applications (1 year preferred) and should be familiar with Swift development, know object-oriented programming and what a design pattern is.

An Objective-C version is also available.

Syllabus

Day 1

Introduction to Unit Tests

  • Test return

  • Test state

  • Test behavior

Improving Tests

  • Reorganization of the test code

  • Reuse of fixtures

  • Reuse of convenience methods

Introduction to Test Doubles

  • Explanation of dummies, stubs, spies, mocks, and fakes

  • Implementation of doubles tests

Advanced Test Doubles

  • Enhancing mocks (Swift)

Day 2

Intro to TDD

  • TDD concepts and schools

  • Implementation of the red, green, refactoring sequence

  • First examples

TDD FTW!

  • TDD everywhere

  • Testing exceptions/errors

The Implications of the Architecture

  • Architecture concepts to get a more verifiable code

  • Unit testing MVVM

Day 3

Advanced Tests: Testing the Views

  • Identification of the verifiable aspects of the views with unit tests

  • Running individual view controllers from the storyboard

Advanced Tests: Testing Network Calls

  • Unit tests of asynchronous tasks

  • Mocking the network

Suggested Additional Contents

  • Alternative testing and/or assertion frameworks (Quick, Nimble, …)

  • Behavior Driven Development (BDD) and possible frameworks

  • Test && commit || revert

  • Integration Tests

  • Acceptance Tests

  • Smoke Tests

  • Advanced Coverage Measure

  • (iOS) Unit testing Swift Package Manager artifacts.

Extras

A git code repository with all the code of the course is available on demand.

Requirements

Maximize the outcome of this course by bringing your laptop with the most recent version of Xcode ready and write the code with us!