13
_Android Unit Testing_ DevFest-2015

Dev fest2015androidunittestingbyoyewaleademolasao

Embed Size (px)

Citation preview

Page 1: Dev fest2015androidunittestingbyoyewaleademolasao

_Android Unit Testing_DevFest-2015

Page 2: Dev fest2015androidunittestingbyoyewaleademolasao

What is Testing?

Software Testing is an investigation used to provide stakeholders about the quality of the product/service under test.

Page 3: Dev fest2015androidunittestingbyoyewaleademolasao

Why should we automate Tests?

-- It gives us confidence to make changes.

-- They are the guardians of our code.

Page 4: Dev fest2015androidunittestingbyoyewaleademolasao

What types can we use?

1. Unit tests 2. Integration tests 3. Acceptance tests 4. Performance tests

Page 5: Dev fest2015androidunittestingbyoyewaleademolasao

What is Unit Testing?

A unit test is a test that can verify that all of the code in exactly one non-trivial class is working correctly. If this test fails, we know that the problem is located in that class being tested.

Page 6: Dev fest2015androidunittestingbyoyewaleademolasao

Android Unit Testing Frameworks…

-- Android testing framework

-- Roboelectric

-- Robotium

Page 7: Dev fest2015androidunittestingbyoyewaleademolasao

Unit Testing Like Insurance Policies.

A lot of Effort for something you will never use.

They cover what you use in advance.

Page 8: Dev fest2015androidunittestingbyoyewaleademolasao

Let’s get our hands DIRTY!

Page 9: Dev fest2015androidunittestingbyoyewaleademolasao

Some Android

Projects...1.RhymeCity

2.Android-test-demo

3.android-unit-tests

Page 10: Dev fest2015androidunittestingbyoyewaleademolasao

“Start testing and let us all sleep well.”

Page 11: Dev fest2015androidunittestingbyoyewaleademolasao

Remember ::

It should be the first line of defense.

No side effects (no I/O, network, database etc.).

Page 12: Dev fest2015androidunittestingbyoyewaleademolasao

ReferencesOfficial Android Developer Docs.

Hello, Startup by Kevgeniy Brikman 1st ed.

Android Unit Testing Framework Overview https://www.captechconsulting.com/blogs/android-unit-testing---framework-overview

Android I/O 2015 Code Labhttps://io2015codelabs.appspot.com/codelabs/android-studio-testing#1

Software_Testing ( https://en.wikipedia.org/wiki/Software_testing )

Page 13: Dev fest2015androidunittestingbyoyewaleademolasao

Thanks!Oyewale Ademola Sao

GDG-OAU [email protected]