Fwd: collapsible sections in TAP::Formatter::HTML

Steve Purkis steve at purkis.ca
Thu Jul 10 08:37:27 UTC 2008


FYI...  I thought you guys might appreciate some feedback on how the  
new framework is being used:


Begin forwarded message:
> From: "William Seppeler" <releppes at gmail.com>
> Date: July 7, 2008 14:26:05 BDT
> To: "Steve Purkis" <steve at purkis.ca>
> Subject: Re: collapsible sections in TAP::Formatter::HTML
>
>> In case you wanted to know how your module is being used...
>
> [snip!]
>
> That's really cool!  It's great to see TAP being used for 'non- 
> perl' stuff too.  Do you mind if I forward this on to the TAP  
> Harness developers?  I think they'd get a kick out of what you're  
> doing!
>
>
> It's ok with me.
>
> Before I started using the Perl test framework, I was using my own  
> home-brew of version of TAP.  My Test module used a node tree  
> structure to store test results instead of a flat array.  It was a  
> simple module that provided a lot of functionality for nested  
> testing, but it wasn't Test::Harness compatible.
>
> I'm migrating my test infrastructure to a more standardized Perl  
> TAP framework so I can leverage modules such as your  
> TAP::Formatter::HTML.  Who knows, I may need a TAP::Formatter::SQL  
> module down the road.  Might just as well keep my options open now.
>
> Thanks for everything,
>
> -William
>


Begin forwarded message:

> From: "William Seppeler" <releppes at gmail.com>
> Date: June 26, 2008 14:38:05 BDT
> To: "Steve Purkis" <steve at purkis.ca>
> Subject: Re: collapsible sections in TAP::Formatter::HTML
>
>
> On Wed, Jun 25, 2008 at 4:29 PM, Steve Purkis <steve at purkis.ca> wrote:
> Hi William,
>
> That sounds strange - it should be working out of the box.  The  
> "move external" comment is just a note-to-self, shouldn't affect  
> functionality.  I've just double-checked, and the file on CPAN does  
> indeed have that jQuery in it:
>
> http://search.cpan.org/src/SPURKIS/TAP-Formatter-HTML-0.04/lib/TAP/ 
> Formatter/HTML/default_report.tt2
>
> It could be that it can't find jquery-1.2.3.pack.js - are you  
> opening the 'index.html' from the same computer the tests were run on?
>
>
> Ahhh...That was it!
>
> I kept looking at the html source but didn't notice the reference  
> to local files.  I fired up a browser on the machine I generated  
> the html on and all worked as expected.  I was running my tests on  
> one machine and viewing the results from another.
>
> Sorry for all the confusion.
>
>
> If not, are you using your own custom tt2 template?
>
> Nope, I've been using TAP::Formatter::HTML at it's most basic level:
>
>    prove -vm --formatter=TAP::Formatter::HTML > index.html
>
> It works great, but I'll need to work around the collapsible  
> sections for now.  Even when I do view the html files correctly,  
> the collapsible sections only work some of the time.  Sometimes  
> when I collapse a section, the screen doesn't automatically shrink  
> back down.  I get this behavior on your demo pages as well.  For  
> now, I'm using Your module to provide that little extra eye candy  
> for my reports.
>
> In case you wanted to know how your module is being used...
>
> I write test code to test network switches and routers.  All  
> configuration is done via SNMP using Perl scripting.  I just  
> started using the Perl test framework to test the return code of  
> every SNMP request, so a typical test, I would do something like:
>
>     ok(
>         $switch->vlan_create({
>             vid => $vid,
>             vlan_name => $vlan_name,
>             tagged => $tagged,
>             untagged => $untagged
>         }),
>         "vlan_create($vid, '$vlan_name', [@$tagged], [@$untagged])"
>     );
>
> Your TAP::Formatter::HTML module gives a very nice polished output  
> for a complete test:
>
>   t/
>     01-init.t
>     02-setup_topology.t
>     03-...do something
>     04-cleanup.t
>
> Another usage is converting third party test output into TAP, then  
> using your module to give a consistent presentation.  Ixia.com has  
> a test product called ANVL which will perform spanning tree and  
> vlan compliance tests on a product.  I have a simple Perl script  
> which parses an ANVL output log and converts it into TAP which I  
> use your module to host on our internal web.  Another example is  
> the TAHI group which provides compliance tests for IPv6 protocol  
> (SIP and other tests) for free.  They have nice html log files, but  
> to keep things consistent, I have a Perl parser that'll convert  
> their logs into TAP as well. (these scripts are surprisingly small).
>
> It seems extraneous to convert all these logs into TAP, but in the  
> process, I also perform a bug query on every failure.  So for each  
> test failure, I create a bug report (using Mantis and MySQL)  
> against our switch product.  When my Perl test code see a failure  
> it already has a bug associated with it, I mark it as a TODO item.   
> If it's a broken test, I'll mark the test as SKIP.  Your  
> TAP::Formatter::HTML module really shines here.  If I run a test  
> and have a big red FAIL banner at the top, it means I need to open  
> Mantis and document a few bugs.  If everything is green, then my  
> job is done.  All the TODO items must get fixed or become part of  
> the release notes.
>
> It's not a perfect system, but it's an example our how your module  
> is being used.
>
> Thank you again for your CPAN contribution!
>
> -William

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.hexten.net/pipermail/tapx-dev/attachments/20080710/62516e57/attachment.htm 


More information about the tapx-dev mailing list