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.

Speed up your Titanium app development with automated tests - TiConf EU 2014

4,263 views

Published on

This session will explore unit and functional testing concepts applied to Titanium mobile and Alloy framework. After a brief introduction to testing we will look at the complete source code of a fully tested app.

Published in: Engineering, Technology
  • Be the first to comment

Speed up your Titanium app development with automated tests - TiConf EU 2014

  1. 1. Speed up your Titanium app development with automated tests
  2. 2. Home
  3. 3. I’m sorry :)
  4. 4. @emanuele_r +EmanueleRampichini https://github.com/lele85 http://www.e-xtrategy.net/category/lab/ http://dev.marche.it/ http://marche.grusp.org/
  5. 5. Meet the lead developer
  6. 6. The big project
  7. 7. The important customer
  8. 8. The “not so friendly” project manager
  9. 9. We have LITTLE TIME NO BUDGET left… We have to act FAST
  10. 10. It works!
  11. 11. Great Job! Now JUST ADD AN AIR VENT and we are OK… its’ EASY
  12. 12. KABOOM!
  13. 13. “That’s not the way of working you are looking for”
  14. 14. writing complex software on a tight schedule to dark side may take you... “Testing or No Testing. There is No Debugging.”
  15. 15. Manual E2E Testing Unit Testing $ time complexity Automated
  16. 16. Test what gives you VALUE Test only what gives you
  17. 17. Eat your own
  18. 18. Functional test provides a safety net...
  19. 19. … let you sleep well after a workday
  20. 20. Unit tests ensure correctness...
  21. 21. … and let you improve codebase design
  22. 22. describe(“Something”, function(){ it(“should behave in some way”, function(){ var sut = require(“sut”); //Arrange var success = sut.doSomething(); //Act expect(result).toBe(true) //Assert }); }); Unit Testing is simple...
  23. 23. ...you just need a good runner
  24. 24. describe("An awesome testing tool", function(){ it("should run on a real device", function(){ }); });
  25. 25. Install: npm install -g tishadow Generic app: tishadow app -d tishadow_app Appify: tishadow appify -d tishadow_appify
  26. 26. Start server: tishadow server Connect your device(s) Push your specs to all connected devices. tishadow spec
  27. 27. https://github.com/lele85/ticonf-europe-2014
  28. 28. Books
  29. 29. Useful links TiShadow [http://tishadow.yydigital.com/] ti-mocha [http://tonylukasavage.com/ti-mocha/] tio2 [https://github.com/appcelerator/tio2] Spies [http://tobyho.com/2011/12/15/jasmine-spy-cheatsheet/] TiCalabash [https://github.com/appersonlabs/TiCalabash]
  30. 30. Thanks to...
  31. 31. ...and thank you for your precious time :)

×