In theory, you can use BeanShell Sampler to do anything - it's just a way of writing Java code that can be executed by JMeter to perform a sample. For example, you could write java code to scan the file system looking for strings in a file.
As far as JMeter is concerned, a sampler is called to perform a _single_ sample (though subresults are also possible). Sample results (with timings) are then made available to Listeners, Assertions etc for further processing. Your BSH Sampler would need to keep track of the previous sample to decide where to go next time it was called. Possible, but messy. There is already a Link Extractor that can be used to extract the first level links. Also the Access Log Sampler can process all the entries in a web-server log. The format is pretty simple, so it would be easy enough to write a script to generate a dummy log file that included all the URLs you wanted to test. Or indeed you could use one of the functions to populate the appropriate fields in an HTTP Sampler by reading these from a file. And you can use the proxy recorder to record HTTP sessions. S. On 20/07/05, Christian Baumgartner <[EMAIL PROTECTED]> wrote: > So am i able to use beanshells to perform like a webspider, crawling through > my pages, each link of them, to a specific link-depth, and record the > request timings, succsessful page load and so on? > > > > -----Ursprüngliche Nachricht----- > Von: sebb [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 20. Juli 2005 13:19 > An: JMeter Users List > Betreff: Re: Jmeter scripting and other tools > > > The BeanShell Sampler can be used to write a script to perform a single > sample. > BeanShell can also be used to create functions and Assertions. > > It's not possible to use BeanShell as a scripting language to > _control_JMeter. > > The JMeter engine uses its own "language", which is what is recorded in the > JMX files. This is not a scripting language. > > S. > On 20/07/05, Christian Baumgartner <[EMAIL PROTECTED]> > wrote: > > Thanks, i already had a look on OpenSTA but I prefer working on all > > platforms.. But in this context -> I read something about BeanShell > > integration. Is that a posibility to do some scripting? And how can i > > realize it? > > > > I found the BeanShell Sampler, but the Docu doesn't really give an > > meaningful example how to use it. But I think thats the thing i was > > looking for in jmeter. > > > > Best regards > > Christian Baumgartner > > > > -----Ursprüngliche Nachricht----- > > Von: Stéphane Birot [mailto:[EMAIL PROTECTED] > > Gesendet: Mittwoch, 20. Juli 2005 09:20 > > An: JMeter Users List > > Betreff: RE: Jmeter scripting and other tools > > > > > > OpenSTA (http://www.opensta.org/) is another open-source tool and it > > use a scripting language to record test plan. It only run under > > windows. > > > > > -----Message d'origine----- > > > De : Christian Baumgartner > > > [mailto:[EMAIL PROTECTED] > > > Envoyé : mercredi 20 juillet 2005 10:03 > > > À : JMeter Mailinglist > > > Objet : Jmeter scripting and other tools > > > > > > Are there any other tools that are that comfortable like jmeter, but > > > also have some skripting languages build in? > > > Sometimes it's really hard to make logic sequences with the > > > 'lego'-like > > > structure of jmeter, and scripting would be easier.. > > > > > > fg > > > > > > > > > -------------------------------------------------------------------- > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]