Green Light for the Apps with - DroidCon Paris 2014

Click here to load reader

  • date post

    02-Jul-2015
  • Category

    Software

  • view

    299
  • download

    1

Embed Size (px)

description

Talk @DroidCon Paris - 23rd September 2014 How Meetic Mobile App Team is using Calaba.sh to deliver better quality software.

Transcript of Green Light for the Apps with - DroidCon Paris 2014

  • 1. Green Light for the Apps!Using Calaba.sh @MeeticDroidCon ParisSeptember 23rd 2014Cdric CreusotJean-Loup Yu

2. About usCdric CreusotAndroid DeveloperMeetic [email protected] YuHead of Mobile DevelopmentMeetic [email protected] 3. AgendaAbout MeeticMobile @MeeticGreen light to submitWhy Calaba.sh?Hands onExperience Sharing 4. About MeeticThe French Success Story 5. The Success Storyfounded by Marc Simonciniof dating service in Europeof unique visitors / monthcountries covered by Meetic Serviceevents organized by Meeticemployees2001#17 millions17>1000380 6. Mobile @MeeticScaling in 2014 7. Mobile Apps Team start of 2014TechProductDesign421 8. Mobile Apps Team - nowTechProductDesign1433 9. Mobile Apps Team ScopeAndroidiOSWindowsAPI Web Services 10. Mobile TeamOrganizationOne single openspaceCross functionalTeam 11. Mobile TeamOrganizationAgileFrom Concept ToStore 12. Mobile TeamOrganizationAgileFrom Concept ToStore 13. Mobile TeamOrganizationAgileFrom Concept ToStore 14. Mobile TeamOrganizationAgileFrom Concept ToStore 15. Green light to submitApps Quality Status 16. Code Quality Readable Unit Tested Smart Architecture Maintenable 17. Functional Quality The code do what we want Work with externalcomponents 18. Different Type of Test Unit Test Integration Test Functional Test 19. Different Type of Test Unit Test Integration Test Functional Test 20. Functional Test Tools 21. Why Calaba.sh?The Functional Tool Choice 22. Specification written with GherkinAll the test cases in Meeticlook like: Given When Then 23. Multi-platform SupportAndroidiOS 24. Mature Open Sourced since February 2012 Based on Cucumber Born in 2008 Over 200 contributors Backed and developed by Xamarin 25. Hands OnCode inside 26. The Feature [email protected]!Feature: Login feature!As a Meetic user!In order to enjoy the service!I want to be able to log into the service!!Scenario: Wrong Login!Given I am on the Login screen!When I enter my credentials [email protected] and foobar!And I press confirm!Then I should see an error message! 27. The Feature [email protected]!Feature: Login feature!As a Meetic user!In order to enjoy the service!I want to be able to log into the service!!Scenario: Wrong Login!Given I am on the Login screen!When I enter my credentials [email protected] and foobar!And I press confirm!Then I should see an error message! 28. The Feature [email protected]!Feature: Login feature!As a Meetic user!In order to enjoy the service!I want to be able to log into the service!!Scenario: Wrong Login!Given I am on the Login screen!When I enter my credentials [email protected] and foobar!And I press confirm!Then I should see an error message! 29. The Feature [email protected]!Feature: Login feature!As a Meetic user!In order to enjoy the service!I want to be able to log into the service!!Scenario: Wrong Login!Given I am on the Login screen!When I enter my credentials [email protected] and foobar!And I press confirm!Then I should see an error message! 30. The Android Source Code non intrusive 31. An example step definition the glueWhen(/^I enter my credentials (S*) and (S*)$/) do |login, password|!wait_for_screen :login!!step 'I enter text "" into field with id "loginEdit"'!step "I enter text "#{login}" into field with id "loginEdit""!step 'I enter text "" into field with id "passwordEdit"'!step "I enter text "#{password}" into field with id "passwordEdit""!end!!!! 32. Run! 33. The result human readable 34. How does it works?Step definitions,Ruby client libraryFeaturesRunning environmentInstrumentationTest serverYour appDevices/EmulatorsSource: http://blog.lesspainful.com/2012/03/07/Calabash-Android/ 35. The commandsInstallation$>sudo gem install calabash-android!Setup$your_android_project_dir>calabash-android gen!Run tests$>calabash-android resign !$>calabash-android run !$>ADB_DEVICE_ARG= calabash-android run !!Better format output$>calabash-android run --format html --out result.html!!! 36. Industrialization 37. Automated Tests Map of our code Ease the issue localisation 38. Continuous Integration> 39. Experience Sharing 40. Multi Language 12 languages management 4 brandsCalabash Ruby APIbackdoor(method,arg)1 41. Backdoor with calabash Need to run only when we are using calabash The backdoor can call method only in the currentactivity testedCreate a specific target for Calabash1 42. In your Android apppublic class MainActivitiy extends Activity {!public String calabashGetStringById(String stringId) {!String stringToReturn = ;!if (id != null && !id.isEmpty()) {!Resources resources = getResources();!int resourceId = resources.getIdentifier(stringId, string, getPackageName());!stringToReturn = resources.getString(resourceId);!}!return stringToReturn;!} !}!1 43. In your glueGiven(/^I see the title ([^]*)$/) do |key_string|!title = backdoor(calabashGetStringById, key_string)!wait_for_text(title)!end!1 44. Execution Time Take time to execute the test During Dev, need to be productiveUse label$>calabash-android run --tags !Example$>calabash-android run myapp.apk --tags @login!2 45. Dedicated Environment Control the Data Set Setup the Back EndHuge amount of work!Mock usage3 46. Behavior Driven Development Write the expected Behavior in human language beforeimplementation User centric Use concrete examples No contextWork closely with Product and DevDefine a company dictionary for the test4 47. Functional Test Cover Functional tests need to stay maintenable Dont cover all the cases with automatic tests!Automatic tests of the main cases Main path of the customers Nominal casesManual Testing needed for specific cases5 48. ConclusionWe are hiring!http://jobs.meetic.fr/ 49. Any Question ?Thanks!