Thanks for the feedback Charley.
To answer your question, some of our developers want to be able to run some functional tests in their local hosts before checking in code. This also gives them the advantage of being able to check for some fixes before the build is made (time saving). So I figured they could do this by selecting tests from our pool through an XL sheet and have Watir run them. In this case I would want to show the results in the same sheet. Besides this, we also run tests on the trunk/branch builds, in which case xml/html reports make sense. As far as my problem, I was able to figure out a solution (although it may not be the most elegant one). In case anyone needs a similar solution in the future - I found out Test::Unit::UI::Console::TestRunner#finished gets called at the very end of a TUnit test case, so by overriding it and reading TestRunner's @faults and @result instance variables I am able to determine whether a test passed/failed and what errors/failures were generated (if any). Then, I would just have to add logic to update my XL sheet based on these results. Of course, on my TUnit tests I would call my new test runner (which inherits from TestRunner) a-la reporter tool. R. _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Charley Baker Sent: Monday, December 18, 2006 12:51 PM To: [email protected] Subject: Re: [Wtr-general] Integrating TUnit with Excel Hi Rafael, I'm using the test report library you mention to integrate the xml results into Cruise Control for our continuous integration server. Not sure what advantage Excel gives you. However, if you must, the simplest path I can think of would be to use the xml generated by test report and parse it with Rexml, then dump the results into a spreadsheet. All of the data points you're looking for are in the xml file. Otherwise, instead of writing your own runner, you could look at how Alexey has set up his formatters, htmlformatter, xmlformatter, etc and extend out test report to write your own formatter for Excel. -Charley On 12/18/06, Rafael Torres <[EMAIL PROTECTED]> wrote: Hello guys, I'm trying to have my ruby code read Watir test results reported by the TUnit framework to be able to report them into an excel sheet along with the traditional console report. I am able to utilize the Win32OLE library to build my XL interface, but I have to give it the ability to read test results from TUnit to know what to report on the sheet (i.e., passed, failed, print out any errors/failures for each test case, etc.). I tried to look at the Reporter tool designed by Alexey Verkhovsky (http://test-report.rubyforge.org/) - which builds an xml or html report off of TUnit - to see if I could understand his logic to build my XL report, but I'm still unable to accomplish it. Based on my research, and trial/error attempts, it seems to me that what I have to do is create my own test runner - although it's proving to be a little cumbersome to me (I'm having a hard time understanding how TUnit does its internal magic). I'm wondering if there's an easier way to accomplish my goal, or if there's any other idea that can help me on this. Any feedback is appreciated. Thanks in advance, R. _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
