Skip to content


Subversion checkout URL

You can clone with
Download ZIP
100644 32 lines (21 sloc) 2.178 kB
3e21b17 @ericchaves Basic project created
1 Sencha Touch 2 Application with BDD tests using Jasmine
2 =======================================================
4 Overview
5 --------
6 This is a experimental project on adding Jasmine to a Sencha Touch 2 project. Unfortunelly Sencha Touch 2 does not seems to have any testing framework integrated out of the box yet, so I tried to add it without any changes on any framework (Sensa Touch2 and Jasmine) to allow future updates on them easily.
8 This project was built upon a brand new "Gettting Started" project created using sencha app generator and then manually added the required files for Jasmine (a BDD Javascript framework). The process should be the same for any other javascript testing framework like QUnit, Pavlov, Screw.Unit and so on.
10 Most testing frameworks, jasmine included, uses a TestRunner.html file to runs the suites and output the results in the page itself. This approach however would require us to either modify how the application is loaded by the microloader used by Sencha Touch 2 or change the app.js. In order to keep it simple, we opted to use a ConsoleReporter and execute it on the index.htlm page itself.
12 The specs used here very simple and are used only as an exemple on how to write jasmine specs for ST2.
14 Questions & Suggestions
15 -----------------------
16 If you have any questions, ideas or suggestions for improvments, please contact me via github messages.
18 I really like to hear how ST2 developers are testing your applications, which best practices you suggest and what tools are you guys using. Also, since the goal of this project is to provide a refernce for newbies (like me) on how to TDD/BDD your ST2 code, contributions are very welcome.
20 Acknowledges and Thanks
21 -----------------------
23 I'd like to thank everyone that contributed to this project, but in particular a big thank-you for:
25 * @abierbaum for showing me how to load Jasmine in ST2.
26 * @larrymyers from whom I borrowed jasmine-ConsoleReporter (larrymyers/jasmine-reporters).
28 You may also want to check the following projects:
30 * Jasmine:
31 * Jasmine Species:
32 * Sinon.JS:
Something went wrong with that request. Please try again.