Re: Jmeter - MySQL Cluster

2021-06-06 Thread glin...@live.com
Just the same way you do this for a single instance.

The main rule you should remember: well-behaved load test must represent
real-life application usage as close as possible. So if the MySQL cluster is
used by some external system and you want to conduct some performance
testing - you need to use the same configuration as that external system in
terms of  URL
  , 
connection pool   , etc. 

With regards to the URL itself you can specify the protocol like
*loadbalance* and include all your hosts there:


> jdbc:mysql:loadbalance://[host1][:port],[host2][:port][,[host3][:port]]...[/[database]][?propertyName1=propertyValue1[=propertyValue2]...]

More information:

-  Building a Database Test Plan
  
-   MySQL Database and JMeter - How to Test Your Connection

  
-  Configuring Load Balancing with Connector/J

  





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Script wide validation

2021-05-26 Thread glin...@live.com
Tong Sun wrote
> I know currently JMeter doesn't have script-wide validation

I don't think this statement is correct, JMeter Assertions obey  JMeter
Scoping Rules
   so if
you put  JSON Assertion
  
(or even better  JSON JMESPath Assertion

 
) at the Thread Group level - it will be applied to *all samplers* in all
Thread Groups. 

Hopefully this is something you're looking for 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Problem: getting Not a valid web socket request.

2021-04-13 Thread glin...@live.com
As per latest stable JMeter version  5.4.1

  
JMeter's  HTTP(S) Test Script Recorder

  
is only capable of recording HTTP or HTTPS traffic (as it evidenced by its
name) 

WebSockets   is
a different beast which cannot be either recorder by JMeter or replayer
using any of Samplers so if you need to mimic websocket traffic you will
need to use a plugin like WebSocket Samplers
   

The request payload can be captured using your  browser developer tools

  
or external 3rd party sniffer tool like  Fiddler
  or  Wireshark
  . 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Jmeter not substituting variable in CSV Data Set Config

2021-04-07 Thread glin...@live.com
Of course it doesn't. Could you please bookmark the  Execution Order
   
chapter and re-read it prior to asking the next question. 


CSV Data Set Config is a *Configuration Element* so it's being executed
before the JSR223 Sampler and in fact before everything else. 

The only configuration element which takes precedence is  User Defined
Variables

  
so you can define your *testdata* variable there and if you want to make it
dynamic - use __groovy() function
   to
calculate/assign the value. 





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: NAT-Distributed testing

2021-04-03 Thread glin...@live.com
As per  Remote hosts and RMI configuration
  


> client.rmi.localport
> 
> Parameter that controls the RMI ports used by RemoteSampleListenerImpl and
> RemoteThreadsListenerImpl (The Controller)
> Default value is 0, which means ports are randomly assigned. If this is
> non-zero, it will be used as the base for local port numbers for the
> client engine. At the moment JMeter will open 
*
> up to three ports
*
>  beginning with the port defined in this property.
*
> You may need to open corresponding ports in the firewall on the Controller
> machine.
*
> 

So I would recommend checking which ports are being used by JMeter using
i.e.  netstat    tool and open them
in the firewall. 

You will also need to configure the  port forwarding
   on NAT level otherwise the
master won't be able to "see" the slave. 

An example of master-slave network configuration can be found in the  JMeter
Distributed Testing with Docker
  
article. 





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: SV: Response assertion seems to not always set JMeterThread.last_sample_ok correctly

2021-04-01 Thread glin...@live.com
I might be suffering from a form of a mental fatigue but I pretty much sure I
posted the link to the JMeter test elements  execution order
  

Response assertion is executed *AFTER* the JSR223 PostProcessor so if the
assertion fails the request - you will get false positive result. 

You need to change it to the  JSR223 Assertion

  
(but make sure to place it *below* the Response Assertion as they're
executed upside down) or switch to the  JSR223 Listener
 
. 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Response assertion seems to not always set JMeterThread.last_sample_ok correctly

2021-04-01 Thread glin...@live.com
The questions is: how exactly you're "logging that the variable
JMeterThread.last_sample_ok"? 

Be aware of JMeter test elements  execution order
  ,
after Assertions only Listeners are executed so it makes sense to "log" the
value for example using  JSR223 Listener
   and the following code:


> log.info('Previous sampler successful: ' +
> vars.get('JMeterThread.last_sample_ok'))

Also you can log the value using  __log()
  or  logn()
   functions
which are evaluated immediately where they found





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Handle Proto & grpc requests

2021-03-29 Thread glin...@live.com
If you're talking about gRPC - there is a  plugin
  

With regards to protocol buffers per se - I'm not aware of any existing
extension so you will have to add  protocol buffers java library
   to  JMeter
Classpath   
and write your own wrapper code using  JSR223 Test Elements and Groovy
language   , see  The
Protocol Buffer API

  
for more information. 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Setting failure tolerance on maven jmeter plugin goal

2021-03-23 Thread glin...@live.com
As of current  JMeter Maven Plugin version 3.3.0

  
it is not possible, you can try raising an enhancement request via  Issues
  section 

In the meantime you can consider running your JMeter tests using  Taurus
  tool as the wrapper, Taurus provides flexible and
powerful  pass/fail criteria subsystem
   allowing applying various multiple
conditions to either overall test scenario or individual samplers

More information:  Running Your Load Tests With Test Failure Criteria - A
Guide

  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: [OT] Associate JMeter with .jmx files under Mac

2021-03-16 Thread glin...@live.com
The approach is very well described in the How to Open JMX Files on a Mac in
1 (Double) Click

  
article



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Handling graphql requests with JMeter 4.0

2021-03-09 Thread glin...@live.com
You need to basically send a JSON Object with "query" attribute and put the
GraphQL query there making sure to properly escape the query itself so it
would be a valid JSON. 

In general  according to JMeter Best Practices you should always use the
latest version of JMeter
  
and  JMeter 5.4

  
and above come with  GraphQL HTTP Request
  
sampler where you can put your GraphQL query as it is without having to
encode something. 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Building JMeter from source with Java 8

2021-03-05 Thread glin...@live.com
I think these "autostyleApply -PmaxCheckMessageLines=50 -PmaxFilesToList=10
-PminLinesPerFile=4" profiles are causing troubles, you should be able to
build JMeter like:


> gradlew -x test build -q





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Debug only after each failed sampler - Debug PostProcessor limitation

2021-02-25 Thread glin...@live.com


> subsampler is not created in each Passed and Failed samplers as it should
> be

it should be created as long as you're smart enough to properly put the
listener (hint -  JMeter Scoping Rules
 
)


> SamplerProperties and JMeterVariables are not sorted in ascending order

I didn't give you the fish, I taught you how to fish.

If you're not able to sort an array alphabetically you should rather
consider quitting IT and becoming a bartender. 

This forum doesn't assume that others will write the code for you, if you're
looking for this form of services - consider freelancer marketplaces like 
fiverr   





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Debug only after each failed sampler - Debug PostProcessor limitation

2021-02-25 Thread glin...@live.com
Here is example code you could use in the  JSR223 Listener
 
, it produces more or less the same output as the Debug PostProcessor:


> def subResult = new org.apache.jmeter.samplers.SampleResult()
> subResult.setSuccessful(true)
> def responseBody = new StringBuilder()
> def newline = System.getProperty('line.separator')
> 
> responseBody.append('SamplerProperties:').append(newline)
> 
> sampler.getProperties().each { property ->
>
> responseBody.append(property.getKey()).append('=').append(property.getValue()).append(newline)
> }
> 
> responseBody.append('JMeterVariables:').append(newline)
> vars.entrySet().each { var ->
>
> responseBody.append(var.getKey()).append('=').append(var.getValue()).append(newline)
> }
> 
> subResult.setResponseData(responseBody as String, 'UTF-8')
> 
> prev.addSubResult(subResult)

In the above code:

*prev* - stands for parent  SampleReuslt
  
*vars* - stands for  JMeterVariables
 
class instance 

See  Top 8 JMeter Java Classes You Should Be Using with Groovy

  
article to learn more about the above and other JMeter API shorthands
available for the JSR223 test elements .



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Exiting the jsr223 sampler

