Re: JSR223 clarification
Hi Deepak, thanks for that but would it do that during runtime or at "build" time? Cheers Oliver On 3/03/2016 15:20, "Deepak Shetty" wrote: > Hi > from JSR223TestElement (v2.13) > > String cacheKey = > getScriptLanguage()+"#"+ // $NON-NLS-1$ > scriptFile.getAbsolutePath()+"#"+ // > $NON-NLS-1$ > scriptFile.lastModified(); > > So since lastModified is a component of the cache key , it should recompile > and pick up changes if you modify the script file > regards > deepak > > On Wed, Mar 2, 2016 at 4:30 PM, Oliver Erlewein > wrote: > > > Hi all, > > > > I wonder if someone can shed some light on this. > > > > So, using Groovy JSR223 script that I load externally. The JMeter doco > says > > I need not worry about the Cache key as that is implicit with external > > scripts. BUT I changed the script half way through the test and it > > immediately had an effect on the test. That to me says the script is not > > cached but loaded every time. Or is there some logic that looks for > change? > > > > Short question would be " do I need to set the Cache key when loading > > external JSR223 Groovy scripts"? > > > > Cheers Oliver > > >
Re: System.Out.println in Beanshell sampler
FYI , almost always a bad idea to write logs in this manner in a multi-threaded system. On Thu, Mar 3, 2016 at 8:51 AM, Jayesh Guru wrote: > Yes Prakash use this code to print it in a file. > > f = new FileOutputStream("C:/apache-jmeter-2.13/result.csv",true); //True > for appending file,False for ovwerwriting file > p = new PrintStream(f); > this.interpreter.setOut(p); > print("Hello World"); > f.close(); > > > *Thanks * > *Jayesh Guru | (314)609-6046 * > *Email : jayeshgur...@gmail.com * > > On Thu, Mar 3, 2016 at 11:38 AM, Prakash Palnati < > prakash.paln...@snapwiz.com> wrote: > > > Thank you. Can I get it printed on done file? .jtl or .csv > > On 03-Mar-2016 9:44 pm, "Jayesh Guru" wrote: > > > > > It is displayed on the console opened with Jmeter. > > > > > > > > > *Thanks * > > > *Jayesh Guru | (314)609-6046 * > > > *Email : jayeshgur...@gmail.com * > > > > > > On Thu, Mar 3, 2016 at 11:11 AM, Prakash Palnati < > > > prakash.paln...@snapwiz.com> wrote: > > > > > > > Hi, > > > > > > > > Where do the results of System.Out.println go? where can I see them? > > > > > > > > used print() as it does the same as System.Out.println in beanshell > > > > > > > > > > > > Thanks in advance. > > > > > > > > > >
Re: System.Out.println in Beanshell sampler
Hi note that for e.g. beanShell samplers have a default variable named log (values will go into jmeter.log (or can be configured) http://jmeter.apache.org/usermanual/component_reference.html#BeanShell_Sampler regards deepak On Thu, Mar 3, 2016 at 8:38 AM, Prakash Palnati wrote: > Thank you. Can I get it printed on done file? .jtl or .csv > On 03-Mar-2016 9:44 pm, "Jayesh Guru" wrote: > > > It is displayed on the console opened with Jmeter. > > > > > > *Thanks * > > *Jayesh Guru | (314)609-6046 * > > *Email : jayeshgur...@gmail.com * > > > > On Thu, Mar 3, 2016 at 11:11 AM, Prakash Palnati < > > prakash.paln...@snapwiz.com> wrote: > > > > > Hi, > > > > > > Where do the results of System.Out.println go? where can I see them? > > > > > > used print() as it does the same as System.Out.println in beanshell > > > > > > > > > Thanks in advance. > > > > > >
Re: How can I make different threads use different values?
Here is the relevant documentation for distributed mode http://jmeter.apache.org/usermanual/remote-test.html On Thu, Mar 3, 2016 at 11:45 AM, Deepak Shetty wrote: > >I believe JMeter has feature to simulate such scenario by invoking > multiple threads on different machines ? > You can distribute JMeter so that it runs on different machines - but you > really dont want each jmeter machine to only run one thread. > Its easier to run your request through a tunnel or proxy , see what the > command line is really sending to your server and then simulate that in > JMeter (there may be something like custom authentication schemes or binary > stuff that might prevent this approach) > > > > On Thu, Mar 3, 2016 at 11:19 AM, Sheetal Jharia Baru > wrote: > >> Deepak , >> You have a valid point. Running multiple OS processes may not simulate it >> accurately. In ideal case, we will have different users running the >> same *command >> line *requesting images from our single server (this server is load >> balanced obviously). >> I believe JMeter has feature to simulate such scenario by invoking >> multiple >> threads on different machines ? >> >> On Thu, Mar 3, 2016 at 3:14 AM, Deepak Shetty wrote: >> >> > >Even though it is http protocol , I have to use product specific >> commands >> > to download and upload the image to the URL. >> > And when real users are uploading/downloading images , they will all do >> so >> > from the same physical server - if not then you might not be able to >> > simulate this accurately - as running multiple OS processes on the same >> > server can be quite different than running the same process on different >> > servers (HTTP fares better in that respect) >> > >> > On Wed, Mar 2, 2016 at 1:15 PM, Sheetal Jharia Baru < >> sheeta...@gmail.com> >> > wrote: >> > >> > > Thanks for the links, I will go through them. >> > > Even though it is http protocol , I have to use product specific >> commands >> > > to download and upload the image to the URL. >> > > >> > > On Thu, Mar 3, 2016 at 2:36 AM, Deepak Shetty >> wrote: >> > > >> > > > hi >> > > > yes this is pretty much standard for Jmeter. You can use variables >> > > > ${variableName} and you only need to setup how this variable gets >> > > > populated. The most common element used is CSV data set config - but >> > > there >> > > > are others too (read the component reference) >> > > > >> > > > See - >> > > > >> > > > >> > > >> > >> http://jmeter.apache.org/usermanual/component_reference.html#CSV_Data_Set_Config >> > > > And you can google for tutorials >> > > > >> > > > >> > > >> > >> https://www.google.com/search?q=CSV+data+set+config+jmeter+tutorial&ie=utf-8&oe=utf-8 >> > > > >> > > > >> > > > Im curious why you are using an OS Sampler for the purpose of >> > downloading >> > > > an image ? is the protocol not HTTP ? >> > > > regards >> > > > deepak >> > > > >> > > > On Wed, Mar 2, 2016 at 12:10 PM, Sheetal Jharia Baru < >> > > sheeta...@gmail.com> >> > > > wrote: >> > > > >> > > > > I am using OS Sampler to execute a shell script on my local ubuntu >> > > > system. >> > > > > This script in turn downloads a image from remote repository. As >> > > > expected , >> > > > > when the script is run multiple times, same image is downloaded. >> Is >> > > > there a >> > > > > way that each thread can download a different image (can image >> become >> > > > some >> > > > > sort of variable and I can give different image name via this >> > variable >> > > to >> > > > > each thread ? >> > > > > Any help is appreciated. >> > > > > Thanks ! >> > > > > >> > > > >> > > >> > >> > >
Re: How can I make different threads use different values?
>I believe JMeter has feature to simulate such scenario by invoking multiple threads on different machines ? You can distribute JMeter so that it runs on different machines - but you really dont want each jmeter machine to only run one thread. Its easier to run your request through a tunnel or proxy , see what the command line is really sending to your server and then simulate that in JMeter (there may be something like custom authentication schemes or binary stuff that might prevent this approach) On Thu, Mar 3, 2016 at 11:19 AM, Sheetal Jharia Baru wrote: > Deepak , > You have a valid point. Running multiple OS processes may not simulate it > accurately. In ideal case, we will have different users running the > same *command > line *requesting images from our single server (this server is load > balanced obviously). > I believe JMeter has feature to simulate such scenario by invoking multiple > threads on different machines ? > > On Thu, Mar 3, 2016 at 3:14 AM, Deepak Shetty wrote: > > > >Even though it is http protocol , I have to use product specific > commands > > to download and upload the image to the URL. > > And when real users are uploading/downloading images , they will all do > so > > from the same physical server - if not then you might not be able to > > simulate this accurately - as running multiple OS processes on the same > > server can be quite different than running the same process on different > > servers (HTTP fares better in that respect) > > > > On Wed, Mar 2, 2016 at 1:15 PM, Sheetal Jharia Baru > > > wrote: > > > > > Thanks for the links, I will go through them. > > > Even though it is http protocol , I have to use product specific > commands > > > to download and upload the image to the URL. > > > > > > On Thu, Mar 3, 2016 at 2:36 AM, Deepak Shetty > wrote: > > > > > > > hi > > > > yes this is pretty much standard for Jmeter. You can use variables > > > > ${variableName} and you only need to setup how this variable gets > > > > populated. The most common element used is CSV data set config - but > > > there > > > > are others too (read the component reference) > > > > > > > > See - > > > > > > > > > > > > > > http://jmeter.apache.org/usermanual/component_reference.html#CSV_Data_Set_Config > > > > And you can google for tutorials > > > > > > > > > > > > > > https://www.google.com/search?q=CSV+data+set+config+jmeter+tutorial&ie=utf-8&oe=utf-8 > > > > > > > > > > > > Im curious why you are using an OS Sampler for the purpose of > > downloading > > > > an image ? is the protocol not HTTP ? > > > > regards > > > > deepak > > > > > > > > On Wed, Mar 2, 2016 at 12:10 PM, Sheetal Jharia Baru < > > > sheeta...@gmail.com> > > > > wrote: > > > > > > > > > I am using OS Sampler to execute a shell script on my local ubuntu > > > > system. > > > > > This script in turn downloads a image from remote repository. As > > > > expected , > > > > > when the script is run multiple times, same image is downloaded. Is > > > > there a > > > > > way that each thread can download a different image (can image > become > > > > some > > > > > sort of variable and I can give different image name via this > > variable > > > to > > > > > each thread ? > > > > > Any help is appreciated. > > > > > Thanks ! > > > > > > > > > > > > > > >
Re: How can I make different threads use different values?
Deepak , You have a valid point. Running multiple OS processes may not simulate it accurately. In ideal case, we will have different users running the same *command line *requesting images from our single server (this server is load balanced obviously). I believe JMeter has feature to simulate such scenario by invoking multiple threads on different machines ? On Thu, Mar 3, 2016 at 3:14 AM, Deepak Shetty wrote: > >Even though it is http protocol , I have to use product specific commands > to download and upload the image to the URL. > And when real users are uploading/downloading images , they will all do so > from the same physical server - if not then you might not be able to > simulate this accurately - as running multiple OS processes on the same > server can be quite different than running the same process on different > servers (HTTP fares better in that respect) > > On Wed, Mar 2, 2016 at 1:15 PM, Sheetal Jharia Baru > wrote: > > > Thanks for the links, I will go through them. > > Even though it is http protocol , I have to use product specific commands > > to download and upload the image to the URL. > > > > On Thu, Mar 3, 2016 at 2:36 AM, Deepak Shetty wrote: > > > > > hi > > > yes this is pretty much standard for Jmeter. You can use variables > > > ${variableName} and you only need to setup how this variable gets > > > populated. The most common element used is CSV data set config - but > > there > > > are others too (read the component reference) > > > > > > See - > > > > > > > > > http://jmeter.apache.org/usermanual/component_reference.html#CSV_Data_Set_Config > > > And you can google for tutorials > > > > > > > > > https://www.google.com/search?q=CSV+data+set+config+jmeter+tutorial&ie=utf-8&oe=utf-8 > > > > > > > > > Im curious why you are using an OS Sampler for the purpose of > downloading > > > an image ? is the protocol not HTTP ? > > > regards > > > deepak > > > > > > On Wed, Mar 2, 2016 at 12:10 PM, Sheetal Jharia Baru < > > sheeta...@gmail.com> > > > wrote: > > > > > > > I am using OS Sampler to execute a shell script on my local ubuntu > > > system. > > > > This script in turn downloads a image from remote repository. As > > > expected , > > > > when the script is run multiple times, same image is downloaded. Is > > > there a > > > > way that each thread can download a different image (can image become > > > some > > > > sort of variable and I can give different image name via this > variable > > to > > > > each thread ? > > > > Any help is appreciated. > > > > Thanks ! > > > > > > > > > >
Re: How can I make different threads use different values?
Hi Deepak, Prakash, Thanks a lot for your help. Both CSV Data Set config and ctx.getThreadNum solved my problem. I am new to JMeter and finding this small piece of info in vast documentation was difficult. Thanks! On Thu, Mar 3, 2016 at 6:30 AM, Prakash Palnati wrote: > You can use ctx.getThreadNum which will return the current thread number > and use that variable to differentiate which image to point/download. > > -Prakash > On 03-Mar-2016 1:40 am, "Sheetal Jharia Baru" wrote: > > > I am using OS Sampler to execute a shell script on my local ubuntu > system. > > This script in turn downloads a image from remote repository. As > expected , > > when the script is run multiple times, same image is downloaded. Is > there a > > way that each thread can download a different image (can image become > some > > sort of variable and I can give different image name via this variable to > > each thread ? > > Any help is appreciated. > > Thanks ! > > >
Re: Need help with REST API Response data
Look at the headers being returned - Your response probably has Content-Encoding : gzip But the actual data being returned might not be in gzip format regards deepak On Wed, Mar 2, 2016 at 11:57 AM, Amruta Tanksale < atanks...@stonemillconsulting.com> wrote: > Hello, > > > > I have searched extensively for the solution of this problem but did not > get enough information. I am testing a GET request in REST API and > although Sample Result is OK, I do not get any response in Response data > tab. A screenshot is attached. > > > > I am getting this error - *ERROR - > jmeter.protocol.http.sampler.HTTPJavaImpl: readResponse: > java.util.zip.ZipException: Not in GZIP format* > > > > I have no java code. I know my REST API result is huge. (search result). > Please suggest how do I get around this problem? > > > > Thank you > > A > > > > > >
Re: System.Out.println in Beanshell sampler
Yes Prakash use this code to print it in a file. f = new FileOutputStream("C:/apache-jmeter-2.13/result.csv",true); //True for appending file,False for ovwerwriting file p = new PrintStream(f); this.interpreter.setOut(p); print("Hello World"); f.close(); *Thanks * *Jayesh Guru | (314)609-6046 * *Email : jayeshgur...@gmail.com * On Thu, Mar 3, 2016 at 11:38 AM, Prakash Palnati < prakash.paln...@snapwiz.com> wrote: > Thank you. Can I get it printed on done file? .jtl or .csv > On 03-Mar-2016 9:44 pm, "Jayesh Guru" wrote: > > > It is displayed on the console opened with Jmeter. > > > > > > *Thanks * > > *Jayesh Guru | (314)609-6046 * > > *Email : jayeshgur...@gmail.com * > > > > On Thu, Mar 3, 2016 at 11:11 AM, Prakash Palnati < > > prakash.paln...@snapwiz.com> wrote: > > > > > Hi, > > > > > > Where do the results of System.Out.println go? where can I see them? > > > > > > used print() as it does the same as System.Out.println in beanshell > > > > > > > > > Thanks in advance. > > > > > >
Re: System.Out.println in Beanshell sampler
Thank you. Can I get it printed on done file? .jtl or .csv On 03-Mar-2016 9:44 pm, "Jayesh Guru" wrote: > It is displayed on the console opened with Jmeter. > > > *Thanks * > *Jayesh Guru | (314)609-6046 * > *Email : jayeshgur...@gmail.com * > > On Thu, Mar 3, 2016 at 11:11 AM, Prakash Palnati < > prakash.paln...@snapwiz.com> wrote: > > > Hi, > > > > Where do the results of System.Out.println go? where can I see them? > > > > used print() as it does the same as System.Out.println in beanshell > > > > > > Thanks in advance. > > >
Re: System.Out.println in Beanshell sampler
It is displayed on the console opened with Jmeter. *Thanks * *Jayesh Guru | (314)609-6046 * *Email : jayeshgur...@gmail.com * On Thu, Mar 3, 2016 at 11:11 AM, Prakash Palnati < prakash.paln...@snapwiz.com> wrote: > Hi, > > Where do the results of System.Out.println go? where can I see them? > > used print() as it does the same as System.Out.println in beanshell > > > Thanks in advance. >
System.Out.println in Beanshell sampler
Hi, Where do the results of System.Out.println go? where can I see them? used print() as it does the same as System.Out.println in beanshell Thanks in advance.
RE: Using JMeter behind proxy with WPAD
Yep. That worked! :) Thanks. -Original Message- From: Ivan Rancati [mailto:ivan.ranc...@gmail.com] Sent: jueves, 03 de marzo de 2016 11:57 To: JMeter Users List Subject: Re: Using JMeter behind proxy with WPAD I once had a similar problem with PAC (Proxy auto configuration). Not sure whether the two technologies are similar, but worth a try: if you download manually the .dat file, does it contain a list of proxies? If so, you can use of the proxies in the list when you record a session. Have a look also at the http headers when you download the .dat file, some info might be there best regards Ivan On Thu, Mar 3, 2016 at 10:42 AM, Terron Adolfo, ESD < adolfo.ter...@audatexdatos.es> wrote: > Hi all, > I'm trying to configure JMeter to record a session. But I'm facing > some problems since I'm behind a proxy that's using a WPAD URL like > http://wpad.domain.com/wpad.dat > > Anyone of you as solved this issue? > > TIA > > Adolfo > > > > > "This e-mail, any associated files and the information contained in > them are confidential and is intended for the addressee(s) only. If > you have received this message in error please notify the originator > and delete the email immediately. The unauthorised use, disclosure, > copying or alteration of this message is strictly forbidden. E-mails > to and from the company are monitored for operational reasons and in > accordance with lawful business practices. Any opinions expressed are > those of the individual and do not necessarily represent the views of > the company. The company does not conclude contracts by email and all > negotiations are subject to contract. > We make every effort to maintain our network free from computer > viruses but accept no responsibility for any viruses which might be > transferred by this e-mail." > "This e-mail, any associated files and the information contained in them are confidential and is intended for the addressee(s) only. If you have received this message in error please notify the originator and delete the email immediately. The unauthorised use, disclosure, copying or alteration of this message is strictly forbidden. E-mails to and from the company are monitored for operational reasons and in accordance with lawful business practices. Any opinions expressed are those of the individual and do not necessarily represent the views of the company. The company does not conclude contracts by email and all negotiations are subject to contract. We make every effort to maintain our network free from computer viruses but accept no responsibility for any viruses which might be transferred by this e-mail."
Re: Using JMeter behind proxy with WPAD
I once had a similar problem with PAC (Proxy auto configuration). Not sure whether the two technologies are similar, but worth a try: if you download manually the .dat file, does it contain a list of proxies? If so, you can use of the proxies in the list when you record a session. Have a look also at the http headers when you download the .dat file, some info might be there best regards Ivan On Thu, Mar 3, 2016 at 10:42 AM, Terron Adolfo, ESD < adolfo.ter...@audatexdatos.es> wrote: > Hi all, > I'm trying to configure JMeter to record a session. But I'm facing some > problems since I'm behind a proxy that's using a WPAD URL like > http://wpad.domain.com/wpad.dat > > Anyone of you as solved this issue? > > TIA > > Adolfo > > > > > "This e-mail, any associated files and the information contained in them > are confidential and is intended for the addressee(s) only. If you have > received this message in error please notify the originator and delete the > email immediately. The unauthorised use, disclosure, copying or alteration > of this message is strictly forbidden. E-mails to and from the company are > monitored for operational reasons and in accordance with lawful business > practices. Any opinions expressed are those of the individual and do not > necessarily represent the views of the company. The company does not > conclude contracts by email and all negotiations are subject to contract. > We make every effort to maintain our network free from computer viruses but > accept no responsibility for any viruses which might be transferred by this > e-mail." >
Using JMeter behind proxy with WPAD
Hi all, I'm trying to configure JMeter to record a session. But I'm facing some problems since I'm behind a proxy that's using a WPAD URL like http://wpad.domain.com/wpad.dat Anyone of you as solved this issue? TIA Adolfo "This e-mail, any associated files and the information contained in them are confidential and is intended for the addressee(s) only. If you have received this message in error please notify the originator and delete the email immediately. The unauthorised use, disclosure, copying or alteration of this message is strictly forbidden. E-mails to and from the company are monitored for operational reasons and in accordance with lawful business practices. Any opinions expressed are those of the individual and do not necessarily represent the views of the company. The company does not conclude contracts by email and all negotiations are subject to contract. We make every effort to maintain our network free from computer viruses but accept no responsibility for any viruses which might be transferred by this e-mail."
IOException: Stream closed with OS Process Sampler
Good morning, I am using the OS Process sampler to start an ipsec (StrongSwan) connection, and it’s working well until I hit about 100 threads, then the following exception appears WARN - jorphan.exec.StreamCopier: Error writing stream java.io.IOException: Stream closed and the samples start timing out 2016/03/01 13:44:30 INFO - jmeter.reporters.Summariser: summary + 50 in 30.2s =1.7/s Avg: 18785 Min: 14642 Max: 23661 Err: 0 (0.00%) Active: 99 Started: 99 Finished: 0 2016/03/01 13:44:30 INFO - jmeter.reporters.Summariser: summary =338 in 320s =1.1/s Avg: 6789 Min: 101 Max: 23661 Err: 0 (0.00%) 2016/03/01 13:44:32 INFO - jmeter.threads.JMeterThread: Thread started: Open ipsec connections 1-100 2016/03/01 13:45:01 INFO - jmeter.reporters.Summariser: summary + 49 in 30.2s =1.6/s Avg: 21878 Min: 17053 Max: 26981 Err: 0 (0.00%) Active: 100 Started: 100 Finished: 0 2016/03/01 13:45:01 INFO - jmeter.reporters.Summariser: summary =387 in 350s =1.1/s Avg: 8700 Min: 101 Max: 26981 Err: 0 (0.00%) 2016/03/01 13:45:14 WARN - jorphan.exec.StreamCopier: Error writing stream java.io.IOException: Stream closed at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:170) at java.io.BufferedInputStream.read1(BufferedInputStream.java:291) at java.io.BufferedInputStream.read(BufferedInputStream.java:345) at java.io.FilterInputStream.read(FilterInputStream.java:107) at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1792) at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769) at org.apache.jorphan.exec.StreamCopier.run(StreamCopier.java:57) My configuration: I am running Jmeter 2.13 in text (non-GUI) mode on a Ubuntu 15.10 server. I also tried the nightly build r1732820 as I saw a possibly related bugfix **, no change java version "1.8.0_74" (Oracle Jdk). I have also tried the OpenJdk, no change The testplan looks so setUp Thread Group os Process Sampler: restart networking os Process Sampler: delete a ipsec log file, so it does not grow too big os Process Sampler: start the ipsec services constant timer, wait 5 seconds main thread group: 100 threads, run 1 hour with scheduler, rampup 10 minutes os Process Sampler: ipsec up (the name of the connection is a fixed string plus the thread number) verify that an ip address is given, return code is 0, the string “successfully is displayed” constant timer, wait 30 seconds os Process Sampler: ipsec down (name of the connection as above) tearDown os Process Sampler: stop the ipsec services In the test plan, there are a “View Results Tree” and an “Aggregate Report”, which I assume are not used in text mode. I have the same test plan on another computer, where I copy the .jtl file and use JMeter in GUI Mode to look at the results. During the execution of the tests, the server does not show overload (cpu/memory, checked with top) I have also verified manually (for loop in bash) that the ipsec connections configured in ipsec.conf start correctly In the test plan, I tried two variants to execute the command 1: use /bin/bash as the Command, and /usr/local/sbin/ipsec as a parameter (other parameters are then “up” and the name of the connection) 2: use directly /usr/local/sbin/ipsec as the Command, parameters as above Here there is also no difference Is there a limit on the number of open streams? I have tried to run the test with 99 threads, the “Stream closed” exception still appears, if I let the test run long enough, so it does not look like there is a hard coded limit of 100 Thanks for any suggestion and best regards Ivan ** Use Java7 try with resources Close stream leak Remove commented code Fix synchro issue in comparison git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1719558