Hi,
I've completed the class (HTTPSamplerFull.java) extending HTTPSampler.java which
automatically download images on the requested page for sampling. Also I wrote
another class (UrlConfigFull.java) to represent the component which the user can add
to the 'Web Testing' controller in order to sample a page inclusive of its images. I
wrote the classes as extensions i.e. I dumped it into jakarta-jmeter/ext and use
another package name - 'com.hin.jmeter.protocol.http.sampler'
and 'com.hin.jmeter.protocol.http.config' respectively. It worked but I had to make
changes to other classes, namely :
HttpTestSample.java
- addition (1)
'addableList.add(new UrlConfigFull().getClassLabel())' under static {}
to display this component as addable under 'Web Testing' controller
- addition (2)
'if(element instanceof UrlConfigFull)
entry.setSamplerClass (com.hin.jmeter.protocol.http.sampler.HTTPSamplerFull.class);
' under createEntry(ConfigElement)
to use the new sampler for this new ConfigElement
This means that it is not easy to write extensions to jmeter as you need to modify
other classes as you mentioned previously.
I think the following may help overcome the problem of extending jmeter though
For addition(1) :
Maybe we can mark ConfigElements etc with marker classes e.g. make UrlConfigFull.class
implement HttpTestSampleInterface so that we won't have to add static
addableList.add() statements when introducing it. HttpTestSample will just add all
classes which implements HttpTestSampleInterface in its addableList.
Next, I suppose for addition (2). We can introduce getSamplerClass() to ConfigElements
so that they can return their Sampler class when queried by HttpTestSample.java
Just some suggestions, don't know if you are interested to implement them. If so,
I'll be glad to help out 'cos I'm almost done with writing the unit tests for the two
extensions classes which I've created. It does take me sometime to post the
changes/new classes here 'cos I use log4j quite heavily and as such I have to remove
those log4j statements from my codes before posting them here unless you don't mind
having the codes with log4j statements. They don't do harm at all other than adding a
few nanoseconds to processing but the users can easily turn on logging and send me the
log fileif anything I wrote goes haywire.
Will be glad to help you do development if you want.
Thanks.
-----Original Message-----
From: Mike Stover <[EMAIL PROTECTED]>
Date: Thu, 12 Jul 2001 21:46:50 +0000
To: [EMAIL PROTECTED]
Subject: Re: JMeter extensions and browser emulation
> Wow! Thanks. It looks like I'll be working on JMeter a lot for the next
> month, starting next week, so I should be able to catch up on all this
> backlog of stuff soon.
>
> -Mike
>
--
__________________________________________________
Get FREE 50 MB email @ http://www.AtoZasia.com
Powered by Outblaze
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]