Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Testing Your App in the Cloud

849 views

Published on

Lecture about techniques, frameworks and tools to automate the testing for your Android App and how to use Testdroid, one of the available device farms, to test your App in the cloud and overcome fragmentation issues.

Published in: Mobile
  • Be the first to comment

Testing Your App in the Cloud

  1. 1. Intel Information Technology Testando sua App na Nuvem Eduardo Carrara Developer Evangelist – Intel Developers Relations Division
  2. 2. #IntelAndroidBR 2
  3. 3. Intel Information Technology 3
  4. 4. Intel Information Technology 4 “Testers don’t break software, software is already broken” – Amir Ghahrai
  5. 5. Intel Information Technology 5 Sprint 1 • 5 Stories • 1 Test Plan per Story • 1 Hour per Test Plan • 5h of Testing Sprint 2 • +5 Stories • +1 Test Plan per Story • 1 Hour per Test Plan • 5h of testing + 5h of regression test Sprint 3 • +5 Stories • +1 Test Plan per Story • 1 Hour per Test Plan • 5h of testing + 10h of regression test
  6. 6. Intel Information Technology 6
  7. 7. Intel Information Technology “I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it.” - Bill Gates 7 Image by Karla Vidal @ http://www.flickr.com/photos/63721650@N00/3661526274 Creative Commons cc-by-2.0
  8. 8. Intel Information Technology 8 JUnit
  9. 9. Intel Information Technology 9 public static String getFormattedMonthDay(String format, String dateString) { String finalDateString = ""; SimpleDateFormat dbDateFormat = new SimpleDateFormat(Utility.DATE_FORMAT); try { Date inputDate = dbDateFormat.parse(dateString); SimpleDateFormat requestedDateFormat = new SimpleDateFormat(format); finalDateString = requestedDateFormat.format(inputDate); } catch (ParseException e) { e.printStackTrace(); } catch (NullPointerException npex) { npex.printStackTrace(); } return finalDateString; }
  10. 10. Intel Information Technology 10 public void testGetFormattedMonthDayForBadInput() throws Exception { String inputDateString = ""; final String expectedDateFormat = "yyyy, MMMM dd"; final String expectedResult = ""; String result = Utility.getFormattedMonthDay(expectedDateFormat, inputDateString); assertEquals("A wrong formatted input must return an empty String", expectedResult, result); } public class UtilityTest extends TestCase { … … }
  11. 11. Intel Information Technology 11 Image by Schlurcher @ http://en.wikipedia.org/wiki/Jigsaw_puzzle#/media/File:Puzzle_Krypt-2.jpg Creative Commons cc-by-sa-2.0 It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free. --Steve McConnell (from Code Complete)
  12. 12. Intel Information Technology 12 JUnit
  13. 13. Intel Information Technology Android Testing Framework 13 • Special TestCases, Asserts e Mocks • MoreAsserts • ViewAsserts • MockApplication • MockContext • MockContentProvider • AndroidTestCase • ActivityInstrumentationTestCase2 • ActivityUnitTestCase • ApplicationTestCase • InstrumentationTestCase • ProviderTestCase • ServiceTestCase • SingleLaunchActivityTestCase JUnit
  14. 14. Intel Information Technology Instrumentation 14 • Android Components Context Access; • Components Lifecycle Control; • Component Loading Control; • System Events (e.g.: Broadcasts) • InstrumentationTestRunner • AndroidJUnitRunner • GoogleInstrumentationTestRunner
  15. 15. Intel Information Technology Expresso 15 • Simplifies the UI Test Process within your App • Methods for: • View matching • Checks • UI Events
  16. 16. Intel Information Technology Fragmentação 16 “If you don’t like testing your product, most likely your customers won’t like to test it either.” - Anonymous
  17. 17. Intel Information Technology 17
  18. 18. Intel Information Technology 18
  19. 19. Intel Information Technology 19
  20. 20. Intel Information Technology 20
  21. 21. Intel Information Technology 21
  22. 22. Intel Information Technology What is next? 22 • What about cross app testing? UIAutomator! • Continuous Delivery and Integration of Android Apps • Code Coverage
  23. 23. Intel Information Technology Intel Developer Zone 23 https://software.intel.com/en-us/android/app-testing
  24. 24. Intel Information Technology Thanks! 24 +EduardoCarraraDeAraujo https://www.facebook.com/ducarrara @DuCarrara br.linkedin.com/in/eduardocarrara/
  25. 25. Intel Information Technology References 25 • Android Testing: https://developer.android.com/tools/testing/testing_android.html • Android Unit Testing Support: http://tools.android.com/tech-docs/unit-testing-support • UI Testing: https://developer.android.com/training/testing/ui-testing/index.html • Android Testing Support Library: https://developer.android.com/tools/testing-support- library • Android Instrumentation: http://developer.android.com/tools/testing/testing_android.html#Instrumentation • Junit: http://junit.org • Testdroid: http://testdroid.com • Intel App Testing Page: https://software.intel.com/en-us/android/app-testing

×