AppSuite:RunTests: Difference between revisions
m (fixed linking) |
|||
Line 8: | Line 8: | ||
== Libraries == | == Libraries == | ||
* [http://pivotal.github.io/jasmine/ | * [http://pivotal.github.io/jasmine/ Jasmine] - JS BDD framework | ||
* [http://sinonjs.org/ | * [http://sinonjs.org/ Sinon.JS] - Standalone test spies, stubs and mocks for JavaScript. | ||
* [http://karma-runner.github.io/ | * [http://karma-runner.github.io/ Karma Runner] - test runner | ||
== Setting up your system == | == Setting up your system == |
Revision as of 11:50, 28 May 2013
API status: In Development
This article explains the test system of the frontend. It is aimed at developers that want to work with the frontend, be it creating new plugins or applications or modifying existing code using BDD. Bringing a BDD testing infrastructure to the frontend is still a work in progress and subject to (breaking) changes. Please contribute to the stability by reporting any issues or ideas to me.
Libraries
- Jasmine - JS BDD framework
- Sinon.JS - Standalone test spies, stubs and mocks for JavaScript.
- Karma Runner - test runner
Setting up your system
You need at least node version 0.8 to use the latest version of karma, which we need. To install the (latest version of) karma runner, run
npm install -g karma@canary
in a shell. You might need admin rights to do that, use sudo if needed.
Running the tests
Running the tests is pretty easy. For now, in the ui directory of your sources start the appserver proxy
./appserver.sh
and then start the karma server with
karma start
After that, open up a browser and point it to http://localhost:9876/.
If you don’t want to use the appserver proxy but your own backend, you need to adjust the proxies section in your ui/karma.conf.js. The appserver or a running backend won’t be needed in the future.