2021-02-25 Thread glin...@live.com
return    keyword will
stop the sampler execution once it's reached. 

If you add a string like:


> return 'A'

the JSR223 Sampler result will be *A*

no lines after the *return* keyword will be executed. 

More information on Groovy scripting in JMeter:  Apache Groovy - Why and How
You Should Use It   




--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Jmeter 5.4.1 - JMX file - XML DTDs and schema validation

2021-02-22 Thread glin...@live.com
Looking at  JMeter wiki

  


> Is there a JMX Schema/DTD available?
> 
> Answer:  No. Don't plan on having one either at this point. Changes would
> be too frequent to realistically keep up with.


If you want to generate JMeter test plan programmatically I would rather
suggest sticking to i.e.:

 1.  JMeter Java DSL   
 2.  JMeter Ruby DSL   
 3.  Taurus tool

  
 4. Using  JMeter API    directly



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Increase jmeter through put when using hmac authentication

2021-02-11 Thread glin...@live.com
When it comes to maximum throughput I believe if you store the pre-generated
hashes in a file somewhere in  setUp Thread Group

  
and then read the file using CSV Data Set Config

  
it will be the most performing option. 

Alternatives are in:

 1.  Since JMeter 3.1 you should be using JSR223 Test Elements and Groovy
  
language for scripting as currently it's the most performing scripting
option, see  Apache Groovy - Why and How You Should Use It
   article for more
details
 2. There is  __digest() function
   which
supports wide range of hashes including several hmac*



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Hits/min JMeter understanding

2021-02-11 Thread glin...@live.com
It mostly depends on the protocol, in case of  HTTP
   single "transaction"
may produce more than one hit due to  redirects
   or
downloading  embedded resources

  
(images, scripts, styles, fonts, sounds, etc.)

In case of missing redirects/embedded resources (i.e if you're testing an
API) one sampler generates only one hit and it could be the explanation of
your metrics. 

You cannot calculate/estimate/predict how many hits will a single sampler
generates as it mainly depends on your system under test, however you can
measure it using i.e.  Server Hits per Second
   listener 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Bug? JMeter is not using the default groovy

2021-02-02 Thread glin...@live.com
For sure it's not a JMeter bug, it's an example of  Jar Hell
   where you have multiple
versions of the same library in the  CLASSPATH
  


There are groovy-*.jar libraries in JMeter Classpath
   (lib
folder of your JMeter installation) and JMeter automatically loads them on
start and if you're adding more Groovy libraries to the classpath by any
means it results in 2 same libraries of different versions with undefined
order when it comes to classloading. 

If you want to use your own Groovy - remove JMeter's version and vice versa. 

Just in case if you cannot remove JMeter's libraries, the latest version of
JMeter which was shipped with Groovy 2.4.12 was  JMeter 3.3
  

Also  according to JMeter Best Practices you should always be using the
latest version of JMeter
   which is 
JMeter 5.4.1

  
as of now and it comes with Groovy 3.0.7 so switching to JMeter's groovy or
upgrading your installed SDK might be a viable solution.



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Can't override Connection header

2021-01-27 Thread glin...@live.com
I don't think you can do this using HTTP Header Manager, the header is
controllable via "Use KeepAlive" box in HTTP Request sampler 

If you need to parameterize the Connection header I can think of adding
JSR223 PreProcessor

  
and using the following code:


> sampler.setUseKeepAlive(false) // for Connection: close

or


> sampler.setUseKeepAlive(true) // for Connection: keep-alive


Alternative option would be switching to  HTTP Raw Request sampler

  
which gives you full flexibility in building request headers and body 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Performance Testing Load Balanced Application

2021-01-10 Thread glin...@live.com
1. JMeter doesn't know anything about your application infrastructure, when
it comes to load testing load balanced applications it's a good idea to add 
DNS Cache Manager

  
to your Test Plan so each thread (virtual user) would resolve the IP address
of load balancer on its own. Also if there is some form of  session
stickiness

  
you can trace down the relevant HTTP Header or part of the URL. If you need
insights what happens under the hood of your application infrastructure
during the load test you should go for an  APM tool

  

2. JMeter automatically aggregates all the results no matter of the origin
(thread group), if you need to have ability to distinguish results coming
from different thread groups you can use  __threadGroupName()
  
function for this 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Problem with client certificates - No certificate found for alias:'john_doe'

2020-12-22 Thread glin...@live.com
It's hard to say what's wrong without seeing your jmeter.log file
  , CSV Data
Set Config and Keystore Config setup so I can only give a generic piece of
advice: what you put into "Variable Names" in the CSV Data Set Config must
match what your put into "Variable name holding certificate alias" in the
Keystore Config, also ensure that "Alias start index" is 0 and "Alias end
index" is -1 so Keystore Config would load all the certificates in the
keystore. 

See  How to Use Multiple Certificates When Load Testing Secure Websites

  
article for more details. 

If you need only one certificate from the keystore you can  extract it into
a separate keystore
   like 


> keytool -importkeystore -srckeystore c:\temp\keystore.p12 -destkeystore
> c:\temp\onecert.p12 -srcstorepass secret --deststorepass secret -srcalias
> intuser_cindy

This way you will have *onecertp.12* keystore with only one certificate
which can be used directly without having to add CSV Data Set Config or
KeyStore Config



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Thread Groups based initialization for each thread group

2020-12-16 Thread glin...@live.com
If you need to call it once per thread (virtual user), i.e. only at first
iteration of each virtual user - put this code under the  Once Only
Controller

  


If you need to call it once per thread group (i.e. first iteration of first
thread) - put it under the  If Controller
  
and use the following  __groovy() function
   as the
condition:


> ${__groovy((vars.getIteration() == 1 && ctx.getThreadNum() == 0),)}

 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Prepare dynamic csv test data in setup thread

2020-12-16 Thread glin...@live.com
Everything is possible, just make sure to:

 1. Use  setUp Thread Group

  
which is executed *before* other thread groups
 2. If you want to make csv file names dynamic make sure to define them
using  __setProperty() function
   in the
setUp Thread Group and read them via  __P() function
   in the "normal"
Thread Groups 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: How to set system property within JMeter

2020-12-01 Thread glin...@live.com
If this is *really* what you need - go for  __groovy() function
   to call 
System.setProperty() method

  
like:


>  ${__groovy(System.setProperty('foo'\,'bar'),)}

More information on Groovy scripting in JMeter:  Apache Groovy - Why and How
You Should Use It   





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: How to set system property within JMeter

2020-12-01 Thread glin...@live.com
You can set a JMeter Property via  __setProperty() function
   like:


> ${__setProperty(foo,bar,)}

will create a JMeter property "foo" with the value of "bar" which you can
read using  __P() function
   like 


> ${__P(foo,)}

where required. 

More information: Knit One Pearl Two: How to Use Variables in Different
Thread Groups

  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Error message help

2020-12-01 Thread glin...@live.com
By default JMeter 5.3

  
has 1GB of JVM Heap space allocated, it should be sufficient for tests
development and/or debugging but might not be enough for the full load test. 

The ways to increase the heap are:

Set *HEAP* environment variable and provide more maximum JVM heap size,
default settings are:


> -Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m

you can try increasing it twice and see how it goes. 

Another option is to find the above line in jmeter startup script
(jmeter.bat on Windows or jmeter on other operating systems) and ramp-up the
heap size, start with something like 80% of your total available physical
RAM and adjust up or down as needed


More information: 

 1.  Optimal Heap Size

  
 2.  9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure

  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: HTTP2 Plugin

2020-05-27 Thread glin...@live.com
If you ticked "Synchronized Request" you can decrypt the response (I assume
it is  gzip-compressed
  ) by
adding ad  JSR223 PostProcessor
   and using the
following code:


> prev.setResponseData(new java.util.zip.GZIPInputStream(new
> ByteArrayInputStream(prev.getResponseData())).bytes)

If you need to do this for async requests it won't be that easy as duplex
asynchronous nature of HTTP2 is not inline with JMeter threads model, you
can reach out to JMeter Plugins developers and maintainers at  JMeter
Plugins Support Forum
   



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Compare test result to baseline (or previous run)

