[Zope-dev] Adding W3C validating to zope.testbrowser

Ross Patterson me at rpatterson.net
Sun Feb 21 04:52:20 EST 2010


Ross Patterson <me at rpatterson.net> writes:

> I started a branch for doing W3C HTML validation on responses to
> zope.testbrowser requests:
>
> svn://svn.zope.org/repos/main/zope.testbrowser/branches/rossp-validator
>
> The idea is to be able to flip a switch and run all my functional
> zope.testbrowser tests and see validation failures as test failures.
> The current implementation in that branch just uses a simple environment
> variable since I wasn't sure what the best way was to support flipping a
> switch like that.  Note that it's possible to use a local installation
> of the W3C validator (such as is available on Debian based systems in
> the w3c-markup-validator package) so that the validation doesn't
> actually slow tests down all that much.
>
> I have a couple of questions I'd like to hear any thoughts on.
>
> What's the best way to support "flipping the switch" in a global sense
> so that during the inner testing loop extra time isn't being wasted on
> repeated validations?
>
> Does this belong in zope.testbrowser or in the underlying mechanize
> package?

Another option would be to integrate this with the publisher itself.
For example, an option could be provided for validating the HTML to be
returned by the publisher whenever it's running in validating mode,
similar to debug mode.  It seems like this could make the validating
service more accessible to less technical users.  I'm not really sure
where this belongs.

Ross

> Other than that, what's the path forward to merging?
>
> Ross
>
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev at zope.org
> https://mail.zope.org/mailman/listinfo/zope-dev**  No cross posts or HTML encoding!  **
> (Related lists - 
>  https://mail.zope.org/mailman/listinfo/zope-announce
>  https://mail.zope.org/mailman/listinfo/zope )



More information about the Zope-Dev mailing list