Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

20150423 m3

in 20150423

  • Loggen Sie sich ein, um Kommentare anzuzeigen.

  • Gehören Sie zu den Ersten, denen das gefällt!

20150423 m3

  1. 1. Name: Matsuo Kazuaki Twitter: @Kazu_cocoa Job:(Mobile)Test Engineer @Cookpad
  2. 2. index • Our philosophy • Development - Web applications • Development - Mobile applications • Conclusion
  3. 3. • • • • • • • • • • • • Our Manifesto
  4. 4. User First Our Philosophy
  5. 5. Our Huge Rails Application
  6. 6. Web Application (include API Server)
  7. 7. Web Site
  8. 8. % rake stats +----------------------+-------+-------+---------+---------+-----+-------+ | Name | Lines | LOC | Classes | Methods | M/C | LOC/M | +----------------------+-------+-------+---------+---------+-----+-------+ | Controllers | 49708 | 40012 | 537 | 4054 | 7 | 7 | | Helpers | 15122 | 12420 | 15 | 1432 | 95 | 6 | | Models | 98535 | 77593 | 1786 | 8670 | 4 | 6 | | Mailers | 2122 | 1698 | 41 | 198 | 4 | 6 | | Workers | 639 | 540 | 20 | 31 | 1 | 15 | | Chanko units | 12544 | 10354 | 6 | 255 | 42 | 38 | | Libraries | 49927 | 41289 | 603 | 3724 | 6 | 9 | | Feature specs | 45798 | 37707 | 0 | 208 | 0 | 179 | | Request specs | 39112 | 33563 | 0 | 16 | 0 | 2095 | | Routing specs | 664 | 536 | 0 | 0 | 0 | 0 | | Controller specs | 60829 | 50293 | 7 | 127 | 18 | 394 | | Helper specs | 79735 | 65835 | 5 | 73 | 14 | 899 | | Model specs | 151719|125330 | 6 | 128 | 21 | 977 | | Worker specs | 862 | 715 | 0 | 1 | 0 | 713 | | Chanko unit specs | 10396 | 8379 | 0 | 9 | 0 | 929 | | Library specs | 23528 | 19679 | 27 | 128 | 4 | 151 | +----------------------+-------+-------+---------+---------+-----+-------+ | Total |641240 |525943 | 3053 | 19054 | 6 | 25 | +----------------------+-------+-------+---------+---------+-----+-------+ Code LOC: 183906 Test LOC: 342037 Code to Test Ratio: 1:1.9
  9. 9. % bundle show | wc -l 284
  10. 10. Deployment PipelinePR merge pull tag deploy deploy
  11. 11. • Frequent small release • 10+ deploy per a day • To decrease incident risk per deploy • Minimise period of incidents • Roll back with low risk • Finish rollback within 1 min Release cycle
  12. 12. Development style • Team exist in each departments • Basically, they don’t have any test engineers. • One monolithic application • Challenging to Microservices… • Each developers are in charge of their own implemented feature.
  13. 13. Must write test code • All developers should implement test code before merge pr to master. • Why… • To keep development cycle • We can’t estimate side-effect
  14. 14. Automated Test • Must implement specs when implement features • RSpec based tests • 20000+ RSpec examples • It takes many hours finishing all test. • Capybara • with Headless browser
  15. 15. Hand Test • Checked on production test • Before release • Checked feature by developers • Tests on development phase • User test(Internal benchmark) • Security Test • and so on…
  16. 16. Priority in test code • Keep test quick • We want to keep release cycle quick. • Developed RRRSpec to keep speed • Finish all spec test cases around 5 hour => Finish within 10 minutes
  17. 17. Tools developed by Cookpad • Chanko • protect incidents • RRRSpec • Distributed Rspec framework • Switch_point • change target DB • Database_rewinder • fast database cleaner • Kage • proxy to send copied real request to test environments.
  18. 18. Challenge to Microservices • Cookpad is a huge monolithic application
  19. 19. Challenge to Microservices • Many small web applications • Keep release cycle quickly • Stable and quick deploy • ex. mamiya(our original tool)
  20. 20. How to keep stable them? • Dependency • Distributed Computing… It’s one of my task… 😢
  21. 21. Mobile Application (iOS/Android)
  22. 22. Release flow
  23. 23. PipelinePR merge pull tag publish tointernal
  24. 24. • Around 2 week release cycle • Decide which feature implement in which cycle by each departments • High release cycle lead unpleasant • Optimize to Google Play / App Store Release
  25. 25. Development • mobile-infra • iOS/Android engineers: 3 • Test Engineer: 1 <= ME!!✊ • Each departments • Android / iOS engineers • API engineers (also develop web site) • Not one team develop our application.
  26. 26. Test Level • Unit Test • Integration Test • Feature Test • Performance / GUI and so on. • Make more efficient for tests
  27. 27. Develop/Test Tools • Debug • Stetho, PonyDebugger • Enhance Testability • AndroidJUnit4 and Java libraries • XCTest, Mocks • Appium, Espresso, UIAutomation • Reporting • Turnip / turnip_formatter • kobold
  28. 28. Challenge to continuous stable release… • Reduce review load • Dokumi • Comment the result of static analytics automatically. • Enhance testability • DI into Android… • Establish hermetic environment
  29. 29. Other tests
  30. 30. • Performance • Security • Attractive and so on…
  31. 31. Conclusion • We test to keep high speed development cycle. • We challenge to Microservices. • We challenge how to value mobile applications.
  32. 32. Thank you.

×