2020-05-27 Thread glin...@live.com
Have you seen  Real-time results
   page of
JMeter Documentation, it's very first lines say:


> Since JMeter 2.13 you can get real-time results sent to a backend through
> the Backend Listener using potentially any backend (JDBC, JMS, Webservice,
> …) by providing a class which implements AbstractBackendListenerClient.

So you can setup i.e.  InfluxDB and Grafana combination

  
and get both real-time statistics and possibility to compare different test
runs 

If you're looking for simpler ad-hoc solution -  Merge Results Tool
   provides possibility to
compare up to 4 test result sets. 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Tigger 10 k user's at once with JMeter

2020-05-27 Thread glin...@live.com
If you have a Thread Group with 10k virtual users, no ramp-up, no timers so
JMeter is running at full speed and you have 10k requests executed in 30
seconds I can think of 2 reasons for this:

 1. Your application cannot respond fast enough which means you found the 
bottleneck  
, there is no sense to continue until the bottleneck is identified and fixed
 2. JMeter cannot send requests fast enough. Make sure to follow  JMeter
Best Practices   
and if you will be limited only by your machine hardware specifications you
will need to consider going for  Distributed Testing
 
 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: How to pause JMeter?

2020-05-26 Thread glin...@live.com
You cannot "pause" JMeter, the only way to stop it sending the requests is
using  Constant Throughput Timer

  
with a throughput defined via  __P() function
   which will allow
to control the number of hits per minute using  Beanshell Server
  

Check out  How to Change JMeter´s Load During Runtime
  
article for more details. 

Alternative option is using  Filter Results Tool
   to remove the time
span when your server was restarting from the .jtl results file. 

And finally you can suspend/resume any process by means of the operating
system, i.e.  kill   
for Unix and derivatives,  DebugActiveProcess

  
for Windows, etc. 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Extract Value from Request Body content

2020-04-23 Thread glin...@live.com
You can use  JSR223 PreProcessor

  
to store the request body into a JMeter Variable like:


> vars.put('request', sampler.getArguments().getArgument(0).getValue())

Once done you will be able to use normal  XPath Extractor
  , just
set "Apply to: -> JMeter Variable Name to use -> request" and you will be
able to execute arbitrary XPath queries to parse your XML payload



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: sampleEnd called twice

2020-04-23 Thread glin...@live.com
The correct solution would be storing your *dt* into a JMeter Variable like:


> vars.put('dt', dt as String)

then you can declate this *dt* as a  Sample Variable
   and 
generate a custom graph over
 
time out of it

If it's too complex you can update your JSR223 Sampler execution time from
the JSR223 PostProcessor like:


> prev.elapsedTime = vars.getObject('dt') as long

See  Top 8 JMeter Java Classes You Should Be Using with Groovy

  
article for more information regarding what these *vars* and *prev* stand
for and remember each time you bypass JMeter limitation using reflection
somewhere somehow a kitten dies.



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Please help with MIME Type for .CSAR file

2020-04-07 Thread glin...@live.com
Looking into  CSAR file extension
   page:


> Category: Data files
> Application: CARIS
> Mime-type: application/octet-stream

So try using *application/octet-stream* and presumably it should resolve
your issue. 

Going forward if you will face difficulties with manually configuring the 
HTTP Request
 
sampler for file uploads be aware that you can always just record the file
upload request using JMeter's  HTTP(S) Test Script Recorder

 
, just make sure to  copy the file(s) you will be uploading to the "bin"
folder of your JMeter installation
   prior to
executing the request in browser, JMeter should be smart enough to detect
the media type of the file.   





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Error loading result file with ~/ prefix in Windows 10

2020-04-06 Thread glin...@live.com
*~* symbol is a normal file or folder name in Windows 10, you're getting this
error because *~\resultstree.xml* file does not exist. 

If you create the *~* folder in the "bin" folder of your JMeter installation
and change the file path to *~\resulttree.xml* the issue will go away and
JMeter starts writing the results to the
*c:/path/to/your/jmeter/bin/~/resulttree.xml*


Going forward consider  enabling JMeter debug logging
   for the
"problematic" test element, in the majority of cases you will be able to get
some clue regarding where the problem is from the  jmeter.log file
  :

  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Run single thread in the distributed mode

2020-04-06 Thread glin...@live.com
You can go for the  If Controller
  
and use the following  __jexl3() function
   as the
condition like:


> ${__jexl3("${__machineIP()}" == "10.20.30.40",)}

This way If Controller's children will be executed only at the slave machine
having IP address "10.20.30.40". 

If your test assumes multiple threads (virtual users) and iterations on 
Thread Group
  
level you can add more clauses to the If Controller like:


> ${__jexl3("${__machineIP()}" == "10.20.30.40" && "${__threadNum}" == 1 &&
> "${__jm__Thread Group__idx}" == "0",)}





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Load testing on Drupal Web services.

2020-03-24 Thread glin...@live.com
JMeter treats the application under test as the "black box"
   and it doesn't know
anything about the underlying technologies like operating system, web
server, database server, etc. 

So just follow generic instructions like:

1.  Building a Web Test Plan
  
2.  Building an Advanced Web Test Plan
  
3.  Apache JMeter HTTP(S) Test Script Recorder
  

You might also be interested in the BlazeMeter Module for Load and
Performance Testing for Drupal
   



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Jmeter recording issue in SSO application

2020-03-17 Thread glin...@live.com
NLTM   or  Kerberos
  SSO isn't something you
can efficiently record and replay using JMeter's  HTTP(S) Test Script
Recorder
   from
the beginning. 

You can try  increasing JMeter's log verbosity
   for
proxy package by adding the next line to /log4j2.xml/ file:
 


and after restarting JMeter on next recording attempt look for "Creating
HTTP Authentication manager for authorization" line and its neighbors,
hopefully you will be able to get to the bottom of the problem




--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Websockets aborting

2020-03-02 Thread glin...@live.com
Make sure to provide *Read Timeout* to be at least 60 milliseconds (10
minutes)

It can be done in the Open Connection Sampler (from  JMeter WebSocket
Samplers by Peter Doornbosch
  )

 

If you will still be experiencing problems - consider  increasing JMeter
logging verbosity
   for the
WebSocket components by adding the next line to /log4j2.xml/ file (lives in
"bin" folder of your JMeter installation)


> 





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Problem with Jmeter and client certificate authentication - unknown_certificate

2020-02-25 Thread glin...@live.com
Most probably there is a problem with the test data, i.e. alias is missing in
the keystore or wrong certificate lives under the correct alias. 

First of all I would recommend cross-checking your aliases in the keystore
and in the CSV file, you can get the list of aliases from the keystore using 
keytool
 
command like:


>  a
> keytool -list -v -keystore /path/to/your/keystore | find "Alias"

For example when I use JMeter's "proxyserver.jks" as the keystore I'm
getting the next 2 aliases:

 


> :root_ca:
> :intermediate_ca:

it means that I need exactly these 2 entries in the CSV file holding the
certificate aliases. 

You might want to check out  How to Use Multiple Certificates When Load
Testing Secure Websites

  
article for comprehensive configuration instructions 




--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: HTTP2 testing using Jmeter

2020-02-25 Thread glin...@live.com
I'm not aware of any other existing plugins for JMeter. 

The first place where I would look for documentation would be the  plugin
GitHub page   

You can also get familiarized with  The New HTTP/2 Plugin for JMeter

  
article and reach out to the plugin developers and maintainers at  JMeter
Plugins Support Forum
  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Gatling Vs Jmeter

2020-02-04 Thread glin...@live.com
There is no "golden bullet" solution

On one hand Gatling is more VCS-friendly, on another JMeter is easier to
learn and use. 

On one hand Gatling provides full power of Scala, on another JMeter supports
more  protocols
 
and has more  plugins   comparing to  Gatling
  

The main disadvantage of Gatling is that it  doesn't really scale

  
and JMeter had  distributed mode
 
 
easy to configure and use for ages .



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Jmeter OAuth2 authentication

2020-02-03 Thread glin...@live.com
You need to provide a  redirect URL
   where you will be
