[Wtr-general] Gathering information about how did the test passed

Chris McMahon christopher.mcmahon at gmail.com
Thu Aug 3 11:15:34 EDT 2006


On 8/3/06, dzen <forum-watir-users at openqa.org> wrote:
> Hi all,
>
> after some days working with ruby and watir now i have plenty of test scripts, placed in different dirs. what i need is a script that runs the others and writes the information how did the tests passed in a file. is there any one who knows how this could be done?

Run this code in the same directory as all of your test scripts:

topdir = File.join(File.dirname(__FILE__))
Dir.chdir topdir do
  tests = Dir["test*"]
  tests.each{|x| require x}
end

Note that all of my test scripts are named "test_something.rb".  You
can probably figure out how to get the output to file yourself.



More information about the Wtr-general mailing list