speed up your titanium app development with automated tests - ticonf eu 2014
DESCRIPTION
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.TRANSCRIPT
Speed up your Titanium app development with automated
tests
Home
I’m sorry :)
@emanuele_r
+EmanueleRampichini
https://github.com/lele85
http://www.e-xtrategy.net/category/lab/
http://dev.marche.it/
http://marche.grusp.org/
Meet the lead developer
The big project
The important customer
The“not so friendly” project manager
We have LITTLE TIME
NO BUDGET left…
We have to act FAST
It works!
Great Job! Now JUST ADD AN AIR VENT and we are OK… its’ EASY
KABOOM!
“That’s not the way of working you are looking for”
writing complex software on a
tight schedule to dark side may
take you...
“Testing or No Testing.
There is No Debugging.”
Manual E2E Testing
Unit Testing
$timecomplexity
Automated
Test what gives you VALUE
Test only what gives you
Eat your own
Functional test provides a safety net...
… let you sleep well after a workday
Unit tests ensure correctness...
… and let you improve codebase design
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...
...you just need a good runner
describe("An awesome testing tool", function(){
it("should run on a real device", function(){
});
});
Install:
npm install -g tishadow
Generic app:
tishadow app -d tishadow_app
Appify:
tishadow appify -d tishadow_appify
Start server:
tishadow server
Connect your device(s)
Push your specs to all connected
devices.
tishadow spec
https://github.com/lele85/ticonf-europe-2014
Books
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]
Thanks to...
...and thank you for your precious
time :)