routed by the authentication endpoint, normally it's the URL of the website
where you need to type the credentials. 

If you want to fully get rid of this UI-based part you could use i.e.  HTTP
Mirror Server

  
as the target for this redirect URL and extract all the necessary dynamic
values from the redirection request using a suitable JMeter's
Post-Processor, i.e.  Regular Expression Extractor

  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: API Load Test - Oauth 1.0

2020-02-03 Thread glin...@live.com
The instructions will differ depending on the signature algorithm (PLAINTEXT,
HMAC-SHA1, RSA-SHA1) so not knowing the details of your identity provider it
is not possible to come up with the comprehensive solution. 

The algorithm of signature generation is described i.e. at  Creating a
signature

  
article of Twitter developer API documentation. 

You may also find  How to Run Performance Tests on OAuth Secured Apps with
JMeter

  
article useful. 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: HLS 2.0 simulate user behaviour for each media segment by waiting on each media segment

2020-01-16 Thread glin...@live.com
According to  Introducing the JMeter HLS Plugin 2.0
   article:


> As expected, you asked and we listened! No longer do you have to wait
> until the full playlist is downloaded to see the result of each downloaded
> segment. To give you faster feedback on how your service is performing,
> the hierarchical structure has been removed, providing a way to see how
> the server is behaving in real time during the test execution. 

So my expectation is that you see "future" information in the listeners
while the plugin is sending the requests in a browser-like manner. You can
compare the actual requests using a 3rd-party sniffer tool like  Wireshark
  

If there are inconsistencies you can report them via  JMeter Plugins Support
Forum    where you
can reach out to the plugin developers and community around the plugins. 






--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Java request in distributed testing

2019-12-31 Thread glin...@live.com
If you're talking about *Java* implementation of the  HTTP Request
  
sampler, according to the documentation:


The Java HTTP implementation has some limitations:

There is no control over how connections are re-used. When a connection is
released by JMeter, it may or may not be re-used by the same thread.



So if you're suffering from the above issue you should consider switching to
the  HttpClient4   implementation 

If you're seeing Connection header with the value of *keep-alive* - just
untick "Use KeepAlive" box in the HTTP Request Sampler (or even better  HTTP
Request Defaults

  
so the changes would be propagated to all HTTP Request samplers)

If you're talking about  Java Request
  
sampler - unfortunately no one will be able to help unless you share your
code, I can only recommend using a profiler tool like  YourKit
  , it should be able to detect
obvious memory leaks like not closed connection.



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Authenticating To A .NET Web Application

2019-12-19 Thread glin...@live.com
Most probably it's a matter of missing or not properly working  correlation

  

In the absolute majority of cases you cannot replay the recorded script "as
is" as modern web applications widely use dynamic parameters i.e. for 
client-side state tracking

  
or  security

  

You need to identify all these dynamic parameters, extract them from the
previous responses using a suitable JMeter  post-processor,
  
save them into  JMeter Variables
   and replace recorded
values with the variables. 

Check out  ASP.NET Login Testing with JMeter
   article for
more information if needed. 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Problems Execute Linux Commands using JSR223 PrePrcessor with Groovy Engine and pipe-symbol

2019-12-04 Thread glin...@live.com
As you correctly mentioned, "it's working perfect on bash". 

Groovy knows nothing about the pipe symbol so you need to execute  bash -c
command    and pass your
whole command as the parameter, something like:


> "/bin/bash -c \"echo -en \\\"https://my-url.com:\\\; | openssl smime
> -sing -signer cert.crt -inkey cert.key -outform der -binary -md sha384
> -out blah.p7\"".execute().text

Groovy neither knows your *$path* environment variable, if the environment
variable exists and is available to JVM you can read its value using 
System.getEnv()
  
function

It might be easier to go for  OS Process Sampler

 
, check out  How to Run External Commands and Programs Locally and Remotely
from JMeter

  
article for details. 

And from the performance perspective instead of calling external
applications you should rather consider creating the CSR request using i..e 
BouncyCastle API   
 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Not able to record native app traffic in jmeter with https protocol

2019-11-14 Thread glin...@live.com
Be informed that in case of  Android >= 7.0 Nougat

  
you need to perform extra steps in order to be able to record HTTPS traffic
via JMeters MITM certificate 1. Add the following line to the  application
  
element in your Android application  manifest file
   
> android:networkSecurityConfig="@xml/network_security_config"

 2.  create file `network_security_config.xml` under  res folder
  
of your application and put the following code inside it: 3.
Re-compile your application in  debug flavour
  
> gradlew assembleDebug

4. Replace the application on the device with the newly build debug version
- this one you can record with JMeter. If you don't have access to your
application sources you will have to root your device,  convert JMeter's
certificate into PEM format using OpenSSL and copy it to Android OS trusted
certificates area using ADB
 
More information: Recording Using Android Devices

  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

Re: Jmeter System Preferences Lock Error

2019-11-07 Thread glin...@live.com
Looking into  JMeter Bug 61279
   it isn't something
connected with JMeter, I can think of the following reasons for the
behaviour:1. You have more than 1  JVM
  running on the EC2
machine and these JVMs are suffering from a form of a  race condition
   when trying to obtain the
lock on the same file to store the preferences2. There is a problem with
Linux file permissions and JVM, i.e. you're running out of  free handles
  The
solution for point 1 would be explicitly specifying the store for 
systemRoot

 
and  userRoot

 
for the JVM which hosts JMeter so it would use the separate preferences
storage not shared with other JVMs. The properties can be defined either via 
-D command-line argument
   like:
> ./jmeter -Djava.util.prefs.systemRoot=/some/folder/.jmeter
> -Djava.util.prefs.userRoot=/some/folder/.jmeter/.userPrefs

In order to make the changes persistent you can add the same lines to
/system.properties/ file (lives in "bin" folder of your JMeter installation)
> java.util.prefs.systemRoot=/some/folder/.jmeterjava.util.prefs.userRoot=/some/folder/.jmeter/.userPrefs

More information:  Apache JMeter Properties Customization Guide
 
In case of point 2 I would recommend checking / raising  Linux process
limits    



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

Re: FILE Upload: TypeError: Cannot read property 'size' of undefined

2019-11-05 Thread glin...@live.com
It is impossible to come up with the comprehensive response without seeing
your request configuration, a short checklist:1. Make sure to copy the file
to "bin" folder of your JMeter installation or to provide the full path to
the file2. Tick "Use multipart/form-data" box in the  HTTP Request
  
sampler 3. Make sure to use correct "Parameter Name" under the "Files
Upload" tab, it should be exactly the same as *name* parameter of the  file
input   In general
given you can successfully execute the request using Postman you could
record the request using JMeter, just  configure Postman to use JMeter as
the proxy

 
, start JMeter's HTTP(S) Test Script Recorder,  copy the file you will be
uploading to JMeter's "bin" folder
   and
execute the request in Postman. JMeter will capture the request and store it
under the  Recording Controller

   



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

Re: JMeter jsencrypt using groovy

2019-10-16 Thread glin...@live.com
You're looking for the code in the wrong place, my expectation is that you
should rather be using freelancer marketplaces or your friends/colleagues
rather than asking the members of JMeter mailing list to do your job for
you. As an exception here is how you can use  Java Security API
   and
