For now, use jsnlog-DEV.js
[mkws-moved-to-github.git] / test / README.txt
1 Jasmine / jasmine-node test frame works
2 =============================================
3
4 This directory contains the MasterKey Widget Set (MKWS) Test framework.
5
6
7 Installation
8 -------------------------------------
9 1. install node.js, see http://nodejs.org/
10 (and apache2 if you have not already)
11
12 # debian7
13 $ sudo apt-get install npm
14 $ sudo apt-get install apache2
15
16 # centos6
17 $ sudo yum install npm
18 $ sudo yum install httpd
19
20
21 The nodejs modules are configured in ./package.json
22 You can install them manually with
23 $ make node-modules
24
25 if you want. The top level makefile in ./mkws/Makefile takes care to
26 checkout and update the modules automatically.
27
28
29 Testing
30 ---------------------------------------
31
32
33 To run the tests, run:
34
35 1. basic javscript tests
36
37 $ make check
38 jasmine-node ./spec
39 .......................................
40
41 Finished in 2.024 seconds
42 39 tests, 194 assertions, 0 failures, 0 skipped
43
44
45 2. Testing the Widgets in a headless browser with Jasmine
46
47 $ make phantomjs
48 [ headless jasmine test with console.log() messages
49
50 $ DEBUG=1 make phantomjs PHANTOM_URL=https://example.indexdata.com/jasmine-popup.html
51 [ less debug noise ]
52
53
54 To get a basic help, run:
55 $ make help
56
57
58 File system hierarchy
59 --------------------------------------
60 ./spec          contains *spec.js files for phantomjs
61 ./spec-dev      development *spec.js files
62 ./js            jasmine runtime JS lib
63 ./phantom       scripts for phantomjs tests
64 ./bin           helper scripts
65 ./etc           configuration files
66 ./logs          apache access and error log files
67 ./widgets       screenshots for MKWS widgets
68 ./images        screenshots for testing
69
70 Documentation
71 ---------------------------------------
72 http://pivotal.github.io/jasmine/
73 https://github.com/pivotal/jasmine
74 http://phantomjs.org/
75
76
77 --
78 Copyright (c) 2013-2014 Index Data ApS. http://indexdata.com
79 Oct 2014, Wolfram