Difference between revisions of "AppSuite:RunTests"

(Libraries)
(Setting up your system)
Line 15: Line 15:
 
== Setting up your system ==
 
== 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 stable version of) karma runner, run
+
You need at least ''node'' version 0.8 to use the latest version of ''karma'', which we need. Karma will be installed with all other development dependencies. So just make sure you ran
  
     npm install -g karma
+
     npm install
  
in a shell. You might need admin rights to do that, use ''sudo'' if needed.
+
in a shell within your ui directory in the appsuite repository.
 
 
If you have karma installed already you may have to run
 
 
 
    npm -g update
 
 
 
at least once, if the karma dependencies fail at least 2 times.
 
 
 
After that you may have to add the path to your node modules to the ''local.conf'' file.
 
 
 
    export NODE_PATH="/usr/local/lib/node_modules:/usr/local/share/npm/lib/node_modules:$NODE_PATH"
 
  
 
== Running the tests ==
 
== Running the tests ==

Revision as of 10:12, 19 September 2013

API status: In Development

Running the ui tests

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

Setting up your system

You need at least node version 0.8 to use the latest version of karma, which we need. Karma will be installed with all other development dependencies. So just make sure you ran

   npm install

in a shell within your ui directory in the appsuite repository.

Running the tests

Running the tests is pretty easy. For now, in the ui directory of your sources start the karma server with this jake task

   ./build.sh testserver

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.