ChrisS has asked for the wisdom of the Perl Monks concerning the following question:

I would like to be able to see a graphical display of the results of test cases in a Perl script or directory tree of Perl scripts (presumably, these test cases would be developed using Test::More or Test::Simple) -- something akin to Eclipse plug-ins for JUnit tests would be nice.

Ideally, I'd like to generate a red bar next to a description of failing tests, and a green bar next to a description of passing tests for all the tests in a given script or directory structure.

I'd like to know if someone else has already tried this, or get some advice on how more experienced monks would go about this effort. (Specifically, would you suggest some sort of standalone app in Tk or some other GUI framework; or, would you recommend trying to develop a module that becomes part of the Test family?)

Most importantly, would anybody else be interested in an application like this?

Replies are listed 'Best First'.
Re: GUI Interface to Test::* scripts
by revdiablo (Prior) on Jun 08, 2005 at 19:08 UTC

    I'm not sure about anything for Tk, but I know of Test::TAP::HTMLMatrix, which generates very nice HTML output. It shows failures in red and successes in green, and the layout is nice and readable. (Check out the Pugs smoke results for some sample output.) Maybe you can use it as part of a toolchain, at least.

Re: GUI Interface to Test::* scripts
by chromatic (Archbishop) on Jun 08, 2005 at 19:55 UTC

    If I were to do this, I would start with a Tk or other GUI app that launches tests from with IPC::Run or IPC::Open3 or something and uses Test::Harness::Straps to parse the results into data structures.

    If it's easy to use and configure, I'd try it.

        Yes, that's exactly the advantage I had in mind, especially if you use a new enough version of Test::Harness::Straps that can parse diagnostic output.

Re: GUI Interface to Test::* scripts
by mattr (Curate) on Jun 09, 2005 at 16:06 UTC
    I've had nice experience with drawing an annotated bar chart with GD and displaying it in a scrolling window using WxPerl. You will want to be sure to add an idle call in your loop so the window is moveable. Mine came out like this (use magnifier if it looks wierd).