/
README
51 lines (34 loc) · 1.64 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
YUI Performance Testing Framework
====================================
GETTING STARTED
To run the framework, you'll need a recent version of Node.js (it was tested
with v0.1.98).
Rename conf/config.sample.json to config.json and edit it to your liking, then
execute perf-server.js to start the server. Browse to http://localhost:3000/
(or whatever hostname and port you configured) to view the tests.
ADDING TESTS
Tests live in public/tests. See the README there and follow the existing
examples to implement your own tests.
COMPARING MULTIPLE YUI VERSIONS
In config.json, you'll see a "roots" key. This is a name/value mapping of
arbitrary root names to actual YUI source roots. The sample config includes
root mappings for YUI 3 local and YUI 3.1.1, and assumes you have the
necessary code checked out at ../../ and ../../../yui3-3.1.1/ respectively.
To test against even more YUI versions, or any other JavaScript code, just add
more roots.
Each root maps to a ComboHandler URL which you can use to load static
resources relative to that root, like so:
http://localhost:3000/combo/yui3-local?build/yui/yui-min.js&build/oop/oop-min.js
http://localhost:3000/combo/yui3-3.1.1?build/yui/yui-min.js&build/oop/oop-min.js
You can also configure the YUI 3 Loader to combine resources using these URLs:
YUI({
comboBase: '/combo/yui3-local?',
combine: true,
root: 'build/'
}).use( ... , function (Y) {
...
}
QUESTIONS & PROBLEMS
This is all still a work in progress, so it changes frequently. Sorry about
that. If you have any questions or run into problems, feel free to ping me
(Ryan).