Groovy language in order to perform RSA encryption of a string using a
public key:
> def cipher = javax.crypto.Cipher.getInstance('RSA')def factory =
> java.security.KeyFactory.getInstance("RSA")def
> publicKeyString='your_public_key_here'def  encodedKeySpec = new
> java.security.spec.X509EncodedKeySpec(publicKeyString.decodeBase64())def
> publicKey =
> factory.generatePublic(encodedKeySpec)cipher.init(javax.crypto.Cipher.ENCRYPT_MODE,
> publicKey)cipherText = cipher.doFinal('the string you want to
> encode'.getBytes())log.info('Encrypted: ' + cipherText.encodeBase64())

More information:  Apache Groovy - Why and How You Should Use It
  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

Re: Reducing Timer with While Loop

2019-10-09 Thread glin...@live.com
You need to obtain the current timestamp prior to entering the loop and save
it into a  JMeter Variable
  .  It can be done
using the following  __groovy() function
  
> ${__groovy(vars.putObject('start'\, System.currentTimeMillis()),)}

Now you have loop start time hence you can introduce 2  clauses for the
while loop, it can be done using the aforementioned __groovy() function
which needs to be put into the  While Controller's

  
"Condition" input field:
> ${__groovy((vars.get('callAPIVariable').equals('true') &&
> (System.currentTimeMillis() - (vars.getObject('start') as long) <
> 3)),)}

Assuming the above setup the While Controller will loop over until
*callAPIVariable* value is *true* or 30 seconds pass, whatever happens the
first. See  The Groovy Templates Cheat Sheet for JMeter
  
article to learn what else can be done using Groovy scripting in JMeter
tests. 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

Re: i found Jmeter closed the connection at the end of each requests. so How can I keep an open TCP connection longer,

2019-10-02 Thread glin...@live.com
You can do it using either  TCP Sampler
  
which has *Re-use connection* checkbox or  HTTP Raw Request

  
sampler which is easier to use when it comes to HTTP endpoints testing. 

Example configuration:   

You can install HTTP Raw Request sampler using  JMeter Plugins Manager
  

 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Header Manager not working properly with the "Java" HTTP protocol

2019-09-13 Thread glin...@live.com
Header Manager is working just fine, you can verify what headers are being
sent using a sniffer tool like  Wireshark   

Looking into  JMeter Changelog
   for  JMeter 3.2
   there is  Bug 60778
   which references 
getRequestProperty(“Authorization”) always returns null

  
question on StackOverflow and the  accepted answer
   explains that the behaviour
is expected. 

So all the headers you define in the HTTP Header Manager are really sent
with Java implementation, but you cannot observe some of them in the View
Results Tree listener due to the aforementioned security restriction. 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Handling Asynchronous API Call in Jmeter

2019-08-20 Thread glin...@live.com
You can consider putting your requests under  Parallel Controller

 
, it executes its children at exactly the same moment hence you can overcome
JMeter's thread group limitation and spawn as many extra parallel threads as
needed to implement your scenario. 

Check out  How to Use the Parallel Controller in JMeter
 
 
article for more information on plugin usage. 

You can install Parallel Sampler and Controller using  JMeter Plugins
Manager    



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: concurrency test

2019-07-30 Thread glin...@live.com
The concurrency in both cases is the same as Synchronizing Timer doesn't do
anything given you set 0 as the Number of Simulated Users to Group by. 

With regards to "10" - it's a big question mark and it mostly depends on
your application response time. Given you have only 1 loop at  Thread Group
  
level you may run into a situation when some requests have not been yet
started and some are completed already. 

The actual concurrency can be checked using i.e.  Active Threads Over Time
   listener. 

You can easily manipulate the desired concurrency using  Concurrency Thread
Group   

Both the aforementioned plugins can be installed using  JMeter Plugins
Manager
  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Script error

2019-07-30 Thread glin...@live.com
In the majority of cases it is not possible to successfully replay recorded
script without prior  correlation

  

My expectation is that the request which adds the item to the card relies on
a some dynamic value which is not valid anymore and either needs to be
extracted from the previous request using a suitable  JMeter PostProcessor
  
or it's something specific to the application you're testing, for example if
you have already added an item to the cart it cannot be added one more time
as it's there already. 

So add  View Results Tree listener

  
to your Test Plan and run your test in GUI mode inspecting request and
response details, it might be the case that you're not getting logged in
hence all requests which require authentication are failing. 

If you're a BlazeMeter customer the easiest option is  raising a support
request

  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Login issue when executing test on server side

2019-06-17 Thread glin...@live.com
If the issue cannot be reproduced for lesser number of virtual users (i.e. 1,
2, 20) - most probably it indicates server issue, i.e. it lacks resources
(can be checked using i.e.  JMeter PerfMon Plugin

 
), has wrong configuration of application server / database / load balancer
or the application itself is not optimized for high loads (can be checked
using  profiler tools
  )

Another possible reason is that JMeter is not capable of sending requests
properly due to lack of resources or improper configuration. Theoretically
you should be able to easily simulate 200 users even using default JMeter
setup and single node assuming you  run your test in non-GUI mode
  , however
it's better to make sure that you're following  JMeter Best Practices
   and that JMeter
has enough headroom to properly operate.   



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: JMeter with selenium scripts - response time for individual requests

2019-06-10 Thread glin...@live.com
With regards to JMeter Listeners  View Results Tree

  
and  View Results in Table

  
show statistics for each individual request 

 

Another option is adding specific JMeter Functions like  __threadNum()
   to add
current number of virtual user or  ${__groovy(vars.getIteration(),)}
  
to add current Thread Group iteration number to the sampler, this way each
sampler will have an individual label and will be displayed separately even
in such listeners as  Aggregate Report

  

  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: JMeter Response time exclude response times form Failed transactions

2019-06-10 Thread glin...@live.com
The easiest option is using  Filter Results Tool
   plugin in order to
post-process the .jtl result file and exclude any failed samplers from it. 

The relevant syntax would be something like:


> FilterResults.bat --output-file only-successes.jtl --input-file
> your-results-file.jtl --success-filter true

Replace *only-successes.jtl* and *your-results-file.jtl* with actual file
names of your choice. 

You will need  Merge Results plugin
   as well to get this done,
both the plugins can be installed using  JMeter Plugins Manager
  





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Access to local storage data.

2019-06-07 Thread glin...@live.com
As per JMeter project main page   :




> JMeter is not a browser, it works at protocol level. As far as
> web-services and remote services are concerned, JMeter looks like a
> browser (or rather, multiple browsers); however JMeter does not perform
> all the actions supported by browsers. In particular, JMeter does not
> execute the Javascript found in HTML pages. Nor does it render the HTML
> pages as a browser does (it's possible to view the response as HTML etc.,
> but the timings are not included in any samples, and only one sample in
> one thread is ever displayed at a time).

So if you have the value somewhere in browser session - just extract it
using  browser developer tools

  
and add to JMeter script. 

If you're working on JMeter integration with  Selenium
  via  WebDriver Sampler
   - be aware that
you can manupulate  window.localStorage object
  
using JavaScript like:


> //set value:
> WDS.browser.executeScript("localStorage.setItem('foo', 'bar')")
> //get value:
> var foo = WDS.browser.executeScript("return localStorage.getItem('foo');")

 





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: reading part of request body from a file

2019-03-19 Thread glin...@live.com
It is, take a look at  __FileToString() function
   which
you can use directly in the HTTP Request sampler "Body Data" tab where it is
required to add this header. 

Given you have nested functions inside the payload you will also need to
wrap it into  __eval() function
   so they would
be evaluated in the runtime


> ${__eval(${__FileToString(/path/to/your/file,,)})}  

More information:  Here’s What to Do to Combine Multiple JMeter Variables

  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: unable to create new native thread error

2019-03-12 Thread glin...@live.com
The error looks like an  OS level limitation
  
of the number of processes so you need to amend underlying operating system
configuration in order to allow at least that many processes as virtual
users. 

See  Maximum number of processes in linux

  
for more details. 

Given the number of virtual users you're trying to simulate it makes more
sense to go for  distributed testing
  
as my expectation is that investing into a couple of AWS machine would be
much cheaper than the time and effort you will spend by trying to conduct
this load using a single host.  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Jmeter & application logging concern

2019-03-11 Thread glin...@live.com
I don't fully understand why you're asking questions not related to JMeter in
JMeter mailing list, however just in case other person will make the same
mistake:

1. You're going into wrong direction, instead of redirecting STDOUT to
jmeter.log file you should be doing the opposite thing: copying messages
which should be going to the jmeter.log file to STDOUT. Given the nature of
your query I strongly doubt you will be capable of do this yourself so here
you go:


> 
> 
> 
> 
>  append="false">
> 
> 
> 
> 
> %d %p %c{1.}: %m%n
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> %d %p %c{1.}: %m%n
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

2. The above step will give you the output in "Jenkins console". If you
additionally want to have it in the file - you can use the underlying OS
shell  redirection operator
   to
save the STDOUT / STDERR outputs into the file. Again looking into your
question I expect you will post the next one right here so kindly find an
example (this is for  Bash   
shell):


> jmeter -n -t test.jmx -l result.jtl > jmeter.out >file.txt 2>&1 

3. Executing JMeter tests in Jenkins:  Continuous Integration 101: How to
Run JMeter With Jenkins

  





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Android SDK testing via Jmeter

2019-03-05 Thread glin...@live.com
If you want to assess certain (or all) Android SDK functions performance it
makes more sense to consider i.e.  Java Microbenchmark Harness
   or profiler tool like 
JProfiler   
or  YourKit   

If you still want to go for JMeter - most probably you're looking for  JUnit
Request    sampler  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: JMeter Query on Threads

2019-02-25 Thread glin...@live.com
Using vanilla JMeter it is very tricky, nearly impossible. 

Consider using  Parallel Controller
 
, it's main goal is simulating  AJAX
   requests  which have
the same "forking" nature as you're looking for. 

You can install Parallel Controller using  JMeter Plugins Manager
   



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: JMeter functions do not work in Java application

2019-02-20 Thread glin...@live.com
Double check that:

1. You're using  JMeter 5.0
   (or whatever is the
latest version available at  JMeter Downloads
   page)
2. Your Java application has  ApacheJMeter_functions.jar
  
in its  CLASSPATH   

Assuming above conditions are met you should be able to normally use JMeter
functions in your custom application. 






--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Regular Expression Help

2019-02-18 Thread glin...@live.com
Add  JSON Extractor
  
as a child of the request which returns the above JSON and use the following
expression:


> $..[?(@.isComplete == 0)].productID

Explanation:

1.  .. - is a deep scan operator
   so the expression
searches for all the *productID* attribute values

 2.  == is a filter operator
   so the expression
will return productID only when isComplete equals to 0

See  JMeter's JSON Path Extractor Plugin - Advanced Usage Scenarios
  
for more details on performing advanced correlation operations via JsonPath
query language







--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Configure Filename in UI

2019-02-11 Thread glin...@live.com
I doubt that you find this useful for storing "the input of your choice",
consider using  Sample Variables
 
property instead which allows storing the value of an arbitrary  JMeter
Variable    into a .jtl
results file. 

With regards to your question itself, *Filename* column holds the value of
the output file which can be specified in the  Save Responses to a file
listener

  
which some people use to save the output of JMeter samplers - see 
Performance Testing: Upload and Download Scenarios with Apache JMeter

  
article for more details.  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



RE: How to automate the "Regular Expression Extractor" usage without finding dynamic contents manually in API response

2019-02-07 Thread glin...@live.com
As of JMeter 5.0 automatic correlation functionality has not yet been
implemented, you can go for a 3rd-party solutions like  JCorrelate
   or  BlazeMeter Proxy Recorder
  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: send email with results in View Results Tree as attachment

2019-01-31 Thread glin...@live.com
As per current JMeter version ( JMeter 5.0
  ) it is hardly
achievable (unless you want to come up with a  custom plugin
  )

I would recommend the following alternative approaches:

 1. Configure JMeter to save all the request and response data, for example
you can add the next lines to /user.properties/ file:


>  jmeter.save.saveservice.output_format=xml
>  jmeter.save.saveservice.response_data=true
>  jmeter.save.saveservice.samplerData=true
>  jmeter.save.saveservice.requestHeaders=true
>  jmeter.save.saveservice.url=true
>  jmeter.save.saveservice.responseHeaders=true

and then send the XML results file - the recipients will be able to open it
using View Results Tree listener

 2. Provide high-level summary instead of details per request. You can
generate a CSV form of the  Aggregate Report
 
 
listener using  JMeterPluginsCMD Command Line Tool
   and  Synthesis Report
   plugins, the relevant
command to generate the textual form of the Aggregate Report would be
something like:


> JMeterPluginsCMD.sh --generate-csv file-to-send.csv --input-jtl
> JMeter-test-result.jtl --plugin-type AggregateReport





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: error loading jmx file in VM

2019-01-28 Thread glin...@live.com
Your test relies on  Parameterized Controller
   which doesn't
seem to be installed on the VM. 

The easiest way of installing plugins and keep them up-to-date is using 
JMeter Plugins Manager
  . It
is also capable of detecting missing plugins and suggesting to install them
in order to properly open the .jmx script which is using  JMeter Plugins
  .

  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: What is the relationship between JVM XMX and XMS in jmeter and the number of concurrent users

2019-01-28 Thread glin...@live.com
JMeter is a normal Java application hence you should treat it as any other
Java application in terms of  performance tuning
  

There is no "silver bullet" instruction. Neither anyone can tell how many
users you will be able to simulate for this or that test as "it depends".
Mainly it depends on:

1. Nature of your test (what the test is doing, request and response size,
number of  Preprocessors
 
,  Postprocessors
 
,  Assertions
  , etc).
Remember that any test element has its cost and try to limit their usage to
absolute viable minimum. 

2. It is not possible to provide "recommended" minimum and maximum heap
values as it also depends on how JMeter copes with the load. You can see
what's going on using  JVisualVM
  
tool. First of all, maximum heap should be big enough in order to fit in
JMeter, all thread variables, requests and responses data for all the
threads, if the data will not fit into heap - you will get 
java.lang.OutOfMemoryError: Java heap space

 
. Going forward if JVisualVM shows that Java spends too much time doing GC -
you might want to increase heap size and vice versa, you might want to
decrease heap usage to give resources to other processes. 

3. Remember that any heap manipulation should be followed by the amendment
of other parameters like  MaxMetaSpaceSize
  

So start with default settings and ensure that:

1. Java uses machine resources efficiently, i.e. you don't have too many
spare RAM and CPU
2. System isn't overloaded,  i.e. there is no lack of CPU or RAM
3. JVM doesn't spend too much time doing GC

If you performed all the optimisations and still unable to conduct the
required load - you will have to go for  Distributed Testing
  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: jmeter - replay

2019-01-11 Thread glin...@live.com
1. JMeter automatically treats responses with  HTTP Status Codes
   below 400 as
successful. It doesn't do any extra checks so you might want to introduce 
Assertions
  
in order to verify that your test is doing what it is supposed to be doing. 

2. Make sure to add  HTTP Cookie Manager

  
to your Test Plan

3. Record the same scenario one more time and compare the recorded scripts.
If you see the differences - these values need to be *correlated* - to wit
extracted from the previous response using suitable JMeter  Post-Processor
  
and stored into  JMeter Variables
  . Once done you will
need to replace hard-coded values which need to be dynamic with the
aforementioned variables.  





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: HTTP Request's Content Encoding field

2018-12-25 Thread glin...@live.com
It is being used at least:

 1. For  setting request header

  
 2. For  encoding POST request data

  
 3. For  encoding query string

  

The easiest way of testing this is setting Content Encoding to something,
which cannot be resolved to a  Java Charset

 
, in this case you will immediately get an  UnsupportedCharsetException

  

Another option of testing this is using  View Results Tree
  
listener, if you leave the Content Encoding input blank - JMeter will send
default charset (UTF-8). If you set the encoding of your choice - JMeter
will add this as the  Content-Type header
  
*charset* parameter

 





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Sent request with no User-Agent header

2018-11-28 Thread glin...@live.com
As per  HttpClient JavaDoc

  


> This class sets up the following parameters 
*
> if not explicitly set
*
> :
> 
> Version: HttpVersion.HTTP_1_1
> ContentCharset: HTTP.DEFAULT_CONTENT_CHARSET
> NoTcpDelay: true
> SocketBufferSize: 8192
*
> UserAgent: Apache-HttpClient/release (java 1.5)
*

I don't think there is an easy way of disabling this (unless you would like
to go for  Reflection
 
)

If you don't want the User-Agent header you can switch to "Java"
implementation, the setting lives under "Advanced" tab of the HTTP Request
sampler (or even better  HTTP Request Defaults

 
, this way the setting will be applied to all the HTTP Request samplers in
its scope and you will not have to revisit each one individually)  

Also be aware that according to JMeter Best Practices  you should always be
using the latest version of JMeter
  
so consider upgrading to JMeter 5.0 (or whatever is available at  JMeter
Downloads    page) on next
available opportunity




--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: JMeter 4 with Java 1.7

2018-11-12 Thread glin...@live.com
According to  JMeter changelog
   the latest JMeter version
which is compatible with Java 7 is  JMeter 3.1
  

I don't think you will be able to use  JMeter 4 with Java 7 as it simply
will not compile. 

With regards to "organization" if you really need JMeter 4 you can point the
responsible persons to  JMeter Best Practices you should always be using the
latest version of JMeter
  , moreover the
end of public updates for Java 7 was in April 2015 (>3 years ago)

Be aware that you can always download Java 8 (or higher) from OpenJDK
archives    or use  Java 8 Docker containers
   so you could bundle Java distribution
along with the required JMeter distribution along with the tests

  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Protobuf support

2018-10-17 Thread glin...@live.com
Theoretically yes, but

 1. Not out of the box
 2. You will need to be capable of writing Java or Groovy code

