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