Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 32 lines (21 sloc) 2.178 kB
3e21b17 @ericchaves Basic project created
authored
1 Sencha Touch 2 Application with BDD tests using Jasmine
2 =======================================================
3
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.
7
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.
9
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.
11
12 The specs used here very simple and are used only as an exemple on how to write jasmine specs for ST2.
13
14 Questions & Suggestions
15 -----------------------
16 If you have any questions, ideas or suggestions for improvments, please contact me via github messages.
17
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.
19
20 Acknowledges and Thanks
21 -----------------------
22
23 I'd like to thank everyone that contributed to this project, but in particular a big thank-you for:
24
25 * @abierbaum for showing me how to load Jasmine in ST2.
26 * @larrymyers from whom I borrowed jasmine-ConsoleReporter (larrymyers/jasmine-reporters).
27
28 You may also want to check the following projects:
29
30 * Jasmine: http://pivotal.github.com/jasmine/
31 * Jasmine Species: http://rudylattae.github.com/jasmine-species/
32 * Sinon.JS: http://sinonjs.org/
Something went wrong with that request. Please try again.