JavaSampler, complex response processing
Hi all, I have some difficulties putting together a testplan for a EJB Interface Test. My Setup: --- J2EE Container with a couple of Stateless Session Bean. I would like to call the first (login) which comes back with the sessionid and do a second, third, etc call using that sessionid. --- I am not quite sure how to fill the SampleResult wisely. Especially when I want to give back a complex Result. Concret my second Sample would produce a List of a comlex result structure (list of business items) and I need to pull some values out of the result within the Testplan. Does anybody can give a example how to fill the SampleResult if the Result is a somewhat complex structure in this case a list of entities. How do I use the following methods in this case of a JavaSampler? void setContentType(String string) void setDataEncoding(String dataEncoding) void setDataType(String dataType) void setRequestHeaders(String string) void setResponseCode(String code) void setResponseData(byte[] response) void setResponseHeaders(String string) void setResponseMessage(String msg) void setSampleLabel(String label) void setSamplerData(String s) On which part of the result does the postprocessor work to pull out the values using regexs? Thank you very much for you help. Cheers, Axel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Testing through Browsers
As I gone through the document of jmeter I would not found any where to use the browser test, But I ve seen the info to test directly sending request to HTTP not via through the browser. JMeter does not instantiate and control a web-browser. JMeter is a great tool for *simulating* the effect of a browser (or hundreds of browsers) hitting your webserver. JMeter also has a built-in proxy server which you can connect to with your browser - this helps automate the creation of test scripts. If you want to load test with direct control of a browser directly, such a setup may work: 1. Setup a test client with VNC server loaded 2. Connect to it, use rfbproxy to record your test script http://cyberelk.net/tim/rfbproxy/ 3. Now use rfbmacro to play back the test script http://cyberelk.net/tim/rfbplaymacro/ 4. To scale up for load testing, either use idle machines running VNC server ...or (more likely) setup multiple of VMware-style virtual machines on a few servers and use them. You should be able to instantiate multiple separate browser sessions in the same desktop session by using COM or DCOP or similar desktop-component architecture to control a browser programmatically. One day, when I have some more time (and skills), I hope to complete a JMeter VNC proxy component that implements rfbproxy-like functionality (kind of like how the JMeter HTTP proxy automatically creates test scripts, but with VNC protocol). With regards, Sonam Chauhan -- Corporate Express Australia Ltd. Phone: +61-2-9335-0725, Fax: 9335-0753, Email: [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, 20 May 2004 7:18 AM To: JMeter Users List Subject: Re: Testing through Browsers I have found that BadBoy can be used to step through http request but only for IE. http://www.badboy.com.au/ Craig Palmer [EMAIL PROTECTED] on 05/19/2004 04:09:06 PM Please respond to JMeter Users List [EMAIL PROTECTED] To:JMeter Users List [EMAIL PROTECTED] cc: Subject:Re: Testing through Browsers JMeter is a separate tool from any browser product on the market JMeter builds upon java APIs to fulfil http requests etc. If you want to automatically run a test that uses a browser directly, then I'd suggest that you need to take control of the keyboard and mouse as both browsers you have mentioned are proprietary as far as I know - they dont have published APIs of the sort that may be useful to you assuming that you want to do more than just browse links (you can use javascript to redirect browsers through links and forms). If you're a java programmer then Java provides a nice facility for this called JRobot. There are also commercial tools available like Rational Robot. However be aware that load testing may prove difficult as you'll only be able to effectively run one request concurrently per PC/desktop assuming a single screen.. Craig. Somashekar Sonnagi wrote: Hi friends I am new to this tool,I am checking whether this tool will fulfill my requirements r not. My requirements is to test the http requests through particular user browser like IE netscape , As I gone through the document of jmeter I would not found any where to use the browser test, But I ve seen the info to test directly sending request to HTTP not via through the browser. So can anyone tell me is it possible to test HTTP request via Browsers through this tool ? Or plz let me know the tools which u know with which I can fulfil my requirements. Thanx Regards Somashekhar Sonnagi - 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]
RE: JMeter ThreadGroup properties
[redirecting to the JMeter user list] I don't think that there is any way to access the thread count directly. But you can define the thread-count in terms of a property, e.g. jmeter -Jthreads=123 Then set (and read) the thread count using ${__P(threads)} S. -Original Message- From: priya soparkar [mailto:[EMAIL PROTECTED] Sent: 25 May 2004 11:06 To: [EMAIL PROTECTED] Subject: JMeter ThreadGroup properties Hi, How can I get the values of ThreadGroup proeprties in JMeter ? For example, im my test plan, I have t ThreadGroups, each with different number of threads and iterations and schedulars. In my sampler class I want to retrieve the values of these properties(specified in JMeter GUI). I understand that these values are stored in .jmx file.But reading these values from .jmx seems to be costly. Can any one tell me how these property values are to be retrieved ?(Acc to my information the _P(...) function is used to retrieve command line parameters. Please inform the possible ways in JMeter. Thanks, Priya - Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger ___ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. ___ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple parameters for Test
[Please ask usage questions on the JMeter user list] There are details of how to parameterise tests in the JMeter FAQ. Also look at the functions: __CSVRead() _StringFromFile() S. -Original Message- From: Akbar, Gul [mailto:[EMAIL PROTECTED] Sent: 25 May 2004 11:17 To: '[EMAIL PROTECTED]' Subject: Multiple parameters for Test Hi I have been trying to use different values for a parameter using the users.xml file and HTTP User Parameter Modifier under the pre-processors. I would like to test about a hundred values under one user (thread) for that parameter. For example: the tests are to be HTTP requests in the form: http://server.com/test.cgi?query=test1 http://server.com/test.cgi?query=test1 and for that same thread, I would like to try out test2 as a value for the query parameter. My users.xml file looks like: allthreads thread parameter paramnamequery/paramname paramvaluetest1/paramvalue /parameter parameter paramnamequery/paramname paramvaluetest2/paramvalue /parameter . /thread /allthreads However, the second value of parameter is never tested. Would I need to go to the source code for this, so for it to iterate through the different parameter values for the same parameter name? Regards Gul Gul Akbar Software Developer The British Library Wetherby 01937 54-6004 www.gakbar.co.uk http://www.gakbar.co.uk/ ** Experience the British Library online at www.bl.uk Help the British Library conserve the world's knowledge. Adopt a Book. www.bl.uk/adoptabook * The information contained in this e-mail is confidential and may be legally privileged. It is intended for the addressee(s) only. If you are not the intended recipient, please delete this e-mail and notify the [EMAIL PROTECTED] : The contents of this e-mail must not be disclosed or copied without the sender's consent. The statements and opinions expressed in this message are those of the author and do not necessarily reflect those of the British Library. The British Library does not take any responsibility for the views of the author. * ___ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. ___ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multiple parameter values for Test
Hi I have been trying to use different values for a parameter using the users.xml file and HTTP User Parameter Modifier under the pre-processors. I would like to test about a hundred values under one user (thread) for that parameter. For example: the tests are to be HTTP requests in the form: http://server.com/test.cgi?query=test1 and for that same thread, I would like to try out test2 as a value for the query parameter. My users.xml file looks like: allthreads thread parameter paramnamequery/paramname paramvaluetest1/paramvalue /parameter parameter paramnamequery/paramname paramvaluetest2/paramvalue /parameter . /thread /allthreads However, the second value of parameter is never tested. Would I need to go to the source code for this, so for it to iterate through the different parameter values for the same parameter name? Regards Gul Gul Akbar Software Developer The British Library Wetherby 01937 54-6004 www.gakbar.co.uk ** Experience the British Library online at www.bl.uk Help the British Library conserve the world's knowledge. Adopt a Book. www.bl.uk/adoptabook * The information contained in this e-mail is confidential and may be legally privileged. It is intended for the addressee(s) only. If you are not the intended recipient, please delete this e-mail and notify the [EMAIL PROTECTED] : The contents of this e-mail must not be disclosed or copied without the sender's consent. The statements and opinions expressed in this message are those of the author and do not necessarily reflect those of the British Library. The British Library does not take any responsibility for the views of the author. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Deprecation of setTime()
Hi What's the logic behind deprecating this method in JMeter 2.0.0? void org.apache.jmeter.samplers.SampleResult.setTime(long elapsed) I use it in circumstances where the elapsed time is returned by an object several calls deeper in the stack. Using sampleStart() / sampleEnd() would cause a distortion in this case. I would prefer not to use SampleResult deeper in the call stack as I am trying to decouple JMeter from the core logic of out test framework. I realise that this creates a disparity between sample times and throughput but this is acceptable for us. TIA for any help. Sam http://www.espeed.co.uk CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Copyright and any other intellectual property rights in its contents are the sole property of eSpeed, Inc and its affiliates. This e-mail was issued by eSpeed International Limited (eSpeed). eSpeed is a limited liability company incorporated under the laws of England (company number 3809189 and VAT registration number 577 406809). eSpeed's registered office is at One America Square, London EC3N 2LS. For any issues arising from this email please reply to the sender. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(s). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Binding server to IP address/port
Is it possible to bind a JMeter server/engine to a particular IP address or port? If I have a beefy box and I want to run 2 engines on it, off of separate NICs, could I do it? Thanks! -- Regards, joe Joe Casadonte [EMAIL PROTECTED] 1016 West Ninth Avenue King of Prussia, PA 19406 610-491-9881 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Testing through Browsers
Hi. Here's a useful tutorial that helps to understand what JMeter is capable of : http://javaboutique.internet.com/tutorials/JMeter/ Lee Peterson SAS Institute Inc. SAS ... The Power to Know -Original Message- From: Sonam Chauhan [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 25, 2004 3:47 AM To: 'JMeter Users List' Subject: RE: Testing through Browsers As I gone through the document of jmeter I would not found any where to use the browser test, But I ve seen the info to test directly sending request to HTTP not via through the browser. JMeter does not instantiate and control a web-browser. JMeter is a great tool for *simulating* the effect of a browser (or hundreds of browsers) hitting your webserver. JMeter also has a built-in proxy server which you can connect to with your browser - this helps automate the creation of test scripts. If you want to load test with direct control of a browser directly, such a setup may work: 1. Setup a test client with VNC server loaded 2. Connect to it, use rfbproxy to record your test script http://cyberelk.net/tim/rfbproxy/ 3. Now use rfbmacro to play back the test script http://cyberelk.net/tim/rfbplaymacro/ 4. To scale up for load testing, either use idle machines running VNC server ...or (more likely) setup multiple of VMware-style virtual machines on a few servers and use them. You should be able to instantiate multiple separate browser sessions in the same desktop session by using COM or DCOP or similar desktop-component architecture to control a browser programmatically. One day, when I have some more time (and skills), I hope to complete a JMeter VNC proxy component that implements rfbproxy-like functionality (kind of like how the JMeter HTTP proxy automatically creates test scripts, but with VNC protocol). With regards, Sonam Chauhan -- Corporate Express Australia Ltd. Phone: +61-2-9335-0725, Fax: 9335-0753, Email: [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, 20 May 2004 7:18 AM To: JMeter Users List Subject: Re: Testing through Browsers I have found that BadBoy can be used to step through http request but only for IE. http://www.badboy.com.au/ Craig Palmer [EMAIL PROTECTED] on 05/19/2004 04:09:06 PM Please respond to JMeter Users List [EMAIL PROTECTED] To:JMeter Users List [EMAIL PROTECTED] cc: Subject:Re: Testing through Browsers JMeter is a separate tool from any browser product on the market JMeter builds upon java APIs to fulfil http requests etc. If you want to automatically run a test that uses a browser directly, then I'd suggest that you need to take control of the keyboard and mouse as both browsers you have mentioned are proprietary as far as I know - they dont have published APIs of the sort that may be useful to you assuming that you want to do more than just browse links (you can use javascript to redirect browsers through links and forms). If you're a java programmer then Java provides a nice facility for this called JRobot. There are also commercial tools available like Rational Robot. However be aware that load testing may prove difficult as you'll only be able to effectively run one request concurrently per PC/desktop assuming a single screen.. Craig. Somashekar Sonnagi wrote: Hi friends I am new to this tool,I am checking whether this tool will fulfill my requirements r not. My requirements is to test the http requests through particular user browser like IE netscape , As I gone through the document of jmeter I would not found any where to use the browser test, But I ve seen the info to test directly sending request to HTTP not via through the browser. So can anyone tell me is it possible to test HTTP request via Browsers through this tool ? Or plz let me know the tools which u know with which I can fulfil my requirements. Thanx Regards Somashekhar Sonnagi - 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]
how to run a logout transaction once
I would like to have users run these in this order in a scheduled simulation duration: 1. a first set of transactions once, 2. then run a second set randomly and repeatedly, 3. then finally when simulation time is near the end, run a thrid set of transactions once. For the first 2 sets, I realize I can use the Once Only Controller and Random Controller respectively. However, I don't know how to get the last set to run only once at the time I want. The last set of transactions is essentially logout. I would like the user to only login/logout once through the entire simulation. For the other transactions, I would like the users to repeat until the simulation time has ended. The final action should be logout before the simulation ends. Can anyone think of a way to achieve this? Thanks, Mabel - Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger