|
[]
Continuous Integration with JavaScript
[
tirsen
]
It was when I for the umptenth time broke another unit test in script.aculo.us that I decided that it just had to be enough! We need continuous integration for these buggered JavaScript unit tests. Rake to the rescue! After some hacking around on the ferry to work I had the solution!
desc "Runs all the JavaScript unit tests and collects the results"
JavaScriptTestTask.new(:unittest) do |t|
t.mount("/lib")
t.mount("/src")
t.mount("/test")
t.run("/test/unit/unittest_test.html")
t.run("/test/unit/ajax_inplaceeditor_test.html")
t.run("/test/unit/string_test.html")
t.run("/test/unit/builder_test.html")
t.browser(:safari)
t.browser(:firefox)
end
This will start a WEBRick server with the specified files mounted, run all the combinations of browsers and tests and report back the results: beatrix:~/Projects/rails/spinoffs/scriptaculous tirsen$ rake unittest (in /Users/tirsen/Projects/rails/spinoffs/scriptaculous) /test/unit/unittest_test.html on Safari: FAILURE /test/unit/ajax_inplaceeditor_test.html on Safari: ERROR /test/unit/string_test.html on Safari: SUCCESS /test/unit/builder_test.html on Safari: FAILURE /test/unit/unittest_test.html on Firefox: SUCCESS /test/unit/ajax_inplaceeditor_test.html on Firefox: SUCCESS /test/unit/string_test.html on Firefox: SUCCESS /test/unit/builder_test.html on Firefox: SUCCESS Coming to a script.aculo.us SVN repository near you soon! (Caveat: Only works on the Mac at the moment. Maybe it's time to switch like the rest of the world.) Nice solution, but: just my 2 cents :). regards, Jake. --Jake Robwood, August 18, 2005 12:27 PM
Chill out Jake, he said *at the moment* it only supports Macs... Maybe we can all raise some moola to buy Jake a mini... --Tim Lucas, August 18, 2005 04:07 PM
Sorry, regards, --Jake Robwood, August 18, 2005 05:41 PM
You're not allowed to bring you Mac with you to work!? That's just insane. Maybe it's time to switch work as well...? --Jon Tirsen, August 19, 2005 05:59 AM
> Maybe it's time to switch work as well...? regards, --Jake Robwood, August 19, 2005 10:03 PM
Mac's good. It's sad to live in the world running Linux on servers and Win on desktops. where's trouble? in world or in Mac's? Please, fire it up on other OSes. You're surely do right things. --Vake, October 8, 2006 05:30 PM
Post a comment
|