If you add  protocol buffers libraries
   to  JMeter
Classpath   
you will be able to create and send protocol buffers messages. 

Check out  Protocol Buffers Java Tutorial
   for
example code and  Apache Groovy - Why and How You Should Use It
   to get familiarized
with the concept of custom scripting in JMeter



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Print thread groups including comments fields of underlying controllers

2018-10-09 Thread glin...@live.com
You can use  SearchByClass

  
functions in order to fetch information on Include Controllers from the Test
Plan. 

Here is an example with regards to how this can be done from JMeter test
itself using  JSR223 Sampler
  
and  Groovy   language :

 1. Add  tearDown Thread Group

  
to your Test plan
 2. Add JSR223 Sampler to the tearDown Thread Group
 3. Put the following code into "Script" area:



> import org.apache.jmeter.engine.StandardJMeterEngine
> import  org.apache.jmeter.control.IncludeController
> import org.apache.jorphan.collections.HashTree
> import org.apache.jorphan.collections.SearchByClass
> import java.lang.reflect.Field
> 
> StandardJMeterEngine engine = ctx.getEngine()
> Field test = engine.getClass().getDeclaredField("test")
> test.setAccessible(true)
> HashTree testPlanTree = (HashTree) test.get(engine)
> 
> SearchByClass
> 
>  includeControllerSearch = new SearchByClass<>(IncludeController.class)
> testPlanTree.traverse(includeControllerSearch)
> Collection
> 
>  includeControllers = includeControllerSearch.getSearchResults()
> log.info('**')
> includeControllers.each {
> log.info('Module: ' + it.getName() + ' Comments: ' + it.getComment())
> }
> log.info('**')



This way you will get the information on Include Controllers printed to
/jmeter.log/ file 


 

So you can either find the information in the jmeter.log file by searching
for the above asterisks or amend the code to be a standalone application and
create PDF using i.e.  Apache PDFBox   , anyway
further steps are out of scope for this mailing list. 




--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: HTTP Request's Content Encoding field

2018-09-25 Thread glin...@live.com
Try sending a HTTP GET request with a Chinese character and encoding set to
US-ASCII. 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Programmatically generate PNG from the PerfMon plugin results

2018-09-20 Thread glin...@live.com
You can do this via  JMeterPluginsCMD Command Line Tool
  , the relevant
command-line syntax would be something like:


> JMeterPluginsCMD.bat --generate-png perfmon.png --input-jtl
> perfmon-results.csv --plugin-type PerfMon --width 1024 --height 768

You can install JMeterPluginsCMD tool using  JMeter Plugins Manager
  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Regular Expression

2018-09-20 Thread glin...@live.com
Mind that  using Regular Expressions for HTML response types might be not the
best idea    as regular
expressions are hard to develop/maintain/understand, they are fragile, they
are sensitive to markup changes (i.e. if order of attributes changes or
there will be a line break - it will run your regex). 

So consider going for  CSS/JQuery Extractor

  
instead, the configuration would be as simple as:

CSS Selection Expression:* input[id=sg:cf:b:0]*
Attribute: *value*

Demo:

 

More information:  How to Use the CSS/JQuery Extractor in JMeter
  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Delay Between Http Requests

2018-09-20 Thread glin...@live.com
You must be looking for implementation of dynamic  pacing

  
which can be done using some  Groovy scripting in the JSR223 Timer
  




--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Need pointers to test .Net based Desktop Application

2018-09-04 Thread glin...@live.com
If your application talks to the database directly you can use JMeter's  JDBC
Request
 
sampler to simulate multiple applications accessing the database
simultaneously. 

So instead of interacting with the UI you need to send associated SQL
queries to the backend.

 1. Download  Microsoft JDBC Driver for SQL Server

  
and drop the .jar (and .dlls if you are going to use native authentication)
to  JMeter Classpath
   and 
java.library.path   
correspondingly
 2. Restart JMeter to pick up the libraries
 3. Add  JDBC Connection Configuration

  
and define database URL, credentials and other settings there
 4. Add a JDBC Request sampler per simulated query and put your query there





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: How to record Desktop application using Jmeter

2018-09-04 Thread glin...@live.com
You can record a desktop application just like web application, but keep in
mind that JMeter can record only  HTTP
   and 
HTTPS    traffic,
if your application uses different protocol(s) you will not be able to
record its network activity with JMeter. 

Be aware that:

 1. You might need to amend your *operating system* proxy settings if your
application doesn't have separate proxy configuration
 2. You might need to install  JMeter's self-signed certificate

  
into your operating system certificate storage
 3. You might need to  install loopback adapter

 
if you're using Windows

More information:  How to Run Performance Tests of Desktop Applications
Using JMeter

  

 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Recording Swagger and Apiary data

2018-08-27 Thread glin...@live.com
If you mean  importing Swagger API definition

  
- currently it is not possible using JMeter. However given you have a
Postman test plan you can easily convert it into a JMeter Test plan by
running it via JMeter's HTTP(S) Test Script Recorder. 

 1. Prepare JMeter for recording. The fastest and the easiest way is using 
JMeter Templates Feature

 
. From JMeter's main menu choose *File -> Templates -> Recording* and click
*Create*
 2. Prepare Postman for recording. All you need to do is to configure it to
use JMeter as the proxy, the configuration lives under *File -> Preferences
-> Proxy*

 
 3. Run your test 
 4. JMeter will capture the requests and save them under the  Recording
Controller

  




--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: jmeter command stuck - FTP testing

2018-08-27 Thread glin...@live.com
As of JMeter 4.0 underlying  FTPClient

  
doesn't have any timeouts so if your server will never respond - your JMeter
test will never end. 

You can work it around by placing your FTP requests under the  Runtime
Controller

  
- this way you will get confidence that your test will be terminated by the
Runtime Controller. 

Another option is switching from JMeter's FTP Request sampler to  JSR223
Sampler

  
where you will have full control over FTPClient instance and will be able to
define all the timeouts you can think of


> FTPClient ftpClient = new FTPClient(x);
> 
> ftpClient.setDefaultTimeout(x);
> ftpClientp.setDataTimeout(x);
> ftpClientp.setConnectTimeout(x);
> ftpClient.setSoTimeout(x);
> ftpClient.setControlKeepAliveTimeout(x);
> ftpClient.setControlKeepAliveReplyTimeout(x);   





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Invoking local file

2018-08-13 Thread glin...@live.com
You don't need this "http" URL scheme as you're working with the local file,
you URL should look like:


> file:///E:/Krishna/apache-jmeter-4.0/apache-jmeter-4.0/bin/SampleJson.json

Going forward be aware that there is a  Dummy Sampler
  
which allows you to mimic arbitrary responses. You can use it in combination
with  __FileToString()
  
function in order to return the content of the local file. 

Dummy Sampler can be installed using JMeter Plugins Manager




--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Parallel Logic Controller

2018-07-22 Thread glin...@live.com
It depends on the nature of the requests. If you need to mimic a "spike",
i.e. need to simulate 50 users concurrently doing the same action, i.e.
checking out an item, logging in, voting, etc. - you don't need any plugins,
JMeter's Synchronizing Timer

  
will be sufficient.  

