User Tools

Site Tools


devel:hacking

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
devel:hacking [2012/06/25 12:00]
norangshol Make fixtures for integration testing
devel:hacking [2012/09/18 08:25]
bredal [Python boilerplate headers]
Line 66: Line 66:
 long-term goal to rewrite the remaining Java backend code to Python. long-term goal to rewrite the remaining Java backend code to Python.
  
-Currently (as of February 2011), NAV consists mostly of Python code, +Currently (as of September 2012), NAV consists mostly of Python code, 
-with a few remaining backend systems written in Java (there'​s also the +with one remaining backend systems written in Java (eventEngine).
-Netmap Java Applet).+
  
   * We will only accept new code written in Python (except when it   * We will only accept new code written in Python (except when it
Line 125: Line 124:
 # -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
 </​code>​ </​code>​
 +
 +===== Headline =====
  
 ====== Database ====== ====== Database ======
Line 352: Line 353:
 </​code>​ </​code>​
  
 +
 +===== Javascript testing =====
 +
 +Testing of javascript is in its infancy in NAV. We are currently using [[http://​busterjs.org/​|buster.js]] as testing toolkit.
 +
 +To install buster.js install [[http://​nodejs.org/​|node]] and then:
 +<​code>​
 +npm install -g buster
 +</​code>​
 +
 +As we use [[http://​requirejs.org/​|require.js]] you need the AMD module of buster aswell. Install it in the /media/js directory:
 +<​code>​
 +npm install buster-amd
 +</​code>​
 +
 +To run the tests you need to
 +  - Start a buster server by typing ''​buster-server''​
 +  - Capture browsers by pointing browsers to the buster-server (default localhost:​1111)
 +  - Go to /media/js
 +  - Run the tests by typing ''​buster-test''​
 +
 +All tests are located under ''​media/​js/​tests/''​. Create new tests there. For syntax, assertions and related stuff take a look at the tests already there and [[http://​busterjs.org/​docs/​|the buster docs]].
 ===== Jenkins ===== ===== Jenkins =====
  
devel/hacking.txt · Last modified: 2014/11/05 10:57 by morten