jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From COGOLUEGNES Arnaud <ACOGOLUEG...@aston.fr>
Subject RE: validating HTML with JMeter
Date Mon, 25 Apr 2005 07:36:34 GMT
I kept on trying with the DTD validation, but I'm quite a XML newbie. One
drawback of DTD validation is that Java XML API are really strict. If a
document is not well formed, the validation can't be done as the parser
stops. That's why I was looking for specific HTML library. The best would be
to have results like those from the W3C validator (tag not closed, DTD
violation but also hints), but I think I should stop dreaming.

So far, I didn't try with local copies of DTD, as the XML parser is able to
get the DTD from the internet. But it's a good idea to have local copies as
I noticed long delay for validation, think it was coming from the DTD
retrieval.

I'll keep on working on this if my job allows me to, perhaps my first
contribution to JMeter  :-)

Cheers,

Arno

-----Message d'origine-----
De : sebb [mailto:sebbaz@gmail.com]
Envoyé : samedi 23 avril 2005 12:15
À : JMeter Users List
Objet : Re: validating HTML with JMeter


Why not just enhance XML Assertion to add DTD validation as well?
Or maybe XPathAssertion. 
There does not yet seem to be an XML Schema for XHTML, otherwise that
could presumably be used as it is.
Seems unnecessary to have yet another Assertion.

In any case, presumably one would need local copies of the relevant
DTD to allow this to work when offline.

Or have I misunderstood this completely?

S.
On 4/22/05, Dave Maung <dmaung1@yahoo.com> wrote:
> You need to create your own DTD Assertion and extend the functionality to
create XHTML Assertion. you need to point to the following xhtml1-strict.dtd
then xhtml will work as standard way. I have never done it but I am sure it
will work.
> 
> http://www.w3.org/TR/2002/REC-xhtml1-20020801/
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html
>      PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> 
> A.1.1. XHTML-1.0-Strict
> The file DTD/xhtml1-strict.dtd is a normative part of this specification.
The annotated contents of this file are available in this separate section
for completeness.
> A.1.2. XHTML-1.0-Transitional
> The file DTD/xhtml1-transitional.dtd is a normative part of this
specification. The annotated contents of this file are available in this
separate section for completeness.
> A.1.3. XHTML-1.0-Frameset
> The file DTD/xhtml1-frameset.dtd is a normative part of this
specification. The annotated contents of this file are available in this
separate section for completeness.
> 
> Dave
> 
> 
> Peter Lin <woolfel@gmail.com> wrote:
> I'm not aware of a XHTML validation library. Many of the libraries out
> there like HtmlParser, JTidy are built to fix bad html and make it
> XHTML compliant. I suppose one option would be to strip out the
> javascript and then run it through DTD validation.
> 
> not sure how that would work, but it's an idea.
> 
> peter
> 
> On 4/22/05, COGOLUEGNES Arnaud wrote:
> > thanks for quick answers.
> >
> > I downloaded 2.0.3 and tried the XML assertion. If I may give some
critics:
> > - it's an assertion, so it must be plugged to each request. I was more
> > thinking about a listener, as it can be easily added/removed from the
test
> > plan (JMeter's first goal is load testing, so tests could be altered by
the
> > HTML validation)
> > - it's using JTidy. I don't know much about this parser but it didn't
> > detect none closed tag and looks pretty old. Tell me if I'm wrong.
> >
> > I began working on a listener with DTD validation (with JDK default XML
> > libraries, that is Xerces I think). It's working quite well (thanks to
> > JMeter extensibility ;-) ) but the DTD validation doesn't really suit to
> > HTML validation (because of JavaScript for example). Does anyone know a
good
> > Java (X)HTML validator?
> >
> > Thanks.
> >
> > Arno
> >
> > PS: tell me if this thread should continue on the developper list.
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
*** We scanned this email for malicious content ***
*** IMPORTANT: Do not open attachments from unrecognized senders  ***
*** MailSystem ASTON ***

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message