Rails test runner
Summary
This is a simple Rails application that allows remote execution of Ruby/Watir scripts. The scripts are expected to use Ruby's Test::Unit module, although modifying the app to properly handle other types of console output would be trivial.
The Rails app runs on the client intended to execute the tests; when a user accesses the application URL remotely, they should see a page containing the list of scripts available to run.
Clicking on a script's name will start execution, and the console output of the test script is displayed in the browser.
Installation and usage
Note that this app does not use a database, so there's no need to configure one during installation.
Install steps:
- On the client that will run the tests, install rails with 'gem install rails'
- Download runner.zip from the link below, and extract it in any dir on the client.
- Start a cmd.exe shell and cd into the extracted 'runner' dir.
- Launch the app with the command "ruby script/server"
- From either the local or a remote machine, open a browser and access http://HOST:3000
(where HOST is your machine's address) - Attempt to run the google test suite. (Note: Watir must be installed for the google suite to work.)
- If that works, place your own scripts into runner/db/test_files/suites/ and try to run them using the application.
Comments (6)
Mar 28, 2007
David Brown says:
Bill, Thank you very much for posting this test runner. It is great to finally ...Bill, Thank you very much for posting this test runner. It is great to finally have a way for developers who don't have Watir & Ruby installed on their machines to be able to run test and view the results remotely!
May 18, 2007
Robert Shaw says:
Bill, This is awsome.. I have been looking for something like this. We use WAT...Bill,
This is awsome.. I have been looking for something like this.
We use WATIR to run compatability tests against vaious ie/os versions..
Being able to run from one common lib.. Priceless..
I am having an issue with some of our suite..
Tests are not running and getting... with NO console output.
ApplicationController: missing default helper path application_helper
RunnerController: missing default helper path runner_helper
Any Ideas..?
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
C:/runner/config/environment.rb:4: warning: already initialized constant RAILS_R
OOT
ApplicationController: missing default helper path application_helper
RunnerController: missing default helper path runner_helper
May 24, 2007
Bill Agee says:
Robert - I sent a PM to your forum username with some suggestions. And there's ...Robert - I sent a PM to your forum username with some suggestions.
And there's another thing I just remembered to suggest: You might check to see if the problem scripts work when you manually execute them from a different directory. For example, cd to the root of your drive and run "ruby \path\to\script\foo.rb", and see if it works.
If it complains about not finding a required file then it is probably why the script isn't working in the runner. The runner's working dir is the runner\ directory, and not the runner\suites\ dir, where the test scripts live. I should probably change that and post a new version of the app.
There are a couple of ways to fix this on your end:
http://www.mail-archive.com/wtr-general@rubyforge.org/msg07822.html
http://www.mail-archive.com/wtr-general@rubyforge.org/msg07895.html
Apr 19, 2010
Lokesh says:
Thanks Bill. Nice to see updated version. Its working perfectly fine. :) Cheer...Thanks Bill.
Nice to see updated version. Its working perfectly fine. :)
Cheers,
Lokesh Agrawal
Oct 14, 2010
Felipe Vega says:
Hi, I've got the following error after clicking on the unique link at home page...Hi,
I've got the following error after clicking on the unique link at home page:
C:\Runner>ruby -CC:/Runner/script/../db/test_files/suites C:/Runner/script/../db/test_files/suites/google_suite.rb -- -v verbose 1>log/runner/console-2010-10-14_-_10-03-37.log
The system cannot find the path specified.
Any suggestion?
Thanks,
Felipe
Oct 18, 2010
Zeljko says:
We do not provide support via comments. For support please see http://watir.com/...We do not provide support via comments. For support please see http://watir.com/support