Hi, _elgato.
AfaIk, there is no Thread Group number/sequence/index in JMeter's functions
list.
As explained by Dmitri, you could use a naming pattern on the Thread Group
names and extract the group number using regular expressions.
Kind regards,
Flavio Gomes
On Mon, Jul 11, 2022 at 8:46 AM
this goal.
Best of luck.
Be safe and drink water!
Flavio Cysne
On Thu., Jul. 23, 2020, 11:17 a.m. deepak kodigepalli, <
deepak.kodigepa...@gmail.com> wrote:
> Hi,
>
> Is there anyway where we can create a JDBC connection using JDBC Connection
> Confiuration during runt
Hi Anil,
what's the error you are experiencing? Could you sent us the error message?
How are you capturing the requests from your app into JMeter? Are you
testing the mobile app using a device emulator or a real device?
If it's via Proxy configuration, did you add JMeter Dummy certificate to
gt; escreveu:
>
>
> Am 9. November 2017 11:10:55 MEZ schrieb Flavio Cysne <
> flaviocy...@gmail.com>:
> >After the character # there are 3 parameters, and, as I said, you can't
> >guarantee that the parameter the OP is looking for is the very first
> >one
2017 6:59 AM, "Felix Schumacher" <
felix.schumac...@internetallee.de> escreveu:
Am 09.11.2017 um 10:56 schrieb Flavio Cysne:
> The provided URL have other 2 parameters: scope and id_token.
>
> You can't guarantee that access_token will be always the first parameter.
>
The provided URL have other 2 parameters: scope and id_token.
You can't guarantee that access_token will be always the first parameter.
But, I think, it will always come after the character #.
#[.*]access_token=([^#&;"']*)
This expression can be used to extract the other 2 parameters. Just
http://flaviocysne.blogspot.com.br/2012/06/how-to-dynamically-increasedecrease.html
You can add a Constant Timer in the first Sampler of your Test plan and
write an exponential formula inside a JMeter function like
${__javaScript(Math.pow(${__threadNum()},2)}. This constant Timer will act
like a delay to the first Sampler, in a similar way of the rampup.
Hope it helps.
A long time ago I asked a similar question in this list. The answer I
received was that Latency in JMeter is the time elapsed since the request
sent and the first chunk (4kb) of the response is received.
To overcome this issue I start a program inside a shell or prompt to get
latency statistics
Counters are per JMeter slave and, if chosen, by Thread user.
When doing a local test there's only one slave, per say. When executing a
distributed test each slave will count starting from the same number
written in the test script.
To have a counter to start with different values you should add
Maybe this code will help: http://goo.gl/9ip6bD
Adding up.
Did you try using addConfigElement instead of addTestElement ?
Use __CSVRead function if the CSV file is not a large file.
Are you adding a CSVDataset inside a normal Thread Group or in a Setup
Thread Group?
Just some thoughts.
Xms and Xmx can be set with the same value and this is advisable to do so
as it save some cpu cycles.
Using JDK 8 you could set HEAP variable, defined in jmeter.bat and jmeter,
to blank since new jdk will set Xms and Xmx automatically. The new
algorithm will scale JVM memory
Maybe I have misunderstood your question, but remember that each Java
process will allocate some memory and it stacks for each Java process you
create. Unless you have a huge amount of memory at your disposal, this is
not advisable.
Said that, you could repeat a command line, that executes a
I have been using the configurations below for jdk 7 and 8 at work.
1st try: change HEAP declaration in jmeter for "-XX:+AggressiveOpts
-XX:+AggressiveHeap"
2nd try: change HEAP declaration in JMeter for about 70% of available RAM,
Xms and Xmx with the same value.
1st option is better suitable
Hi,
dos you try to stream the file you want to upload? like this:
http://stackoverflow.com/questions/10326460/how-to-avoid-outofmemoryerror-when-uploading-a-large-file-using-jersey-client
Em 08/01/2016 18:23, "Ahmad Alnafoosi" escreveu:
> Hi
> I have a jmeter
You could try using multiple Thread Groups and a property to control
(inside a while controller, maybe) when these requests should be fire.
There's a plugin, from JMeter Plugins, that could help you synchronize
these requests.
There's also the Beanshell Sampler that you could use to implement
What do you mean with error distribution?
If I understood it right, open a JTL file in an Active Threads Over Time
listener with "Errors" checked. Hits per second, Response Codes per second
and Transactions per second could be useful for your purpose too.
Em 17/09/2015 10:51, "Shay Ginsbourg"
Sorry, sent again to correct what I said in the second paragraph.
Create a CSV file containing that random order and use its values to
designate what sampler will be executed.
From the example I wrote, remove the Loop Controller and use Thread group
loop count, if there is no login-thing or
Loop Controller: 6 times
- Random 1 through 3
- If Controller: randNum == 1
- Search sampler
- If Controller: randNum == 2
- ViewItem sampler
- If Controller: randNum == 3
- CreateItem sampler
Em 04/08/2015 13:29, pubudu thilakaratne pubud...@gmail.com
I didn't see before that there is an error message referring to a BeanShell
sampler in JMeter's log sent in the first message. If you are using
expressions like this field_${Fields_g1} inside your BeanShell code, I
advise you to pass variables, or expressions using variables, as arguments
(i.e.
realised that
it doesn't function how I understood it would. (Why only once per
thread-group?!)
I need to reassess my approach : a BeanShell Sampler producing something
for a ForEach Controller looks likely.
Thanks again.
Nige
-Original Message-
From: Flavio Cysne [mailto:flaviocy
Nige,
what`s inside TestFragment XYZ? Is there any relationship betweeen
this fragment and the Test Plan presented?
Where in the script is Fields_matchNr initialized?
I suggest you to print the ${Fields_matchNr} value to check if it
has an unexpected content.
Konstantinos,
can't say for sure in Mac ('cause I don't have one), but in Windows I
experienced the same hang-thing and solved it adding rules in windows
firewall for JMeter and RMI ports used.
Hope it helps.
Nice,
I forgot to mention that CSV Dataset config don't go to the next line
when using loop controller. In your case, just when using Test Plan's Loop
count.
Hope it helps.
The machines used at the work environment is using CentOS and had no
problems like this. Maybe this could be related to a missing openssl
package or similar native package that handles SSL connections.
As sebb said you can use __V() similarly to __P(). There's also the
__javaScript as one of the alternatives. Another, is using __eval() as it
will process the content of the named variable and return the resulted
variable content. As Erez said there's the alternative of using a BeanShell
If you don't want to waste time doing the logic, just repeat each line of
your original CSV file by the number of users.
Ex.: in a file with lines
A
B
C
For 3 users you'll need to convert to
A
A
A
B
B
B
C
C
C
I tested Felix suggestion and it worked nicely. You just have to set the
Test Plan loop count by the number of lines you want to all users go
through.
Recently I had to create a script to test a Long-Polling HTTP request,
while also doing another HTTP request every 5 seconds. I added two Thread
Groups to the Test Plan: one for the authentication and the
5-seconds-repeating-request; another to the long-polling one.
I tried to use Inter-thread
Using Felix's approach there is no need to replicate CSV values.
Will users run concurrently or sequentially? You said that the first user
will click all 54 links, then the second and so on. To me, it's like a
sequential behavior. A concurrent one means that all 100 users will click
the first link, then all goes for the second link and so on.
Could you give
https://blog.codecentric.de/en/2014/01/automating-jmeter-tests-maven-jenkins/
If you are sure that the variable values will not change during the tests
and you have no need to simulate different values through agents, adding
static values to your Test Plan will use less memory than using a CSV
Dataset Config, at least at the start up of your test.
HTTP Request Defaults, HTTP Headers Manager and HTTP Cookies Manager are
hierarquical, then you can include them inside Threads Group and/or
Controllers and all samples inside will respect the nearest configuration
element in the hierarchy tree.
I tested them in JMeter 2.13 and 2.9 and I'm pretty
Use a Beanshell Pre-processor to handle dynamics values instead.
As already suggested in this thread, to achieve this level of random
access, without compromising such ammount of CPU and memory, you should use
a Redis Data Set, from JMeter-Plugins.
Another possible solution (will use as much memory as the size of your data
set) is to put all your data in one
In a Linux machine you can use shuf file command to randomize your csv
and then use it in your test.
The message Port already in use: 1099 indicates that JMeter is already
running on another process. In linux ps aux | grep -v grep | grep jmeter
should show you all JMeter processes running atm.
The log also indicates that you have connected succefully to a JMeter
slave/server.
If you are using
If you need to analyse each request done, capturing a script with follow
redirects unchecked would help. I think If you want to group some requests
to know the total response time then a Transaction Controller can be a good
start.
Erez Naim, why not use BSF Post-processor and JavaScript as language? You
could parse/manipulate JSon using javascript.
Diz you install JMeter's temporary certificate in your browser before
turning proxy on?
Did you install only Influga or also InfluxDB? The config.toml file will
only be present if you install InfluxDB. This is needed to allow graphite
data to be inserted by JMeter into InfluxDB.
Hope it helps.
You didn't mention if you are or not using a Cookie Manager in your script.
Execute a df -h to see if you still have HD to store JMeter resulta file,
because HeapDump generates a huge file in your filesystem. Maybe the number
of threads you are starting in this machine is too much for it. Another
approach is to use -XX:AggressiveHeap (jdk 6-) or -XX:AggressiveOpts
You could replace the Test Action by a While Controller, an If Controller
and a Constant Timer. The main idea is to check the property value from
time to time and get out the loop after getting the expected value or after
a defined number of loops.
You could save each user data in a different file. Maybe
user-data-userID.csv. And have another file with all userIDs captured.
If you are using only one JMeter, using a CSV Dataset Config will do what
you want.
If you are using a distributed environment (presuming 10 JMeter slaves and
each onde in a different machine) each file has to have only one line from
the original CSV file.
This shell script should help you to
I think I misundertood your question in my first post. Inside a loop
Controller you'll have to use CSVRead function using another call of this
function with 'next' value to read the next line of the file.
Hope it is the case.
I agree that CSVRead function should be avoided, but, inside a Loop
Controller, CSV Dataset Config has no utility since it will not get new
data/line after each loop iteraction. Although, it'll work if you use the
Thread Group loop count instead of a Loop Controller.
What do you want to accomplish with these commands? Are these commands
executed sequentially or could them execute separeted?
If running them grouped, you could do as below.
1. Create a bash script to execute all your commands.
2. Use an OS Process Sampler, from JMeter-Plugins' package, to
Maybe is a typo, you used just one equal sign. To compare you should have
used == or ===. The expression should be ${ExpectedResult1}==TRUE
I suggest you to compare strings when using javascript, because if your
variable doesn't have the value type you expect it may lead to undesired
errors in
Yes, you're right, don't need these bars. Nice to know about non-capturing
groups and its better performance, never used them before.
Kudos
Em 27/01/2015 14:31, Felix Schumacher felix.schumac...@internetallee.de
escreveu:
Am 27. Januar 2015 14:02:40 MEZ, schrieb Flavio Cysne
flaviocy
Throughput is directly dependent of response times. If a request is
responding in 10ms, you'll need 1000 requests to achieve targeted
throughput (considering that the response times are 10ms constant). You'll
need a bunch of JMeter slaves to achieve 100 requests/ms, or equivalent.
Try the
Testing some JSF URLs I've got some requests with #jsessionid and
;jsessionid. To exclude those requests I had to change the proposed pattern
a bit:
.*\.(bmp|css|js|gif|ico|jpe?g|png|svg|swf|ttf|woff)([?|#|;].*)?
Also includes svg and ttf extensions.
Em 27/01/2015 10:22, sebb seb...@gmail.com
You could use an If Controller as a root element, inside Test Plan, with
the expression ${__threadNum()} = ${maxThreads} . maxThreads property must
be defined in every JMeter slave initialization or using a -J parameter in
master's. Having this property set per slave is a good option if your
You could also use the expression ${__javaScript(vars.put(${__UUID},myID))}
and add ${myID} in other samplers refering the uuid value generated.
Em 31/12/2014 14:40, Aditya Dhage aditya.dh...@globallogic.com escreveu:
Hi,
I've been through the same problem recently.
User defined value are
Not sure of what you're really trying to achieve but using CSV Dataset
Config would be a way of doing it (if by user you mean thread).
Em 28/12/2014 04:34, Bob Meliev b.mel...@gmail.com escreveu:
Hi,
Howto use User Parameters inside Loop controller? On each loop value
remains the same. I need
Did you try using an If Controller to skip thread 1 instead of
deactivating/disabling it?
You could use a BeanShell Post-Processor to get the Content-Length
parameter's value from the Request Header and include this value as a new
attribute in the sample result.
Or you could have a look at JMeter Plugins' Bytes Throughput over Time
Listener code to see how they are summarizing these
Maybe there's more than one Java in your PATH as mentioned in this post
http://stackoverflow.com/questions/26450420/osx-10-10-and-eclipse-luna-own-app-crashes-when-started-from-inside-eclipse
Try to export the correct Java 6 as suggested in the answers.
If you are using BeanShell Pre-Processor so it will be triggered only for
the samplers.
I'm supposing that While Controller wasn't been executed, because BeanShell
Pre-Processor (or even Post-Processor) will not be triggered until a
Sampler is executed.
That's why when you add a Debug Sampler
:48 PM, Flavio Cysne flaviocy...@gmail.com
wrote:
If you are using BeanShell Pre-Processor so it will be triggered only for
the samplers.
I'm supposing that While Controller wasn't been executed, because
BeanShell
Pre-Processor (or even Post-Processor) will not be triggered until
@sebb, Thanks to clarify this.
My mistake.
That's why I need to know better JMeter's source code.
Glad to know this.
2014-11-13 22:32 GMT-03:00 sebb seb...@gmail.com:
On 13 November 2014 12:54, Flavio Cysne flaviocy...@gmail.com wrote:
My 2 cents.
I really love JMeter and I'll try
My 2 cents.
I really love JMeter and I'll try to get this passion aside from my opinion.
1. Developers are free to do whatever they can with JMeter.
JMeter can test TCP, SOAP, JSF, .NET, common websites, Socket, Database
Queries, WebSocket (not from the core, but there is a plugin for this)
I'll just link you to a third party comparison, since I never used Visual
Studio Load Test tool.
http://sqa.stackexchange.com/questions/9572/comparison-of-jmeter-vs-visual-studio-load-test
Since JMeter don't have any built-in test data distribution component is up
to you to decide what is the
Suggestions:
* For single JMeter instance, distribute your transaction data in files
numbered by user thread number (from 1 to 10, in your case)
#1
Test Plan (if users have to run sequentially)
- CSV Dataset Config (userDs.csv)
- Counter (start: 1, end: 10, increment: 1, referenceName:
To see the total number of threads/requests done use a Transaction
Controller as a wrapper for the Throughput Controllers, and save log as XML.
As Adrian Speteanu said, exceeding 100% in percentage mode could lead to
unexpected results.
When I need to exceed 100% of total threads I usually use a
George,
as sebb said you can do this using 3 different JMeter slaves, each one
configured to use a distinct JKS file. I think this is the easiest way to
achieve what you want.
Another approach that could work fine is to use only one Thread Group
configured to loop 3 times, a KeyStore
I think that, for what you said, write o whole new plugin for TCP
encryption may not be the best approach.
Have a look at the TCP Sampler component
http://jmeter.apache.org/usermanual/component_reference.html#TCP_Sampler
It says that Users can provide their own implementation. The class must
If by encrypt you mean using MD5 algorithm, and by data you mean parameter
values or body message, you could use Jmeter-Plugins' md5 function (
http://jmeter-plugins.org/wiki/Functions/).
The articles below, from JMeter official site, talks about writing your own
plugin.
CSV Dataset Config, when 'Recycle on EOF' is true and 'Stop thread on EOF'
is false, will start reading the first line again when next thread requires
new data and file reader gets to EOF. Each thread in the same JMeter
machine will get a different row from CSV file. For distributed
environment,
Added an issue, as enhancement, as suggested.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56961
Using Linux you can use sed, grep, awk, head tail, and many more through
a OS Processor sampler and store its return value in a variable using a
Post-processor.
http://www.unix.com/shell-programming-and-scripting/53484-how-quickly-show-nth-line-file.html
Reading from windows is a bit more
Correct me If I'm saying/asking something wrong, but ...
Does the application has been set to not time out connections too?
Time outs could be triggered from JMeter, but also from target
server/application.
One way of ensuring this is changing HTTP 1.1 header to HTTP 1.0. But this
will make every request's embedded resources to be downloaded, each one, in
a new connection. Maybe JMeter's HTTP Request Download all embedded
resources option will not work as expected.
2014-08-25 10:11 GMT-03:00
As far as I can see, there's no relationship between the requests
/User_Management/Content_CSS/Style.css neither /login.aspx, nor your
crd.txt CSV Dataset.
Add a View Results Tree in your script and see what response code and
response message is been returned. Maybe is only a CSS parsing warning,
In JMeter, Ramp-up is the period, in seconds, that a specified number of
threads will have been started.
If you want to have 90 threads started wthin 30 minutes, for a total test
time of 30 minutes, then you'll have to go for something like this:
90 / 30 * 60 = 90 / 1800 = 1 / 20, so 1 thread at
If you're using Linux it's possible to configure many network interfaces
with different IP addresses in the same machine, and say, using 3 to 4
JMeter slaves per machine.
If you're using more than one machine and nevertheless all of them are
converging to the same IP, probably you'll have to
Native to JMeter, Throughput
Controllerhttp://jmeter.apache.org/usermanual/component_reference.html#Throughput_Controlleris
the only one I can remember that controls throughput.
About JMeter plugins http://jmeter-plugins.org, the Throughput Shapping
Timer
Paul,
The first thing that came in mind is to delete the first line (header) from
the csv file.
But this could be a chance to evolve JMeter and ask for a new feature: An
option to skip the first line (header), in CSV Dataset Config, unchecked by
default.
Contribute to JMeter and register this
If you want these 5 samplers to run consecutively, each with 20 concurrent
users, try this:
Thread Group ( threads: 20, ramp-up: 0, iterations: 1 )
- Synchonizing Timer ( threads: 0 )
- Sampler 1
- Sampler 2
- Sampler 3
- Sampler 4
- Sampler 5
Or, If you want to run all samplers
I believe that Interleave Controller will do good for the second approach
too.
I created a post in my blog
http://flaviocysne.blogspot.com.br/2014/04/how-to-ramp-up-threads-in-specific.html
Hope it helps
2014-04-29 8:13 GMT-03:00 Flavio Cysne flaviocy...@gmail.com:
Ramp-up is commonly configured in Threads Group.
If you need to delay a specific sampler, could use
See this
http://flaviocysne.blogspot.com.br/2012/06/how-to-dynamically-increasedecrease.html
The example shown in this post uses a file published in a local Apache Web
Server, but you could use a Variable changing its value sending a command
via Beanshell server.
2014-04-29 9:02 GMT-03:00 ZK
What implementation of HTTP are you using? Java defaults or HTTPClient?
If Java defaults initialize your app using these directives:
-Dhttp.proxyHost=hostname_or_hostIP -Dhttp.proxyPort=port_number
- when using HTTPS, add this to above directives:
-Dhttps.proxyHost=hostname_or_hostIP
Have you tried adding these parameters directly in Raw Body tab of HTTP
Request Sampler, using PUT as method?
2014-04-24 3:36 GMT-03:00 Abhijit Gupta abhi...@icelero.com:
Hi,
I want to send HTTP Put request with following three parameters
a) name=ABCD
b) URL=http://somelink.com
c)
Maybe you could use OS Process Sampler
http://jmeter.apache.org/usermanual/component_reference.html#OS_Process_Sampler
I had the same issue a few days ago and maybe HC4 and HC3 have issues
dealing with SSL Handshakes when using a Proxy.
I changed Type field in HTTP Proxy Server and Implementation field in
HTTP Request Defaults to Java.
http://lmgtfy.com/?q=har+to+jmeter+jmx
2014-03-17 12:25 GMT-03:00 Derry, Stanton stanton.de...@digitalinsight.com
:
Is anyone aware of a open source tool that will convert a har file to
jmeter's jmx? I'm able to record via Charles Proxy and save the recording
as a har file.
Stan
Sometimes your site uses resources from another domain or domains and you
don't want your intranet in a black list.
When this operation is not working? It's when reading the second line, the
third, ???
Try adding a Debug Sampler to see what exactly it is reading and what it's
not.
Verify if it is a blank line somewhere in your file because If a blank
line is detected, this is treated as end of file ...
use a regular expression to expect for exactly 34 characters
return(\w{34})/return
\w is the same of this expression [a-zA-Z0-9_] (Ref.:
http://www.w3schools.com/jsref/jsref_regexp_wordchar.asp )
if you are expecting other characters change the \w for the extend form
and add the new ones.
Try this:
groups\s*:\s*(\d+)
2014-02-17 6:10 GMT-03:00 ZK stevesenio...@gmail.com:
Hi,
No it is not to do with the extra spaces before the word groups
I suspect the response you posted not the format of the response you are
getting
could you check and repost the response where the regEx
Your question is missing, but accordingly to the title this is my
suggestion:
Define a Test Plan property called threads and use its value to distribute
load among Threads Groups
# threads=50
Threads Group 1 (60%) - __javaScript(Math.ceil(${threads}*0.6))
Threads Group 2 (40%) -
there is a lot of dynamic
stuff and the Content-Type: multipart/form-data which you sometimes need to
be careful with (if you have taken care of that) - i'll try and see if I
can get the demo to work
On Fri, Jan 24, 2014 at 3:53 AM, Flavio Cysne flaviocy...@gmail.com
wrote:
Hi Deepak
Dear users,
did you have any test case that used a Richfaces FileUpload component
with Flash mode enabled (component default behavior) in a form ?
I, recently, had a bad experience with this scenario. Doing the
scenario manually, the file is uploaded an 'attached' to the entity
It have happened to me when network devices get overcharged and start
dropping packages.
I overcome this issue defining a timeout; in my case, using HTTP Request
samplers, connection and response timeouts.
What samplers are you using?
2014/1/15 Oliver Lloyd oliver_ll...@hotmail.com
I wanted
Maybe this bug report,
https://support.mozilla.org/en-US/questions/976504, could
help you.
2014/1/13 charan sethi charan.set...@gmail.com
Hi
I'm using JDK 7 and java version is 1.7.0_45
Yes this is happening on all browsers for me.
Can it be because of some firewall or any additional
1 - 100 of 231 matches
Mail list logo