On 04/06/06, sebb <[EMAIL PROTECTED]> wrote:
On 30/05/06, Bennett McElwee <[EMAIL PROTECTED]> wrote:
> The HTML samplers can automatically retrieve embedded images from web
> pages, but it doesn't work for all XHTML pages or WML pages. I thought
> I'd warn users about this, and bounce my solution off you good people.
>
> JMeter determines whether a file is HTML by checking that its media type
> is text/html. If it's something else, for example application/xhtml+xml,
> application/xml, text/xml or text/vnd.wap.wml, then it won't try to
> parse the file to retrieve embedded resources. So if you're trying to
> test a WAP or XHTML application, JMeter may not be able to do what you
> want.
>
> As far as I can tell, this could be fixed most simply by changing
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase as follows:
>
> 1. In downloadPageResources(), "text/html" is hardcoded. Either read a
> list of allowed media types from properties, or hardcode a list of media
> types. Maybe just allow any media type that contains "html" or "wml".

Sounds like a good idea.
Perhaps you could create a Bugzilla enhancement for this?

> 2. If parsing a WML page, ignore the configured parser and use
> RegexpHTMLParser. (I guess the other parsers won't handle WML.)

Not sure about parsing WML pages - they seem to be rather different
from (X)HTML.

But it should not be too difficult to specify a different parser for
certain types of content - we could just add a  wmlParser.classname
property alongside the htmlParser.classname.

Perhaps we could also add:

htmlParser.mimetypes
wmlParser.mimetypes

to specify the MIME media types that JMeter can handle, as well as
which is HTML and which is WML?

> Could some knowledgeable person confirm that this should work? If so, I
> will hunt down a JDK and try to make it happen. If I can find time I
> will try to submit a patch, but don't hold your breath...

A Bugzilla enhancement would be useful...


Actually, don't bother creating a Bugzilla request...

It was easy enough to add the code, so please just check out the
nightly build 2-1.20060604 instead, and see if it works for you.

Configuration details are in jmeter.properties.

S.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to