Parallel Controller comes into play where you need to implement some "egde"
conditions, for example if after login your application dashboard is being
loaded in several parallel threads originating i.e. via  AJAX
   requests.  In this case you
won't be able to easily simulate this type of load using JMeter built-in
test elements, however with the Parallel Controller it is a matter of
seconds. Check out  How to Use the Parallel Controller in JMeter
  
article for more details on Parallel Controller use cases. 





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: JSR223 PreProcessor - Issue

2018-07-01 Thread glin...@live.com
Don't inline  JMeter Functions and/or Variables
   into Groovy code. 

As per  JSR223 Sampler documentation
  


> When using this feature, ensure your script code does not use JMeter
> variables directly in script code as caching would only cache first
> replacement. Instead use script parameters

 

If you're looking for a "pure"  Groovy
   equivalent of your code
it would be something like:


> vars.put('MESSAGE', new File('C:\\Users\\xyz\\Desktop\\Test.txt').text)





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Avg field not visible in .jtl file < Urgent pls >

2018-06-24 Thread glin...@live.com
You will not find average value as it is being *calculated*, it is basically
an  arithmetic mean    of the
response times (sum of all responses times divided by their count)

You can get it from the .jtl results file either by applying above formula
or using  JMeterPluginsCMD Command Line Tool
   which is capable of
generating CSV version of the  Aggregate Report
 
 
from the .jtl results file. 

There is also  Merge Results   
tool which can be used for 2 test runs comparison which can be invoked from
the JMeterPluginsCMD Command Line Tool as well. 

Both the tools can be installed using  JMeter Plugins Manager
  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: using the same user for all iterations

2018-06-24 Thread glin...@live.com
You can do this using one of  JSR223 Test Elements
   or 
__groovy() function
  , the
relevant code would be something like:


> new File('test.csv').readLines().get(ctx.getThreadNum())

where *ctx* stands for  JMeterContext
  
class instance. 

More information on Groovy scripting in JMeter:  Apache Groovy - Why and How
You Should Use It   



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Multipart/form-data request manually with JSF viewstate

2018-06-24 Thread glin...@live.com
Instead of copying and pasting the file contents into the .jmx script itself
you can use  __FileToString() function
   which
reads the file from file system. This approach is way more robust and  VCS
  -friendly. 

You can also check out  Testing REST API File Uploads in JMeter
 
 
for an example of manually building a file upload request.





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Jmeter sample count

2018-06-17 Thread glin...@live.com
You are *not* sending 1 request per 1 second, JMeter tries to send requests
as fast as it can for 15 minutes and the number of threads will vary
depending on the response time. 

The only way of getting exactly 900 hits in your setup is placing your
request under a  Throughput Controller

 
, choose "Total Executions" mode and set "Throughput" to 900. 

If you additionally want to limit JMeter's throughput to 1 request per
second you can achieve this in 2 ways:

 1. Using  Constant Throughput Timer

  
and configure it to send 60 samples per minute

 2. Using  Throughput Shaping Timer
   which is more
advanced and under some conditions precise version of the Constant
Throughput Timer using Start and End RPS as 1 and 900 seconds as duration.
You can install Throughput Shaping Timer using  JMeter Plugins Manager
   



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Download

2018-06-17 Thread glin...@live.com
The download itself is being performed by the  HTTP Request
  
sampler, if you additionally want to save the file somewhere to your local
file system you can add  Save Responses to a file

  
listener *as a child * of the relevant HTTP Request sampler and configure it
like:

Filename prefix: full or relative path to the file where you want response
to be stored in

If you want to download only a single file with a single thread (virtual
user) in a single loop - tick "Don't add number to prefix" and "Don't add
suffix" boxes. 

See  Performance Testing: Upload and Download Scenarios with Apache JMeter

  
article for more information if needed



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: ID

2018-05-27 Thread glin...@live.com
Your "ID" value is utterly like to be a  GUID
   so you can
extract it using  Regular Expression Extractor
   configured
like:

1. Reference Name: anything meaningful, i.e. *id*
2. Regular Expression:
*([A-Fa-f0-9]{8}[\-][A-Fa-f0-9]{4}[\-][A-Fa-f0-9]{4}[\-][A-Fa-f0-9]{4}[\-]([A-Fa-f0-9]){12})*
3. Template: *$1$*
4. Match No: if you have >1 IDs in the response and you would like to have
them all - use *-1*. If you want a random one - use *0*. If you want the
first one - use *1*, etc. 

See  Using RegEx (Regular Expression Extractor) with JMeter

  
article for more information if needed. 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: Which Files/Directory contains the View Tree Results data

2018-05-27 Thread glin...@live.com
If you run your test in GUI mode - by default the results are being kept in
memory (unless you specify something in "Write Results To" section. 

If you run your test in non-GUI mode by default JMeter doesn't store
response data, it intentionally discards the data to avoid high disk IO
which may have negative impact on your test. However you can enable it by
applying custom  Results File Configuration

  
to wit:


> jmeter.save.saveservice.output_format=xml
> jmeter.save.saveservice.response_data=true
> jmeter.save.saveservice.samplerData=true
> jmeter.save.saveservice.requestHeaders=true
> jmeter.save.saveservice.url=true
> jmeter.save.saveservice.responseHeaders=true

Also be aware that you can test your Regular Expressions, CSS/JQuery
Expressions, JSON Path Expressions, etc. directly in the  View Results Tree

  
listener, just select something different from "Text" dropdown. See  How to
Debug your Apache JMeter Script
  
article for more information on the approach.



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: JMeter recording

2018-04-06 Thread glin...@live.com
 1. You don't need to record any calls to images, scripts, styles, fonts,
etc. you should configure JMeter to retrieve all embedded resources from the
page and use concurrent thread pool of 4-6 threads for fetching them as this
is something what real browsers do in the  HTTP Request Defaults

 
.  You should also exclude requests which belong to external domains so your
test would focus only application under test and not include any stuff from
i.e. Google, Youtube, whatever. See  Web Testing with JMeter: How To
Properly Handle Embedded Resources in HTML Responses

  
for more details.

 2. You can use  Debug Sampler
  
or  Debug PostProcessor

 
. You can also print variables values to /jmeter.log/ file using  __logn()
function   

 3. The question is not clear. 
 4. Well-behaved JMeter test (assumes you handle embedded resources like
described in point 1, use  HTTP Cache Manager

  
to represent browser cache, use  Parallel Controller

  
to represent JavaScript calls, etc) should produce the same response time as
real browser does. 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



Re: ServletConfig has not been initialized

2018-03-25 Thread glin...@live.com
1. Regarding "I have no way to prove this" - actually you do, you can
configure JMeter to save request and response details by adding the next
lines to /user.properties/ file:


> jmeter.save.saveservice.output_format=xml
> jmeter.save.saveservice.response_data=true
> jmeter.save.saveservice.samplerData=true
> jmeter.save.saveservice.requestHeaders=true
> jmeter.save.saveservice.url=true
> jmeter.save.saveservice.responseHeaders=true

and restart JMeter to pick the changes up. Once your test will be finished
you will be able to open the .jtl results file with  View Results Tree

  
listener and inspect request and response details. It will show whether your
regular expression extractor works or not as well. 

 2. If request in real browser is successful and request by JMeter is not
there should be something different. Compare requests which originate from
JMeter and the real browser using a sniffer tool like  Wireshark
   or  Fiddler  
, you should be able to detect differences by inspecting HTTP packets. It
might be the case you need to correlate not only the form id, but few more
parameters. As a workaround you can try an alternative way of recording a
JMeter test which can export recorded requests in SmartJMX mode
automatically detecting and dynamic parameters and creating regular
expression extractors to handle them See  How to Cut Your JMeter Scripting
Time by 80%
  
article for more details. 

 3. Last by not least: make sure to add  HTTP Cookie Manager

  
to your test plan, it automatically handles cookies which might be a
showstopper for web applications which rely on them. 
 





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

-
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org



  1   2   >