Your SlideShare is downloading. ×
@fernando_cejas

Code samples:
https://github.com/android10/Inside_Android_Testing
https://github.com/android10/AndroidApp...
Who am I?
•  GDG Organizer
•  Android, Agile and
technology Geek
•  NFC Actions App
•  Mobile Developer

@fernando_cejas
h...
Agenda
•  Why testing?
•  Types of tests
•  What to test on Android
•  Tools for testing
–  JUnit
–  Mockito
–  Robolectri...
Why testing?
•  Testing increases the level of
confidence in your code.
•  Testing makes it possible to write new
code, and...
Types of Tests
Testing on Android… Tools…

•  Junit
•  Mockito
•  Robolectric
•  Test Framework
JUnit
•  JUnit is an open source framework
that has been designed for the purpose
of writing and running unit tests in
Jav...
Mockito
•  Mocking Frameworks allow us to test
the code you want, without its
dependencies.
•  Mock objects can simulate t...
Code Sample
Robolectric
•  Robolectric is a unit test framework
that de-fangs the Android SDK jar so
you can test-drive the developmen...
Code Sample
Android Test Framework
•  Offered by the android framework.
•  Needs an emulator to execute the tests
•  Lets write unit, ...
Code Sample
More tools…
•  Fest
•  Spoon
•  Robotium
•  UI Automator
•  Monkey Runner
•  Strict Mode
Some useful concepts…
•  Dependency Injection
•  Code coverage
•  Continuous Integration
Conclusion
There is virtually no reason why you
should not be testing.
Any questions?
Thanks!

@fernando_cejas
https://github.com/android10
www.fernandocejas.com
http://corporate.tuenti.com/es/dev/blog
Upcoming SlideShare
Loading in...5
×

Inside Android Testing

834

Published on

Introduction to Android testing explaining existent tools and good practices. Source code examples as well.

Published in: Technology, Education
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
834
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "Inside Android Testing"

  1. 1. @fernando_cejas Code samples: https://github.com/android10/Inside_Android_Testing https://github.com/android10/AndroidApplicationTestingSample
  2. 2. Who am I? •  GDG Organizer •  Android, Agile and technology Geek •  NFC Actions App •  Mobile Developer @fernando_cejas http://www.fernandocejas.com/
  3. 3. Agenda •  Why testing? •  Types of tests •  What to test on Android •  Tools for testing –  JUnit –  Mockito –  Robolectric –  Test Framework  
  4. 4. Why testing? •  Testing increases the level of confidence in your code. •  Testing makes it possible to write new code, and refactor existing code, without worrying that you’ve broken existing functionality.
  5. 5. Types of Tests
  6. 6. Testing on Android… Tools… •  Junit •  Mockito •  Robolectric •  Test Framework
  7. 7. JUnit •  JUnit is an open source framework that has been designed for the purpose of writing and running unit tests in Java.
  8. 8. Mockito •  Mocking Frameworks allow us to test the code you want, without its dependencies. •  Mock objects can simulate the behaviour of complex objects. •  Mock objects isolate the unit of code you are testing.
  9. 9. Code Sample
  10. 10. Robolectric •  Robolectric is a unit test framework that de-fangs the Android SDK jar so you can test-drive the development of your Android app. •  It rewrites Android SDK classes as they're being loaded and making it possible for them to run on a regular JVM.
  11. 11. Code Sample
  12. 12. Android Test Framework •  Offered by the android framework. •  Needs an emulator to execute the tests •  Lets write unit, integration and functional tests. •  Has its own mocking framework
  13. 13. Code Sample
  14. 14. More tools… •  Fest •  Spoon •  Robotium •  UI Automator •  Monkey Runner •  Strict Mode
  15. 15. Some useful concepts… •  Dependency Injection •  Code coverage •  Continuous Integration
  16. 16. Conclusion There is virtually no reason why you should not be testing.
  17. 17. Any questions?
  18. 18. Thanks! @fernando_cejas https://github.com/android10 www.fernandocejas.com http://corporate.tuenti.com/es/dev/blog

×