Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (34 sloc) 1.64 KB
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).