Automated jQuery tests with QUnit
(sudo) gem install zfben_hanoi
zfben_hanoi # prepare the target directory rake test:js # run the tests
How To Use
Prepare the target directory, you can use one of the following options:
hanoi hanoi . hanoi /path/to/project
You need a valid Rake installation to run your tests:
You can specify to run the test against one or more browsers:
rake test:js BROWSERS=firefox,chromium
You can specify to run only certain tests:
rake test:js TESTS=path/to/first_test.js,path/to/second_test.js
You can combine both
zfben_hanoi executable will create the following structure:
Rakefilecreates a fresh Rake file, you have to edit it according to your setup
testHanoi creates it if missing, otherwise will choose between existing
assetscontains the jQuery and QUnit source file and a css. Place your assets in this directory, it's mapped as root path
example_test.jsis a sample of a real test case.
templatescontains the template file for your tests. You shouldn't edit it, if you don't know the risk.
fixturescontains all the HTML fixtures, each file will be injected into the proper case.
By convention, your
_test.js suffix to each test case and the
_fixtures.html to each fixture file.
You have probably noticed that
file_2_fixtures.html is missing, this because fixtures are optional.
Browsers & Platforms
git clone git://github.com/benz303/zfben_hanoi.git
(c) http://zfben.com, released under the MIT license