GrandFather has asked for the wisdom of the Perl Monks concerning the following question:
I'm embarking on writing a test suite for the HTML renderer used by PerlMonks Editor. I could check the rendered HTML by performing string matches against the expected result, but this is HTML and that is a fragile way of performing the checking.
I could use a module such as HTML::Diff which provides semantic differencing between two chunks of HTML, but that introduces an extra dependency that is only required for testing.
I could "repackage" key pieces of HTML::Diff to do the work I need, but that could be a lot of work and may be dodgy with respect to licencing.
My inclination at the moment is to go the small dependency but possibly fragile route of pretty much just directly comparing output with expected output. Is there a better solution that I have overlooked?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Should I use modules to augment testing
by adrianh (Chancellor) on Aug 13, 2006 at 10:27 UTC | |
|
Re: Should I use modules to augment testing
by mirod (Canon) on Aug 13, 2006 at 11:11 UTC | |
|
Re: Should I use modules to augment testing
by jkeenan1 (Deacon) on Aug 13, 2006 at 14:43 UTC |