You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Andrea Aime <aa...@opengeo.org> on 2009/08/05 10:32:56 UTC

Using XHTML validator in unit tests

Hi,
I've been using the wicketstuff XHTML validator to
clean up all our app pages from validty issues.
Great stuff, easy to use, good reporting.

Now, I would feel more comfortable to have the XHTML
validation embedded in unit tests as well, so that
if a validation error pops in the tests will simply start
to fail.

However, it seems the filters are not executed in
wicket tester. I looked a bit into the sources and
it seems to be possible to rewrite the main class
to turn it into a validation utility, but I'm not
very comfortable doing that given it's Apache
license and our source code base is GPL instead
(would like to avoid mixing the Apache license
  in the sources, that is).

Is there a better way?
Cheers
Andrea

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Using XHTML validator in unit tests

Posted by Martijn Dashorst <ma...@gmail.com>.
With the well-suitedness I mean that the XHTML validator markup filter
is intended for interactive feedback, and WicketTester should be as
autonomous as possible, requiring no interaction at all.

Martijn

On Wed, Aug 5, 2009 at 9:28 PM, Martijn
Dashorst<ma...@gmail.com> wrote:
> I think the HTML validator is not too well suited for unit tests in
> combination with WicketTester: their scope is different. That said,
> you can let WicketTester write the rendered HTML to files, and
> validate those files in a separate test, using the HTML validator
> stand-alone (not as a markup filter).
>
> Martijn
>
> On Wed, Aug 5, 2009 at 10:38 AM, Andrea Aime<aa...@opengeo.org> wrote:
>> Andrea Aime ha scritto:
>>>
>>> Hi,
>>> I've been using the wicketstuff XHTML validator to
>>> clean up all our app pages from validty issues.
>>> Great stuff, easy to use, good reporting.
>>>
>>> Now, I would feel more comfortable to have the XHTML
>>> validation embedded in unit tests as well, so that
>>> if a validation error pops in the tests will simply start
>>> to fail.
>>>
>>> However, it seems the filters are not executed in
>>> wicket tester. I looked a bit into the sources and
>>> it seems to be possible to rewrite the main class
>>> to turn it into a validation utility, but I'm not
>>> very comfortable doing that given it's Apache
>>> license and our source code base is GPL instead
>>> (would like to avoid mixing the Apache license
>>>  in the sources, that is).
>>
>> Hmm... was wrong here, the validator is GPL'd.
>> Still, would be nice to avoid code duplication,
>> so still looking for nicer solutions
>>
>> Cheers
>> Andrea
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.4 increases type safety for web applications
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Using XHTML validator in unit tests

Posted by Martijn Dashorst <ma...@gmail.com>.
I think the HTML validator is not too well suited for unit tests in
combination with WicketTester: their scope is different. That said,
you can let WicketTester write the rendered HTML to files, and
validate those files in a separate test, using the HTML validator
stand-alone (not as a markup filter).

Martijn

On Wed, Aug 5, 2009 at 10:38 AM, Andrea Aime<aa...@opengeo.org> wrote:
> Andrea Aime ha scritto:
>>
>> Hi,
>> I've been using the wicketstuff XHTML validator to
>> clean up all our app pages from validty issues.
>> Great stuff, easy to use, good reporting.
>>
>> Now, I would feel more comfortable to have the XHTML
>> validation embedded in unit tests as well, so that
>> if a validation error pops in the tests will simply start
>> to fail.
>>
>> However, it seems the filters are not executed in
>> wicket tester. I looked a bit into the sources and
>> it seems to be possible to rewrite the main class
>> to turn it into a validation utility, but I'm not
>> very comfortable doing that given it's Apache
>> license and our source code base is GPL instead
>> (would like to avoid mixing the Apache license
>>  in the sources, that is).
>
> Hmm... was wrong here, the validator is GPL'd.
> Still, would be nice to avoid code duplication,
> so still looking for nicer solutions
>
> Cheers
> Andrea
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Using XHTML validator in unit tests

Posted by Andrea Aime <aa...@opengeo.org>.
Andrea Aime ha scritto:
> Hi,
> I've been using the wicketstuff XHTML validator to
> clean up all our app pages from validty issues.
> Great stuff, easy to use, good reporting.
> 
> Now, I would feel more comfortable to have the XHTML
> validation embedded in unit tests as well, so that
> if a validation error pops in the tests will simply start
> to fail.
> 
> However, it seems the filters are not executed in
> wicket tester. I looked a bit into the sources and
> it seems to be possible to rewrite the main class
> to turn it into a validation utility, but I'm not
> very comfortable doing that given it's Apache
> license and our source code base is GPL instead
> (would like to avoid mixing the Apache license
>  in the sources, that is).

Hmm... was wrong here, the validator is GPL'd.
Still, would be nice to avoid code duplication,
so still looking for nicer solutions

Cheers
Andrea

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org