$30 off During Our Annual Pro Sale. View Details »

Testing Android with Open Source

Testing Android with Open Source

Matthias Käppler

February 22, 2010
Tweet

More Decks by Matthias Käppler

Other Decks in Programming

Transcript

  1. Testing Android Testing Android with with Open Source Open Source

    ~ Matthias Käppler ~ ~ Matthias Käppler ~ February 23rd, 2010
  2. 1h Workshop 1h Workshop (1) Writing Android tests 5m (2)

    Writing Android tests: Example 15m (3) Build management / Maven 5m (4) Build management / Maven: Example 15m (5) Build automation / Hudson 5m (6) Build automation / Hudson: Example 15m
  3. Europe's leading local review site 17M uniques I'm the Android

    guy at Qype.com!
  4. Android testing Android testing How do we write tests for

    Android?
  5. Android testing Android testing As usual! Android uses JUnit 3

    android.test: AndroidTestCase < junit.framework.TestCase InstrumentationTestCase < junit.framework.TestCase
  6. Android testing Android testing AndroidTestCase ApplicationTestCase ProviderTestCase2 ServiceTestCase

  7. Android testing Android testing InstrumentationTestCase (SyncBaseInstrumentation) (SingleLaunchActivityTestCase) ActivityUnitTestCase ActivityInstrumentationTestCase2

  8. Android testing Android testing How do we run tests for

    Android?
  9. Android testing Android testing Using Instrumentation.

  10. Android testing Android testing Work it!

  11. Build management Build management Nice, we have tests now. But

    my build server doesn't click buttons.
  12. Build management Build management We need something that can run

    builds from the command line.
  13. Build management Build management Maven 2 does these sorts of

    things. (and MUCH more, in fact)
  14. Build management Build management Maven 2 is a build system.

  15. Build management Build management Maven 2 is a dependency management

    system.
  16. Build management Build management Maven 2 is a life-cycle management

    system.
  17. Build management Build management Maven 2 is a report and

    documentation generator.
  18. Build management Build management In fact: Maven 2 is a

    platform.
  19. Build management Build management There's a plugin for Android! maven-android-plugin

  20. Build management Build management Maven's central notion is the project.

    It's described by the POM.
  21. Android testing Android testing Let's have a look at one...

  22. Build automation Build automation Nice, we can now build and

    deploy our app from the command line. But we still have to do it manually.
  23. Build automation Build automation What we need is a build

    server, which automatically triggers builds.
  24. Build automation Build automation Hudson does these sorts of things.

  25. Build automation Build automation Hudson is a continuuous integration server.

    It can run builds when people commit pieces of work. This is extremely helpful for discovering software regressions early on.
  26. Build automation Build automation Hudson is a Java Web application.

    It consists of a single WAR. $ java -jar hudson.war
  27. Build automation Build automation Let's run it.

  28. More information More information maven.apache.org code.google.com/p/maven-android-plugin hudson-ci.org