How to suppress JMeter deprecated warning

2024-05-20 Thread Tong Sun
Had meant to ask for quite a while -- how to suppress JMeter deprecated
warnings like the following,

"WARN StatusConsoleListener The use of package scanning to locate plugins
is deprecated and will be removed in a future release

etc? Found a different one BTW at
https://stackoverflow.com/questions/59733770/how-to-get-rid-of-warning-nashorn-engine-is-planned-to-be-removed-from-a-future

thx


On Mon, May 20, 2024 at 12:31 AM Raju Sarkar  wrote:

> Hello sir/mam,
>
> ...I'm getting the issue which is mentioned below.../
>
> "WARN StatusConsoleListener The use of package scanning to locate plugins
> is deprecated and will be removed in a future release
>
> WARN StatusConsoleListener The use of package scanning to locate plugins is
> deprecated and will be removed in a future release
>
> WARN StatusConsoleListener The use of package scanning to locate plugins is
> deprecated and will be removed in a future release
>
> WARN StatusConsoleListener The use of package scanning to locate plugins is
> deprecated and will be removed in a future release
>


Re: Iteration Number in JSR223 Groovy string

2024-04-03 Thread Tong Sun
Thanks a lot sir, I really appreciate your help and your get-to-the-bottom
attitude.

Wrapping the resolution in a groovy function is surely a useful trick that
I'll be using a lot.

Thanks again


On Wed, Apr 3, 2024 at 6:10 AM Stuart Kenworthy
 wrote:

> Fix to my groovy call, I missed out a "_"
>
> -Original Message-
> From: Stuart Kenworthy
> Sent: Wednesday, April 3, 2024 11:10 AM
> To: JMeter Users List 
> Subject: RE: Iteration Number in JSR223 Groovy string
>
> I think the problem is, in certain circumstances when used in JMeter
> components vars  are only resolved on first read. From that point on JMeter
> is using the resolved value, not the original function.
>
> The reason you get a 0 is if JMeter expects an integer in that space, it
> represents null as 0. When it ran it initially the response was null, so
> will forever return 0.
>
> One way of getting around this is to wrap the resolution in a groovy
> function.
>
> ${__groovy( return vars.getObject("__jm__" + ctx.getThreadGroup.getName()
> + "__idx)" )}
>
> Or something like, this will run the groovy code fresh each time it is
> hit. Have a play about with it. I used vars.getObject() to return the
> variable as its actual type because vars.get() in groovy always returns it
> as a string.
>
> -Original Message-
> From: Tong Sun 
> Sent: Tuesday, April 2, 2024 6:34 PM
> To: Dmitri T 
> Cc: JMeter Users List 
> Subject: Re: Iteration Number in JSR223 Groovy string
>
> Thanks.
>
> So the root cause is:
>
> > ensure your script code does not use
> > JMeter variables or JMeter function calls directly
>
> Having known that, I still don't quite understand why I'm getting zeros.
> My actual groovy string is:
>
> "ThreadGroup: ${__threadNum}, Iteration Number:
> ${__V(__jm__${__threadGroupName}__idx)}"
>
> Now, suppose `${__threadGroupName}` returns `My_TG`, then the
> `${__V(__jm__${__threadGroupName}__idx)}` will become
> `${__jm__My_TG__idx}`, right? Then why ${__threadNum} gives none zero,
> while ${__jm__My_TG__idx} always gives zero pls? They are the same built-in
> JMeter variables and should behave the same way, right?
>
>
>
> On Tue, Apr 2, 2024 at 1:09 PM Dmitri T  wrote:
>
> > Tong Sun wrote:
> > > JMeter has a built-in variable ${__jm__Thread Group__idx} to
> > > retrieve the current iteration, and I want to replace the `Thread
> > > Group` using ${__threadGroupName}. So this comes natural to me:
> > >
> > > "Iteration Number is ${__V(__jm__${__threadGroupName}__idx)}"
> > >
> > > But when I try it, I always get "0".
> > >
> > > What's wrong with it and what's the fix pls? thx
> > >
> > It comes natural to you only. If you open JSR223 Sampler <
> > https://jmeter.apache.org/usermanual/component_reference.html#JSR223_S
> > ampler>
> >
> > documentation you will see something like:
> >
> > > The JSR223 test elements have a feature (compilation) that can
> > > significantly increase performance. To benefit from this feature:
> > >
> > >   * Use Script files instead of inlining them. This will make JMeter
> > > compile them if this feature is available on ScriptEngine and
> > > cache them.
> > >   * Or Use Script Text and check Cache compiled script if available
> > > property.
> > > When using this feature, ensure your script code does not use
> > > JMeter variables or JMeter function calls directly in script code
> > > as *caching would only cache first replacement*. Instead use
> > > script parameters.
> > >
> >
> > So either put the functions combination into "Parameters" section of
> > your "script" and use it like
> >
> > "Iteration number is " + Parameters
> >
> > or go for code-based equivalent:
> >
> > "Iteration number is: " + vars.get('__jm__' +
> > ctx.getThreadGroup().getName() + '__idx')
> >
> > Check out Top 8 JMeter Java Classes You Should Be Using with Groovy
> > <https://www.blazemeter.com/blog/jmeter-java-classes> to learn what do
> > these *vars* and *ctx* guys mean.
> >
> >
>
> The information included in this email and any files transmitted with it
> may contain information that is confidential and it must not be used by, or
> its contents or attachments copied or disclosed to, persons other than the
> intended addressee. If you have received this email in error, please notify
> BJSS. In the absence of written agreement to the contrary BJSS' relevant
> standard terms of contract for any work to be undertaken will apply. Please
> carry out virus or such other checks as you consider appropriate in respect
> of this email. BJSS does not accept responsibility for any adverse effect
> upon your system or data in relation to this email or any files transmitted
> with it. BJSS Limited, a company registered in England and Wales (Company
> Number 2777575), VAT Registration Number 613295452, Registered Office
> Address, 1 Whitehall Quay, Leeds, LS1 4HR
>


Re: Iteration Number in JSR223 Groovy string

2024-04-02 Thread Tong Sun
On Tue, Apr 2, 2024 at 1:51 PM Dmitri T  wrote:


> I have bad news for you, given you're not capable of understanding what
> does "caching would only cache first replacement." phrase means even
> with the help of online translation tools and LLM you won't last long in
> IT so you should consider switching to OnlyFans career right away.


Is this tone really necessary?


Re: Iteration Number in JSR223 Groovy string

2024-04-02 Thread Tong Sun
Thanks.

So the root cause is:

> ensure your script code does not use
> JMeter variables or JMeter function calls directly

Having known that, I still don't quite understand why I'm getting zeros.
My actual groovy string is:

"ThreadGroup: ${__threadNum}, Iteration Number:
${__V(__jm__${__threadGroupName}__idx)}"

Now, suppose `${__threadGroupName}` returns `My_TG`, then the
`${__V(__jm__${__threadGroupName}__idx)}` will become
`${__jm__My_TG__idx}`, right? Then why ${__threadNum} gives none zero,
while ${__jm__My_TG__idx} always gives zero pls? They are the same built-in
JMeter variables and should behave the same way, right?



On Tue, Apr 2, 2024 at 1:09 PM Dmitri T  wrote:

> Tong Sun wrote:
> > JMeter has a built-in variable ${__jm__Thread Group__idx} to retrieve the
> > current iteration, and I want to replace the `Thread Group`
> > using ${__threadGroupName}. So this comes natural to me:
> >
> > "Iteration Number is ${__V(__jm__${__threadGroupName}__idx)}"
> >
> > But when I try it, I always get "0".
> >
> > What's wrong with it and what's the fix pls? thx
> >
> It comes natural to you only. If you open JSR223 Sampler
> <
> https://jmeter.apache.org/usermanual/component_reference.html#JSR223_Sampler>
>
> documentation you will see something like:
>
> > The JSR223 test elements have a feature (compilation) that can
> > significantly increase performance. To benefit from this feature:
> >
> >   * Use Script files instead of inlining them. This will make JMeter
> > compile them if this feature is available on ScriptEngine and
> > cache them.
> >   * Or Use Script Text and check Cache compiled script if available
> > property.
> > When using this feature, ensure your script code does not use
> > JMeter variables or JMeter function calls directly in script code
> > as *caching would only cache first replacement*. Instead use
> > script parameters.
> >
>
> So either put the functions combination into "Parameters" section of
> your "script" and use it like
>
> "Iteration number is " + Parameters
>
> or go for code-based equivalent:
>
> "Iteration number is: " + vars.get('__jm__' +
> ctx.getThreadGroup().getName() + '__idx')
>
> Check out Top 8 JMeter Java Classes You Should Be Using with Groovy
> <https://www.blazemeter.com/blog/jmeter-java-classes> to learn what do
> these *vars* and *ctx* guys mean.
>
>


Iteration Number in JSR223 Groovy string

2024-04-02 Thread Tong Sun
JMeter has a built-in variable ${__jm__Thread Group__idx} to retrieve the
current iteration, and I want to replace the `Thread Group`
using ${__threadGroupName}. So this comes natural to me:

"Iteration Number is ${__V(__jm__${__threadGroupName}__idx)}"

But when I try it, I always get "0".

What's wrong with it and what's the fix pls? thx


Re: jmeter-5.6.3 and response body viewing

2024-02-26 Thread Tong Sun
Yeah, our company is using a rather old jmeter-5.4.3.

Thanks for the quick fix.


On Mon, Feb 26, 2024 at 11:31 AM Dmitri T  wrote:

> Tong Sun wrote:
> > Hi,
> >
> > I tried to upgrade to jmeter-5.6.3 but found that its response body is
> > showing in a single line, ie, no automatic word wrapping any more.
> >
> > This is very inconvenient for us as all our normal return data are huge
> > when returned correctly while being short when there's something wrong.
> > Seeing them in the single line, I lost the sense of whether the response
> > was good or bad.
> >
> > Any way to turn the automatic word wrapping back on please?
> >
> To upgrade from which version? If you were using 5.6.2 nothing has
> changed <https://jmeter.apache.org/changes.html>.
>
> It looks like a side-effect of the improvement
> <https://github.com/apache/jmeter/pull/706> introduced in JMeter 5.5,
> <https://www.blazemeter.com/blog/jmeter-5-5>
>
> To disable it set view.results.tree.simple_view_limit property to -1
>
>
>
>


jmeter-5.6.3 and response body viewing

2024-02-26 Thread Tong Sun
Hi,

I tried to upgrade to jmeter-5.6.3 but found that its response body is
showing in a single line, ie, no automatic word wrapping any more.

This is very inconvenient for us as all our normal return data are huge
when returned correctly while being short when there's something wrong.
Seeing them in the single line, I lost the sense of whether the response
was good or bad.

Any way to turn the automatic word wrapping back on please?


Will JMeter load its plugins/libs repeatedly

2024-02-01 Thread Tong Sun
Will JMeter load its plugins/libs only at start up, thus having no impact
during the test, or plugins/libs might somehow need to be loaded again (and
again) during the test?

Thanks


Re: JMeter timer scope strange behavior

2023-12-07 Thread Tong Sun
TBH, reading your latest input and trying to figure out the problem is
hard, as the previous context is lost.
IMHO, you'll get better chances to get an answer if you articulate clearly
your whole/current situation again, without missing anything, but without
repeating irrelevant parts.

On Thu, Dec 7, 2023 at 4:05 PM Jun Zhuang 
wrote:

> Figured out, it's the name of the variables I defined for the Gaussian
> timer. In my user defined variables list, I defined the following
>
> [image: Inline image]
>
> then used them in the Gaussian timer like
>
>  [image: Inline image]
>
> somehow that got JMeter confused. When I reduce the value of those
> variables, say set them to 100/300 or both to 0, I got higher throughput.
> Same after I changed their names by removing the ThinkTime_ part.
>
> Anyone has an idea why?
>
> Thanks,
> Jun
> On Thursday, December 7, 2023 at 11:12:10 AM EST, Jun Zhuang <
> thornbird...@yahoo.com> wrote:
>
>
> In the following screenshot, my understanding is the timer in the 
> *Transaction:
> Load Login Page *only works in that scope, does not matter whether it's
> applied in the beginning or end, is that right? If so, then what's causing
> the significantly slowness with the no-timer block?
>
> [image: Inline image]
>
> On Thursday, December 7, 2023 at 10:58:40 AM EST, Tong Sun <
> suntong...@gmail.com> wrote:
>
>
>
>
> On Thu, Dec 7, 2023 at 10:50 AM Jun Zhuang 
> wrote:
>
> My apologies, my previous email was a mess, re-sending.
>
> -
>
> I am seeing unexpected behavior with the timer scoping. I am not using any
> timer for requests in the 1st half of my test plan (DB operations only) and
> only using the Gaussian timer (2 - 4 secs) in the 2nd half of the test,
> i.e., in the === Create Sample Batching Job === simple controller, but it
> seems to be applied universally anyway. The reason I am saying "applied
> universally" is because the test runs very fast in GUI mode (~ 1 min) when
> I use the run without pause option or in non-GUI mode by setting the timer
> to 0.
>
> When I use the 2-4 seconds setting in non-GUI mode, the test ran for more
> than 5 MINUTES and mostly in the 1st half the DB query part.
>
> The timer is placed within the last request in each of the transactions,
> so my understanding is it will only happen after the last request in each
> transaction.
>
> [image: Inline image]
>
>
>
>
> -- Forwarded message -
> From: *Dmitri T* 
> Date: Thu, Dec 7, 2023 at 10:39 AM
> Subject: Re: JMeter timer scoping issue
> To: JMeter Users List , Jun Zhuang <
> thornbird...@yahoo.com>
>
> Timers are executed *before* each Sampler in their scope. If you want it
> to be executed after all Samplers you need to add a Flow Control Action
> <
> https://jmeter.apache.org/usermanual/component_reference.html#Flow_Control_Action
> >
> sampler and make the timer a child of this sampler. Or Flow Control
> Action sampler can create delay on its own exactly where it's placed.
>
> More information:
>
>   * Scoping Rules
> <https://jmeter.apache.org/usermanual/test_plan.html#scoping_rules>
>   * A Comprehensive Guide to Using JMeter Timers
> <https://www.blazemeter.com/blog/jmeter-timer>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
> For additional commands, e-mail: user-h...@jmeter.apache.org


Re: JMeter timer scope strange behavior

2023-12-07 Thread Tong Sun
On Thu, Dec 7, 2023 at 10:50 AM Jun Zhuang 
wrote:

> My apologies, my previous email was a mess, re-sending.
>
> -
>
> I am seeing unexpected behavior with the timer scoping. I am not using any
> timer for requests in the 1st half of my test plan (DB operations only) and
> only using the Gaussian timer (2 - 4 secs) in the 2nd half of the test,
> i.e., in the === Create Sample Batching Job === simple controller, but it
> seems to be applied universally anyway. The reason I am saying "applied
> universally" is because the test runs very fast in GUI mode (~ 1 min) when
> I use the run without pause option or in non-GUI mode by setting the timer
> to 0.
>
> When I use the 2-4 seconds setting in non-GUI mode, the test ran for more
> than 5 MINUTES and mostly in the 1st half the DB query part.
>
> The timer is placed within the last request in each of the transactions,
> so my understanding is it will only happen after the last request in each
> transaction.
>
> [image: Inline image]
>
>


-- Forwarded message -
From: Dmitri T 
Date: Thu, Dec 7, 2023 at 10:39 AM
Subject: Re: JMeter timer scoping issue
To: JMeter Users List , Jun Zhuang <
thornbird...@yahoo.com>

Timers are executed *before* each Sampler in their scope. If you want it
to be executed after all Samplers you need to add a Flow Control Action
<
https://jmeter.apache.org/usermanual/component_reference.html#Flow_Control_Action
>
sampler and make the timer a child of this sampler. Or Flow Control
Action sampler can create delay on its own exactly where it's placed.

More information:

  * Scoping Rules

  * A Comprehensive Guide to Using JMeter Timers



Re: How to run specific calls at an interval of every 5 minutes

2023-04-24 Thread Tong Sun
On Mon, Apr 24, 2023 at 9:14 AM Sunil Malgaya  wrote:
>
> JMeter experts,
>
>
>
> I have a need where I need to run a login call at the interval of 5 minutes
> only (unlike every virtual user who keeps running them continuously). This
> is how my test plan looks:
>
>
>
> S1_Simple controller_LOGIN
>
>Test case1_login
>
>Test case2_landing page
>
>Test Case3_select from dropdown
>
>
>
> S2_Simple controller_Select Page
>
> S3_Simple controller_Review Page
>
>
> I want the "S1_Simple controller_LOGIN" call to be run only at an interval
> of 5 minutes (to simulate real time user experience). I tried putting
> "Uniform Random Timer" with 5 minutes but still the login calls are running
> continuously. Please advise what option(s) would work for this scenario?

Please be specific how you are doing the S1 thread load control, and
be more specific about what you want -- *single thread* executed once
every 5 minutes? You must be doing something wrong, as it is a very
basic setup.

> Thanks,
>
> Sunil

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



Refer to JMeter script path

2022-10-05 Thread Tong Sun
Hi,

According to JMeter doc:

JMeter also supports paths relative to the directory containing the current
> test plan (JMX file). If the path name begins with "~/" (or whatever is
> in the jmeter.save.saveservice.base_prefix JMeter property), then the
> path is assumed to be relative to the JMX file location.
>
 However, when I tried to put "~/" before


   - my include script, or
   - my CSV data file


Both cases would fail, with the latter giving the error messages of:

java.lang.IllegalArgumentException: Could not read file header line
for file ~/Data/xxx.csvat
org.apache.jmeter.services.FileServer.reserveFile(FileServer.java:283)
~[ApacheJMeter_core.jar:5.5]at
org.apache.jmeter.config.CSVDataSet.initVars(CSVDataSet.java:216)
~[ApacheJMeter_components.jar:5.5]at
org.apache.jmeter.config.CSVDataSet.iterationStart(CSVDataSet.java:171)
~[ApacheJMeter_components.jar:5.5]at
org.apache.jmeter.control.GenericController.fireIterationStart(GenericController.java:399)
~[ApacheJMeter_core.jar:5.5]


I'd really love to have "~/" to cover the above two cases as well.

Would that make sense? thx.


Can UDV be thread specific

2022-09-06 Thread Tong Sun
Hi,

I put 2 UDVs *inside *2 threads, but when I execute, I found my 1st thread
is taking the 2nd UDV's value.

Can UDV be thread specific, or is it always global?


JMeter If Controller, "Not" operator

2022-09-05 Thread Tong Sun
Hi,

Does the JMeter If Controller has a "Not" operator?

https://jmeter.apache.org/usermanual/component_reference.html#If_Controller

I.e. can I use

!${JMeterThread.last_sample_ok}

?


include controller: name by variable possible?

2022-09-05 Thread Tong Sun
Hi,

Is it possible to use variables as the choice of include controller?
I.e., what jmeter script to include is based on the content of the variable.

Seems not possible, right?


Re: How to use __evalVar

2022-09-05 Thread Tong Sun
Ban on!!!

Thanks a lot Felix for your clear explanation! Solved all my confusions.

Thanks!

On Mon, Sep 5, 2022 at 6:27 AM Felix Schumacher <
felix.schumac...@internetallee.de> wrote:

> Another important difference here (assuming this is groovy code in a
> jsr223 script), you are assigning Groovy variables, but __evalVar works on
> JMeter variables.
>
> To set a JMeter variable from within Groovy code, use vars.put("name",
> value).
>
> And to reiterate: Don't confuse ${...} from JMeter with the one from
> Groovy. JMeter will try to replace the ${...} stuff on first run (as Dmitri
> wrote).
>
> JMeter has a fallback mechanism, if it doesn't find a variable in its own
> namespace, that the expression will be used unchanged. In the case of a
> more complex expression, the result depends on the function.
>
> In your case:
>
> * ${query} (with no JMeter variable named "query") will result in
> ${query}, which is then interpreted by Groovy and accesses the Groovy
> variable "query".
>
> * The complex expression ${__evalVar(query)} will result in an empty
> string (as can be tested in the function helper dialog). (Groovy sees
> log.info('=='))
>
> Felix
> Am 05.09.22 um 09:05 schrieb Dmitri T:
>
> 1. You don't need to use __evalVar() function in Groovy, in general
>inlining JMeter Functions and Variables into scripts is not the best
>idea as only first occurrence will be cached
>
> <https://jmeter.apache.org/usermanual/component_reference.html#JSR223_Sampler>
> <https://jmeter.apache.org/usermanual/component_reference.html#JSR223_Sampler>
>so you will have the same query for all iterations even if the
>values will be changing.
> 2. If you want to utilize Groovy's string interpolation
><https://groovy-lang.org/syntax.html#_string_interpolation>
> <https://groovy-lang.org/syntax.html#_string_interpolation> feature
>you need to use double quotation marks
><https://groovy-lang.org/syntax.html#_double_quoted_string>
> <https://groovy-lang.org/syntax.html#_double_quoted_string> like
>"select ${column} from ${table}"
> 3. "column" and "table" variables need to be defined *before* declaring
>the "query" variable
>
>
> Suggested code change:
>
>
> column="name"
> table="customers"
> query="select ${column}from ${table}"
> log.info("${query}")
>
>
> More information on Groovy scripting in JMeter - Apache Groovy: What Is
> Groovy Used For? <https://www.blazemeter.com/blog/apache-groovy>
> <https://www.blazemeter.com/blog/apache-groovy>
>
>
> On 9/4/2022 10:31 PM, Tong Sun wrote:
>
> Hi,
>
> Fromhttps://jmeter.apache.org/usermanual/functions.html#__evalVar
>
> __evalVar
>
> The evalVar function returns the result of evaluating an expression stored
> in a variable.
>
> This allows one to read a string from a file, and process any variable
> references in it. For example, if the variable "query" contains "select
> ${column} from ${table}" and "column" and "table" contain "name" and "
> customers", then ${__evalVar(query)} will evaluate as "select name from
> customers".
>
> However, I tried it (in JM5.5), but wasn't able to make it work:
>
> query = '''select ${column} from ${table}'''
> column = "name"
> table = "customers"
>
> log.info("${query}")
> log.info('=${__evalVar(query)}=')
>
>
> but the output I got is:
>
> select ${column} from ${table}==
> How to make it work please?
>
>


How to use __evalVar

2022-09-04 Thread Tong Sun
Hi,

>From https://jmeter.apache.org/usermanual/functions.html#__evalVar

__evalVar
>
> The evalVar function returns the result of evaluating an expression stored
> in a variable.
>
> This allows one to read a string from a file, and process any variable
> references in it. For example, if the variable "query" contains "select
> ${column} from ${table}" and "column" and "table" contain "name" and "
> customers", then ${__evalVar(query)} will evaluate as "select name from
> customers".
>

However, I tried it (in JM5.5), but wasn't able to make it work:

query = '''select ${column} from ${table}'''
column = "name"
table = "customers"

log.info("${query}")
log.info('=${__evalVar(query)}=')


but the output I got is:

select ${column} from ${table}==
How to make it work please?


Re: Jmeter version 5.5 - OS Process Sampler - Linux Redirection

2022-08-21 Thread Tong Sun
 The redirection ">" sign is a shell feature.

So wrap the whole thing in as a shell command, like:

bash -c 'printf text3 > filename4'


On Sun, Aug 21, 2022 at 4:09 AM Shay Ginsbourg  wrote:

> Hi,
>
> Using the OS Process Sampler on Linux, the redirection ">" sign keeps
> failing.
>
> For example:
>
> Command:printf text3 > filename4
>
> Is there any workaround for this redirection ?
>
> Thanks,
> Shay
>


Re: Any ways to change the request response time?

2022-08-12 Thread Tong Sun
Thanks,

Any ways to update the percentiles as well, those of 50;90;etc that
InfluxDb Backend influxdbMetricsSender uses and sends to the server please?


On Fri, Aug 5, 2022 at 10:21 AM Dmitri T  wrote:

>   * Add JSR223 PostProcessor
> <
> https://jmeter.apache.org/usermanual/component_reference.html#JSR223_PostProcessor
> >
> as a child of the request which response time you want to modify
>
>   * Put the following code into "Script" area:
>
>
> org.apache.commons.lang3.reflect.FieldUtils.writeField(prev,'elapsedTime',5L,true)
>
>   * Replace *42* with the desired response time value
>
>   * 
>
>   * Profit?
>
> In the above example *prev *stands for the *prev*ious SampleResult
> <
> https://jmeter.apache.org/api/org/apache/jmeter/samplers/SampleResult.html>,
>
> see Top 8 JMeter Java Classes You Should Be Using with Groovy
> <https://www.blazemeter.com/blog/jmeter-java-classes> article for more
> information on this and other JMeter API shorthands available for the
> JSR223 Test Elements
>
>
> On 8/5/2022 3:35 PM, Tong Sun wrote:
> > Hi,
> >
> > Is it possible to change the request response time (via jsr223)?
> >
> > I need to fetch one important number, and instead of trying to create a
> way
> > to report it somehow, I'm thinking the easiest way to report and track it
> > is to set the fetched number as the request's response time.
> >
> > thanks
> >


Re: Any ways to change the request response time?

2022-08-05 Thread Tong Sun
On Fri, Aug 5, 2022 at 10:21 AM Dmitri T wrote:

>   * Add JSR223 PostProcessor
> <
> https://jmeter.apache.org/usermanual/component_reference.html#JSR223_PostProcessor
> >
> as a child of the request which response time you want to modify
>
>   * Put the following code into "Script" area:
>
>
> org.apache.commons.lang3.reflect.FieldUtils.writeField(prev,'elapsedTime',5L,true)
>
>   * Replace *42* with the desired response time value
>

Thanks Dmitri.

By  *42* you meant the "5L" in above jsr223 code, or there is another line?

Thanks


>   * 
>
>   * Profit?
>
> In the above example *prev *stands for the *prev*ious SampleResult
> <
> https://jmeter.apache.org/api/org/apache/jmeter/samplers/SampleResult.html>,
>
> see Top 8 JMeter Java Classes You Should Be Using with Groovy
> <https://www.blazemeter.com/blog/jmeter-java-classes> article for more
> information on this and other JMeter API shorthands available for the
> JSR223 Test Elements
>
>
> On 8/5/2022 3:35 PM, Tong Sun wrote:
> > Hi,
> >
> > Is it possible to change the request response time (via jsr223)?
> >
> > I need to fetch one important number, and instead of trying to create a
> way
> > to report it somehow, I'm thinking the easiest way to report and track it
> > is to set the fetched number as the request's response time.
> >
> > thanks
> >


Any ways to change the request response time?

2022-08-05 Thread Tong Sun
Hi,

Is it possible to change the request response time (via jsr223)?

I need to fetch one important number, and instead of trying to create a way
to report it somehow, I'm thinking the easiest way to report and track it
is to set the fetched number as the request's response time.

thanks


Re: jMeter script does not respond

2022-07-28 Thread Tong Sun
Hi Dmitri,

By "adding to the HTTP sampler label", do you mean its "Name"?

[image: image.png]

Else, how to add to the HTTP sampler label?

Thanks



On Thu, Jul 28, 2022 at 11:13 AM Dmitri T  wrote:

>  1. Which thread - add *${__threadNum}*
> 
> function to the HTTP sampler label
>  2. Which iteration - add *${__groovy(vars.getIteration(),)}*
> *<
> https://www.blazemeter.com/blog/apache-groovy>
> *function to the HTTP sampler label
>  3. Which sampler - add a JSR223 PreProcessor
> <
> https://jmeter.apache.org/usermanual/component_reference.html#JSR223_PreProcessor
> >
> and use the following code in the script area: *println('Starting
> sampler: ' + sampler.getName())*
>
>
> On 7/28/2022 4:13 PM, Ashuthosh Bhat wrote:
> > Dear Group,
> >
> > How to know which thread is executing which iteration and at which http
> > sampler? I am running the script from command prompt and not GUI.
> >
> > Thanks,
> > Ashu
> >


how to change the user defined variable?

2022-07-24 Thread Tong Sun
Hi,

How do you change the user defined variable?

The same question has been asked before, like under
https://guide.blazemeter.com/hc/en-us/articles/207421395-Using-User-Defined-Variables,
but I found no good answers.

Unlike placing them under Thread Group or Sampler, I need to

- define UDV under the Test Plan, and use those UDVs to
parameterize/control my Thread Group.
- and change them after UDV definition but before applying to the Thread
Groups

For e.g., pseudo code:

if isSpecifyingThreadLifetime then LoopCount = 100

How can I do that? Thx!


jmeter influxdb backend listener and querying

2022-07-19 Thread Tong Sun
So I added the standard jmeter influxdb backend listener, with default
setting of

percentiles: '90;95;99'

and I can query the influxdb backend DB using:

SELECT mean("pct90.0") FROM "$measurement_name"

The question is, how to query its *mean *values?
I tried the following but failed:

SELECT mean("pct50.0") FROM "$measurement_name"


Re: Is this a bug? Cookies are in the Request Body...

2022-07-16 Thread Tong Sun
I'm so curious that I gave it a try myself, but I don't see the reported
problem. Everything looks fine to me.

One thing though, I put the Cookie Manager within Thread Group, not outside
of it and under the Test Plan.

If trying that still won't work for you, I'm afraid that you need to post
your simple .jmx file somewhere,
and tell us which JMeter version that you're using.


On Sat, Jul 16, 2022 at 9:57 AM Robin D. Wilson  wrote:

> I see the same thing I saw on my test. When I tried your simplified test
> with 2 requests to "https://www.google.com;... Here's my setup:
>
> Test Plan
> Cookie Manager
> Thread Group
> HTTP Request (https://www.google.com)
> HTTP Request (https://www.google.com)
> View Results Tree
>
> The 2nd request's "Request Headers" look like this (no "Cookie:" header):
> Connection: keep-alive
> Host: www.google.com
> User-Agent: Apache-HttpClient/4.5.13 (Java/1.8.0_333)
>
> But the second request's "Request Body" looks like this:
>
> GET https://www.google.com/
>
> GET data:
>
> Cookie Data:
> 1P_JAR=2022-07-16-13; AEC=
>
>
> It is the "Cookie Data:" in the request body that is confusing me (and the
> corresponding lack of a "Cookie:" request header). I was under the
> impression that there needed to be a 'cookie:' header for the server to see
> the cookie... If I switch the View Results Tree to show the HTTP view of
> the request instead of the "Raw" view - it does show the cookie as a
> request header. So is this just a goofy way the View Results Tree shows the
> output, or is this a bug?
>
> --
> Robin D. Wilson
> CELL: 512-426-3929
> rwils...@gmail.com
>
>
> On Sat, Jul 16, 2022 at 5:57 AM Felix Schumacher <
> felix.schumac...@internetallee.de> wrote:
>
> > Without seeing your test, it is a bit difficult to answer without
> guessing.
> >
> > Guessing, I would say, the cookie has a secure flag set and you are using
> > http (which is not considered secure).
> >
> > Try a simple test case for yourself, add a cookie manager, a view results
> > tree and two samplers to www.google.com (get, no parameters needed). Run
> > it. You should see the cookie data in the request tab of the second
> sampler.
> >
> > Felix
> > Am 15.07.22 um 01:08 schrieb Robin D. Wilson:
> >
> > I have set up a Cookie Manager config element in my Test Plan.
> >
> > I am not seeing the 'cookie:' header value in my request. I'm using a
> 'View
> > Results Tree' to view the request/response for a simple HTTP request
> series
> > that has a cookie being set. If I look at the 'Raw' Text request data, I
> > see no 'Cookie:' header in the Request Headers, but I see a "Cookie
> Data:"
> > section in the "Request Body" section. I was under the impression that
> > Cookie was a 'header' in the HTTP request.
> >
> > I've only seen cookies set with the "Cookie:" header, so I'm not sure
> what
> > I'm misunderstanding here...
> >
> > --
> > Robin D. Wilson
> > CELL: 512-426-3929rwils...@gmail.com
> >
> >
>


Re: JMeter metrics lost in InfluxDB

2022-07-16 Thread Tong Sun
On Sat, Jul 16, 2022 at 7:20 AM Felix Schumacher wrote:

> Am 16.07.22 um 00:43 schrieb Tong Sun:
>
> Hi,
>
> I'm sending my JMeter test results to InfluxDB, which is in a container in
> an Azure VM (in the cloud).
>
> During the test I observed only 5 connection timeouts in the JMeter log to
> InfluxDB.
> However, from the Grafana dashboard, there are lots and lots of metrics
> losts.
>
> Has anyone noticed the same problem before?
>
> - It is an extreme light load I'd say, only 10 concurrent users, doing
> things at a slow pace.
> - I checked the Azure VM. It has extreme light load during my test as well.
>
> So to me, so many metrics losts is kind of unacceptable.
> Any fix please?
>
> Hi,
>
> I am a bit lost, where you are seeing the missing metrics. Is it in the
> first picture in throughput and response times? What do you expect to see
> there?
>
> The pattern in throughput and response time looks like either the
> receiving side misses to store values. (The load pattern in response time
> looks to me, as it could be connected by straight lines that match the
> surrounding lines)
>

Yep, that's exactly what I meant, the lines should be connected by straight
lines, the breaking-up parts mean missing store values.

If that is the error you are looking for. Have you looked at the GC values
> of the receiving server? Are there any longer gaps? The gaps seem to long
> for GC, though. Where they observable on your local setup?
>
> Have you tried to do a simpler load test (no service involved, local
> samplers like JSR223 or test sampler, only).
>
> Are your JVMs setup correctly? (You might want to look at the Java Flight
> Recorder and Mission Control for insights into them)
>

OK. I do see other of my simple tests having continuous connected straight
lines (which should rule out JVMs setup problem I suppose).
And I'll look into the other methods you mentioned, like looking at the GC
values on the receiving server. TBH, these are all new to me,
if there are any reading materials / links that I can refer to, that'll be
appreciated.


BTW,

I'm not using
https://github.com/mderevyankoaqa/jmeter-influxdb2-listener-plugin#compatibility
which supports InfluxDB v2.x only (mine is 1.8, and it is not supported)

The one that I'm using is
org.apache.jmeter.visualizers.backend.influxdb.HttpMetricsSender,

Maybe it too, after five errors the import will be stopped.
If it does, there should be a log somewhere, I'll check carefully for it
next.

Felix
>
Thanks


Re: InfluxDB in docker container and its access URL

2022-07-15 Thread Tong Sun
On Fri, Jul 15, 2022 at 10:22 AM Tong Sun  wrote:

>
>> . . . I had problems trying to connect from jmeter to InfluxDB using
>> https://github.com/testsmith-io/jmeter-influxdb-grafana-docker as-is.
>>
>>
> Wait, here
>
> https://github.com/testsmith-io/jmeter-influxdb-grafana-docker/blob/357192db5b66cc7dbe73d361a68cc54f032c3840/docker-compose.yml#L6
> The influxdb's 8086 port has already been mapped to localhost:8086.
>
> So the problem might be elsewhere...
>

 I tried again today and *it is working now*.
I didn't do anything. strange.


Re: InfluxDB in docker container and its access URL

2022-07-15 Thread Tong Sun
On Fri, Jul 15, 2022 at 9:54 AM Tong Sun  wrote:

> Hi Dmitri,
>
> Found your answer at
>
> https://stackoverflow.com/questions/72012407/cannot-see-jmeter-measurement-filter-in-influxdb
>
> which states:
>
> If you're running docker container*s* then I strongly doubt your InfluxDB
>> URL of http://localhost:8086 is correct, you will have to use the
>> container with InfluxDB IP address both in JMeter and in Grafana.
>
>
> That may be the reason why I'm getting failed to send data to influxDB
> server in my jmeter's log. details at
> https://github.com/testsmith-io/jmeter-influxdb-grafana-docker/issues/1
>
> in which I had problems trying to connect from jmeter to InfluxDB using
> https://github.com/testsmith-io/jmeter-influxdb-grafana-docker as-is.
>
>
Wait, here
https://github.com/testsmith-io/jmeter-influxdb-grafana-docker/blob/357192db5b66cc7dbe73d361a68cc54f032c3840/docker-compose.yml#L6
The influxdb's 8086 port has already been mapped to localhost:8086.

So the problem might be elsewhere...


> The author is not responding, would you take a look at what went wrong
> please?
>
> Thanks!
>
>


InfluxDB in docker container and its access URL

2022-07-15 Thread Tong Sun
Hi Dmitri,

Found your answer at
https://stackoverflow.com/questions/72012407/cannot-see-jmeter-measurement-filter-in-influxdb

which states:

If you're running docker container*s* then I strongly doubt your InfluxDB
> URL of http://localhost:8086 is correct, you will have to use the
> container with InfluxDB IP address both in JMeter and in Grafana.


That may be the reason why I'm getting failed to send data to influxDB
server in my jmeter's log. details at
https://github.com/testsmith-io/jmeter-influxdb-grafana-docker/issues/1

in which I had problems trying to connect from jmeter to InfluxDB using
https://github.com/testsmith-io/jmeter-influxdb-grafana-docker as-is.

The author is not responding, would you take a look at what went wrong
please?

Thanks!


Re: Repeatedly trying to load included modules

2022-07-13 Thread Tong Sun
On Wed, Jul 13, 2022 at 10:31 AM Felix Schumacher wrote:

> I think it is a TODO from the past. See
> https://github.com/apache/jmeter/blob/master/src/components/src/main/java/org/apache/jmeter/control/IncludeController.java#L61
>
> You probably have five threads and each has its own copy of the
> IncludeController. Is that the case?
>
Hmm... No, it's in single thread, with a single user. Here is the log
(shown in https://www.diffchecker.com/7mROaakN):

ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=5
delayedStart=false

However, the ramp-up=5 sec

I thought it was irrelevant so didn't include the "ramp-up=5 sec" in OP.

I've posted the controlling script at
https://pastebin.com/gdM2aCtr
for you to check.

thanks

Is the loading of the included elements observably slower than in-lining
> them?
>
For a single thread, with a single user case, the timing is not my focus at
the moment.

> Felix
> Am 11.07.22 um 22:56 schrieb Tong Sun:
>
> Hi,
>
> Please take a look at my logs:https://www.diffchecker.com/7mROaakN
>
> Same script, one is all-in-one, the other (on the right) uses the include
> controller, which apparently repeatedly trying to load included modules, as
> the following two lines have been repeated 5 times:
>
> INFO o.a.j.c.IncludeController: loadIncludedElements -- try to load
> included module: F_Thread_Group.jmx
> INFO o.a.j.s.SaveService: Loading file: F_Thread_Group.jmx
> INFO o.a.j.c.IncludeController: loadIncludedElements -- try to load
> included module: F_google-reqs.jmx
> INFO o.a.j.s.SaveService: Loading file: F_google-reqs.jmx
>
> As the ThreadGroup is started with number=1 threads=1
>
> I'm wondering
>
> - why the repeatedly load attempts, and
> - if this is a known issue
>
> or something wrong with my script, in which case I'd be happy to publish
> them somewhere.
>
> thanks
>
>
>


Repeatedly trying to load included modules

2022-07-11 Thread Tong Sun
Hi,

Please take a look at my logs:
https://www.diffchecker.com/7mROaakN

Same script, one is all-in-one, the other (on the right) uses the include
controller, which apparently repeatedly trying to load included modules, as
the following two lines have been repeated 5 times:

INFO o.a.j.c.IncludeController: loadIncludedElements -- try to load
included module: F_Thread_Group.jmx
INFO o.a.j.s.SaveService: Loading file: F_Thread_Group.jmx
INFO o.a.j.c.IncludeController: loadIncludedElements -- try to load
included module: F_google-reqs.jmx
INFO o.a.j.s.SaveService: Loading file: F_google-reqs.jmx

As the ThreadGroup is started with number=1 threads=1

I'm wondering

- why the repeatedly load attempts, and
- if this is a known issue

or something wrong with my script, in which case I'd be happy to publish
them somewhere.

thanks


How to save test fragment properly

2022-07-07 Thread Tong Sun
Hi,

On Sun, Apr 11, 2021 at 4:27 PM Tong Sun wrote:

> On Tue, Nov 24, 2020 at 5:03 PM Tong Sun wrote:
> >
> > This is my first post here, and I don't know the policy on attaching
> > files. So I put my file at
> >
> > https://dpaste.com/F3K6Y7ZV2
> >
> > It's a valid jmx file (search.jmx), which can be included from e.g.,
> >
> > https://dpaste.com/DB5TEMNSW
> >
> > Everything is OK, except that when open the search.jmx file and save
> > again in JMeter, I'll get an almost-empty file instead, like
> >
> > http://dpaste.com/ESVT2FWLG
> >
> > This has been the case for old and current version of JMeter, like
> > 5.2.1 and 5.3.
>
> Revisiting this old thread, as the problem still exists for 5.4 and
> the latest snapshot build.
>
> > Please verify.
>
> Is there any way to fix it please?
>
> > Thanks
>

Revisiting this old thread yet again for jmeter v5.5.

Please check out the test-fragment.jmx file at:

https://pastebin.com/iTzRamb4

Here is the steps how I save it:

- select all steps under the test fragment
- right click and select "save as test fragment"

What you get should be the same as mine, if you're using jmeter v5.5.

However, the problem is, when I open and save it again in JMeter, I'll get
an almost-empty file instead.

Any help please?


JMeter Modularisation Strategy

2022-07-06 Thread Tong Sun
Hi,

How do you modularize your JMeter?

I'm thinking that the Include Controller is better than the Module
Controller.

However, for using the Include Controller, it bears the problem of how do
you include other files?

I'm thinking that relative paths are better than absolute paths, as it'll
be more portable.
Also, the Include Controller "*does not support variables/functions in the
filename* field". So it seems that if using the Include Controller
then the relative
paths is the *only *option.

However, that poses another problem that,

jmeter -t path/to/myscript.jmx

will fail.

So, what's the best JMeter Modularisation Strategy?


Labeling with sample_variables

2022-07-06 Thread Tong Sun
Hi,

In https://github.com/johrstrom/jmeter-prometheus-plugin/issues/3, it says


Jmeter allows for sample_variables to be populated and used in the
> SimpleWriter listener class. We should also use this feature for labeling.


This sounds like a very useful feature, but I cannot grasp how to make use
of it.

Can someone elaborate with a sample use-case example please.

Thanks


Include controller overheads

2022-07-04 Thread Tong Sun
Hi,

I'm learning to make use of the Include Controller, but found the following
from
https://martijndevrieze.net/2016/02/15/reusable-components-in-jmeter-part-2-include-controller/
the comment section.

The test scripts then use include controllers to call these small external
> .jmx files.
>


> This is where the problem starts. If we run the test with the modules
> copied into the parent test script (so it’s one big .jmx) we can easily get
> to 100-450 users on our single load injector with memory headroom to spare.
> When we use the multiple include controllers and the small .jmx files the
> same test with the same load injector gets to about 50 users and runs out
> of memory on the load injector, runs very slowly and is essentially
> non-performant.


 the comment then UTSL to pinpoint where the problem is --

It appears that the issue is that each individual user/thread on each loop
> is cloning the small .jmx files so if we run 100 users with 3 loops we have
> 300 instances of each module loaded up which I think is causing this memory
> problem. I can’t find much discussion of this online. Is this something you
> have come across?


The comment was posted in 2016, I'm just wondering if the problem has been
noticed by anyone else and/or being addressed.

thanks


Re: Simulate Think Time

2022-07-01 Thread Tong Sun
Hi,

Found a problem applying simulated Think Time --


   - I don't want the simulated Think Time be calculated/included in my
   response time
   - So I put it after my request, not under it
   - However, I put only one such Think Time but *every *single request is
   now delayed, because it is actually *at the thread group level*.
   - That in turn caused a bigger problem for me, as I only want Think Time
   delay *after *each of my *transactions*, but not the requests
*within  *those
   transactions.
   - I.e., if a single click of "submit" contains several requests, I want
   those requests executed without any delay, but only do Think Time after
   all those requests are done.

How to achieve all of the above please?


On Sun, Jun 5, 2022 at 12:15 PM Deepak Goel wrote:

> *Uniform Random Timer*
>
> Deepak...
>
> On Sun, Jun 5, 2022 at 8:25 PM Tong Sun wrote:
>
> > What's the best way to simulate Think Time?
> >
> > Say I need a random wait time between 2~8 seconds between each of my
> > transactions, what's the best control to do that?
> >
> > Thanks!
> >
>


JMeter standalone comments

2022-06-25 Thread Tong Sun
Hi,

I know each item (control, request, etc) has a comment field. I view it as
putting comments to the end of line in the source code.

Is there any way to add a standalone comment, by (ab)using some
*simplest *control?
Kind of like putting comments on the line of its own in the source code.

Similar request has been made at
https://stackoverflow.com/questions/30918090/how-to-add-a-jmeter-comment-block-or-element

thx


JMeter Best Practices - Sharing variables between threads and thread groups

2022-06-14 Thread Tong Sun
Hi,

In the JMeter Best Practices:
https://jmeter.apache.org/usermanual/best-practices.html

It says

To "Share variables between threads and thread groups",

there are various options:

   - Store the variable as a property - properties are global to the JMeter
   instance
   - Write variables to a file and re-read them.
   - Use the bsh.shared namespace - see above
   
   - Write your own Java classes


Using the bsh.shared namespace seems to be an appealing option, However,
the BeanShell scripting is *deprecated*, so here is my question:

Would the following still be the recommended best practices?

The sample .bshrc files contain sample definitions of getprop() and
setprop() methods.

Another possible method of sharing variables is to use the "bsh.shared"
shared namespace. For example:

if (bsh.shared.myObj == void){

// not yet defined, so create it:

myObj = new AnyObject();

}

bsh.shared.myObj.process();

Rather than creating the object in the test element, it can be created in
the startup file defined by the JMeter property "beanshell.init.file". This
is only processed once.


If not, is there any groovy based mechanism that provides the same
functionalities?

Thanks


Re: Help: Unable to connect to MS SQL server DB

2022-06-13 Thread Tong Sun
Yeah, that proves my doubt that, are you sure using such trustServerCertificate
method works for JMeter at all?

So, my advice,

- Try connect to your azure Database with MS SQL server client itself using
the SQL authentication (user/password) first
- If it works, replace your jdbc sqlserver connection string with the SQL
authentication (user/password) and try again


On Mon, Jun 13, 2022 at 10:49 AM Jun Zhuang  wrote:

>
> Hi thanks for the quick response. That did not do anything - as a matter
> of fact, I got the same error even if I provide an invalid trustStore path.
> which makes me wonder if the solution provided by MS is valid in this case
> or where exactly is JM looking for the cacerts file?
> On Monday, June 13, 2022, 10:32:37 AM EDT, Tong Sun 
> wrote:
>
>
> Hi, just shooting in the dark, have you tried to replace the backslash "\"
> with forward-slash "/" for your "C:\..." path?
>
> On Mon, Jun 13, 2022 at 10:20 AM Jun Zhuang <
> thornbird...@yahoo.com.invalid>
> wrote:
>
> > Hi my fellow JMeter users,
> > I am having trouble connecting to MS SQL server DB, I wonder if I can get
> > some pointers?
> > JDBC Driver class: com/Microsoft.sqlserverjdbc.SQLServerDriver.Driver was
> > downloaded from Microsoft site and the jar file copied to JMeter’slib
> dir.
> > 1. Initial Error when using Database URL:
> > jdbc:sqlserver://${DatabaseServer};databaseName=${DatabaseName};
> > java.sql.SQLException: Cannot createPoolableConnectionFactory (The driver
> > could not establish a secure connectionto SQL Server by using Secure
> > Sockets Layer (SSL) encryption. Error:
> > "sun.security.validator.ValidatorException: PKIXpath building
> > failed:sun.security.provider.certpath.SunCertPathBuilderException: unable
> > to findvalid certification path to requested
> > target".ClientConnectionId:f5802381-3429-45d2-830d-8b64a44c1f44)
> > 2. Database URL based on a MS article (
> >
> https://techcommunity.microsoft.com/t5/azure-database-support-blog/pkix-path-building-failed-unable-to-find-valid-certification/ba-p/2591304):
> jdbc:sqlserver://${DatabaseServer};databaseName=${DatabaseName};trustServerCertificate=false;trustStore="C:\Program
> > Files
> >
> (x86)\Java\jre1.8.0_333\lib\security\cacerts";trustStorePassword=changeit;
> > java.sql.SQLException: Cannot createPoolableConnectionFactory (The driver
> > could not establish a secure connectionto SQL Server by using Secure
> > Sockets Layer (SSL) encryption. Error: "java.lang.RuntimeException:
> > Unexpected error: java.security.InvalidAlgorithmParameterException:the
> > trustAnchors parameter must be
> > non-empty".ClientConnectionId:147ec91d-1b27-4073-9306-61c2fe934840)
> > I made sure the trustStore path in the URL was correct and cacerts was
> > valid.
> > In both cases, I provided the username and password for the JDBC
> > Connection Configuration.
> > I have tried many things I found on the Internet regarding the error in
> > the 2nd scenario but none worked.
> > Appreciate any input.
> > Jun
>


Re: Help: Unable to connect to MS SQL server DB

2022-06-13 Thread Tong Sun
Hi, just shooting in the dark, have you tried to replace the backslash "\"
with forward-slash "/" for your "C:\..." path?

On Mon, Jun 13, 2022 at 10:20 AM Jun Zhuang 
wrote:

> Hi my fellow JMeter users,
> I am having trouble connecting to MS SQL server DB, I wonder if I can get
> some pointers?
> JDBC Driver class: com/Microsoft.sqlserverjdbc.SQLServerDriver.Driver was
> downloaded from Microsoft site and the jar file copied to JMeter’slib dir.
> 1. Initial Error when using Database URL:
> jdbc:sqlserver://${DatabaseServer};databaseName=${DatabaseName};
> java.sql.SQLException: Cannot createPoolableConnectionFactory (The driver
> could not establish a secure connectionto SQL Server by using Secure
> Sockets Layer (SSL) encryption. Error:
> "sun.security.validator.ValidatorException: PKIXpath building
> failed:sun.security.provider.certpath.SunCertPathBuilderException: unable
> to findvalid certification path to requested
> target".ClientConnectionId:f5802381-3429-45d2-830d-8b64a44c1f44)
> 2. Database URL based on a MS article (
> https://techcommunity.microsoft.com/t5/azure-database-support-blog/pkix-path-building-failed-unable-to-find-valid-certification/ba-p/2591304):
>  
> jdbc:sqlserver://${DatabaseServer};databaseName=${DatabaseName};trustServerCertificate=false;trustStore="C:\Program
> Files
> (x86)\Java\jre1.8.0_333\lib\security\cacerts";trustStorePassword=changeit;
> java.sql.SQLException: Cannot createPoolableConnectionFactory (The driver
> could not establish a secure connectionto SQL Server by using Secure
> Sockets Layer (SSL) encryption. Error: "java.lang.RuntimeException:
> Unexpected error: java.security.InvalidAlgorithmParameterException:the
> trustAnchors parameter must be
> non-empty".ClientConnectionId:147ec91d-1b27-4073-9306-61c2fe934840)
> I made sure the trustStore path in the URL was correct and cacerts was
> valid.
> In both cases, I provided the username and password for the JDBC
> Connection Configuration.
> I have tried many things I found on the Internet regarding the error in
> the 2nd scenario but none worked.
> Appreciate any input.
> Jun


View Results Tree Behavior when running from command line

2022-06-10 Thread Tong Sun
Hi,

Quick question, what would the View Results Tree behavior be when running
from command line?

I had an impression that it won't do anything even if it is enabled, is it
so?

thx!


Easy way to save the req/resp session

2022-06-07 Thread Tong Sun
Hi,

Say I run my JMeter script using a single user for a single time, is there
any easy way to save the whole session, both the requests and responses,
including the headers, to some file for later inspection?


Re: Simulate Think Time

2022-06-06 Thread Tong Sun
OMG, JMeter has this thought of and provided long ago but I just never knew
before.

Thanks a lot Malachi !!!


On Mon, Jun 6, 2022 at 6:17 PM Malachi Mcintosh
 wrote:

> In the GUI command panel along the top, it is the green start button with
> the small crossed out clock, next to the Stop button.
>
> https://jmeter.apache.org/usermanual/get-started.html#test_plan_building
> I also found this link with some screenshots
> https://www.ubik-ingenierie.com/blog/jmeter-new-gui-features-to-increase-your-productivity/
>
>
> Malachi Mcintosh
> Consultant - Performance
> +64 4 815 8140
> www.planittesting.com<http://www.planittesting.com/>
>
> [
> https://cdn.planittesting.com/planit/media/logos/planit/planit_nri_v_black.png
> ]
> Gartner Peer Insights ★ 4.7
>
> Hear from over 60 of our clients and discover why they choose Planit to
> assure quality for their critical projects. See the reviews<
> https://www.gartner.com/reviews/market/application-testing-services-worldwide/vendor/planit?months=12
> >
>
> 
> From: Tong Sun 
> Sent: Tuesday, June 7, 2022 10:06 AM
> To: JMeter Users List 
> Subject: Re: Simulate Think Time
>
> thanks!
>
> For the *"run without pause in the GUI", *where can I find more information
> on how to do it?
>
> On Mon, Jun 6, 2022 at 6:02 PM Malachi Mcintosh
>  wrote:
>
> > Hi
> >
> > I usually input variables as the think time value and then can define
> them
> > in a User Defined Variables element. Then I'll have a copy that element
> and
> > assign debug values of say 1ms so that that script executes quickly.
> > Alternatively, you can run without pause in the GUI if there are no other
> > timers you care about.
> >
> > Thanks,
> > Malachi
> >
> > Malachi Mcintosh
> > Consultant - Performance
> > +64 4 815 8140
> > www.planittesting.com<http://www.planittesting.com/><
> http://www.planittesting.com<http://www.planittesting.com/>>
> >
> > [
> >
> https://cdn.planittesting.com/planit/media/logos/planit/planit_nri_v_black.png
> > ]
> > Gartner Peer Insights ★ 4.7
> >
> > Hear from over 60 of our clients and discover why they choose Planit to
> > assure quality for their critical projects. See the reviews<
> >
> https://www.gartner.com/reviews/market/application-testing-services-worldwide/vendor/planit?months=12
> > >
> >
> > 
> > From: Tong Sun 
> > Sent: Tuesday, June 7, 2022 9:57 AM
> > To: JMeter Users List 
> > Subject: Re: Simulate Think Time
> >
> > Thanks!
> >
> > What would be the best way to turn those Think Time steps on or off
> > *together*?
> >
> > Basically I don't want Think Time at design/debug time but only during
> > official run. However, it'll be a pain to *turn them on or off* one by
> one
> > as this has to be done so constantly and I have many such request steps.
> >
> > On Sun, Jun 5, 2022 at 12:15 PM Deepak Goel  wrote:
> >
> > > *Uniform Random Timer*
> > >
> > >
> > > Deepak
> > > "The greatness of a nation can be judged by the way its animals are
> > treated
> > > - Mahatma Gandhi"
> > >
> > > +91 73500 12833
> > > deic...@gmail.com
> > >
> > > Facebook: https://www.facebook.com/deicool
> > > LinkedIn: www.linkedin.com/in/deicool<
> http://www.linkedin.com/in/deicool<http://www.linkedin.com/in/deicool<
> http://www.linkedin.com/in/deicool>
> > >
> > >
> > > "Plant a Tree, Go Green"
> > >
> > > Make In India : http://www.makeinindia.com/home
> > >
> > >
> > > On Sun, Jun 5, 2022 at 8:25 PM Tong Sun  wrote:
> > >
> > > > What's the best way to simulate Think Time?
> > > >
> > > > Say I need a random wait time between 2~8 seconds between each of my
> > > > transactions, what's the best control to do that?
> > > >
> > > > Thanks!
> > > >
> > >
> >
>


Re: Simulate Think Time

2022-06-06 Thread Tong Sun
Thanks Dmitri.

We run load tests normally not to reproduce the issue but to simulate the
real world.

As https://www.guru99.com/timers-jmeter.html said,


*In real life visitors do not arrive at a website all at the same time, but
at different time intervals. So Timer will help mimic the real-time
behavior.*

This is a more important aspect to us, but thanks for the input/warning.

On Mon, Jun 6, 2022 at 3:54 AM Dmitri T  wrote:

> You can use i.e. Constant Timer
> <
> https://jmeter.apache.org/usermanual/component_reference.html#Constant_Timer>
>
> and __Random( )
> <https://jmeter.apache.org/usermanual/functions.html#__Random> function
> combination, if you put the following expression:
>
> *${__Random(2000,8000,)}*
>
> into Constant Timer's "Thread Delay" input field it will "think" for a
> random time between 2 and 8 seconds before each Sampler in the timer's
> scope
> <https://www.blazemeter.com/blog/jmeter-scoping-rules-the-ultimate-guide/>
>
> However I wouldn't recommend using random delays as it conflicts with
> test repeatability <https://en.wikipedia.org/wiki/Repeatability> concept
> which means that due to the random nature of think times you will not be
> able to re-run the same test to reproduce the issue as the load will
> always be different.
> **
>
>
> On 6/5/2022 6:14 PM, Deepak Goel wrote:
> > *Uniform Random Timer*
> >
> >
> > Deepak
> > "The greatness of a nation can be judged by the way its animals are
> treated
> > - Mahatma Gandhi"
> >
> > +91 73500 12833
> > deic...@gmail.com
> >
> > Facebook:https://www.facebook.com/deicool
> > LinkedIn:www.linkedin.com/in/deicool
> >
> > "Plant a Tree, Go Green"
> >
> > Make In India :http://www.makeinindia.com/home
> >
> >
> > On Sun, Jun 5, 2022 at 8:25 PM Tong Sun  wrote:
> >
> >> What's the best way to simulate Think Time?
> >>
> >> Say I need a random wait time between 2~8 seconds between each of my
> >> transactions, what's the best control to do that?
> >>
> >> Thanks!
> >>


Re: Simulate Think Time

2022-06-06 Thread Tong Sun
thanks!

For the *"run without pause in the GUI", *where can I find more information
on how to do it?

On Mon, Jun 6, 2022 at 6:02 PM Malachi Mcintosh
 wrote:

> Hi
>
> I usually input variables as the think time value and then can define them
> in a User Defined Variables element. Then I'll have a copy that element and
> assign debug values of say 1ms so that that script executes quickly.
> Alternatively, you can run without pause in the GUI if there are no other
> timers you care about.
>
> Thanks,
> Malachi
>
> Malachi Mcintosh
> Consultant - Performance
> +64 4 815 8140
> www.planittesting.com<http://www.planittesting.com/>
>
> [
> https://cdn.planittesting.com/planit/media/logos/planit/planit_nri_v_black.png
> ]
> Gartner Peer Insights ★ 4.7
>
> Hear from over 60 of our clients and discover why they choose Planit to
> assure quality for their critical projects. See the reviews<
> https://www.gartner.com/reviews/market/application-testing-services-worldwide/vendor/planit?months=12
> >
>
> 
> From: Tong Sun 
> Sent: Tuesday, June 7, 2022 9:57 AM
> To: JMeter Users List 
> Subject: Re: Simulate Think Time
>
> Thanks!
>
> What would be the best way to turn those Think Time steps on or off
> *together*?
>
> Basically I don't want Think Time at design/debug time but only during
> official run. However, it'll be a pain to *turn them on or off* one by one
> as this has to be done so constantly and I have many such request steps.
>
> On Sun, Jun 5, 2022 at 12:15 PM Deepak Goel  wrote:
>
> > *Uniform Random Timer*
> >
> >
> > Deepak
> > "The greatness of a nation can be judged by the way its animals are
> treated
> > - Mahatma Gandhi"
> >
> > +91 73500 12833
> > deic...@gmail.com
> >
> > Facebook: https://www.facebook.com/deicool
> > LinkedIn: www.linkedin.com/in/deicool<http://www.linkedin.com/in/deicool
> >
> >
> > "Plant a Tree, Go Green"
> >
> > Make In India : http://www.makeinindia.com/home
> >
> >
> > On Sun, Jun 5, 2022 at 8:25 PM Tong Sun  wrote:
> >
> > > What's the best way to simulate Think Time?
> > >
> > > Say I need a random wait time between 2~8 seconds between each of my
> > > transactions, what's the best control to do that?
> > >
> > > Thanks!
> > >
> >
>


Re: Simulate Think Time

2022-06-06 Thread Tong Sun
Thanks!

What would be the best way to turn those Think Time steps on or off
*together*?

Basically I don't want Think Time at design/debug time but only during
official run. However, it'll be a pain to *turn them on or off* one by one
as this has to be done so constantly and I have many such request steps.

On Sun, Jun 5, 2022 at 12:15 PM Deepak Goel  wrote:

> *Uniform Random Timer*
>
>
> Deepak
> "The greatness of a nation can be judged by the way its animals are treated
> - Mahatma Gandhi"
>
> +91 73500 12833
> deic...@gmail.com
>
> Facebook: https://www.facebook.com/deicool
> LinkedIn: www.linkedin.com/in/deicool
>
> "Plant a Tree, Go Green"
>
> Make In India : http://www.makeinindia.com/home
>
>
> On Sun, Jun 5, 2022 at 8:25 PM Tong Sun  wrote:
>
> > What's the best way to simulate Think Time?
> >
> > Say I need a random wait time between 2~8 seconds between each of my
> > transactions, what's the best control to do that?
> >
> > Thanks!
> >
>


Simulate Think Time

2022-06-05 Thread Tong Sun
What's the best way to simulate Think Time?

Say I need a random wait time between 2~8 seconds between each of my
transactions, what's the best control to do that?

Thanks!


Re: JMeter 5.4.3 unable to open jmx created in 5.2.1

2022-04-25 Thread Tong Sun
Interesting. How come it could happen?

I mean, when a script I'm opening is using a plug-in that wasn't yet
installed, JMeter would ask me whether to install it, then install all
the missing components for me. It is not like that for you Steve?

On Mon, Apr 25, 2022 at 8:15 AM Steve Kram  wrote:

> Stuart,
>
> I encountered similar issues when I upgraded JMeter versions.  The
> application started successfully, but just wouldn't open certain JMX
> scripts.  Turns out the scripts were using a plug-in that wasn't yet
> installed, so the system provided similarly cryptic error messaging.
>
> Installing the missing component allowed the new version to successfully
> open the JMX.
>
> Steve Kram
>
>
> -Original Message-
> From: Stuart Kenworthy 
> Sent: Monday, April 25, 2022 8:06 AM
> To: JMeter Users List 
> Subject: RE: JMeter 5.4.3 unable to open jmx created in 5.2.1
>
> Seem to have identified the issue, but not sure why it is so. When I say a
> clean installation, I did have to add a custom jar in there for
> authentication purposes. This jar seems to be quietly causing issues with
> the JMeter installation, I have no idea why, it is an internal binary for
> creating auth tokens. I also noticed my log files did not go through so the
> full call error is:
>
> java.lang.NoSuchMethodError:
> org.apache.jmeter.save.converters.HashTreeConverter.readBareItem(Lcom/thoughtworks/xstream/io/HierarchicalStreamReader;Lcom/thoughtworks/xstream/converters/UnmarshallingContext;Ljava/lang/Object;)Ljava/lang/Object;
>
> so may be a conflict in xstream libraries but once again no real
> information being provided by JMeter and there is no reference to these
> packages in the custom jar.
>
> From: Stuart Kenworthy 
> Sent: 25 April 2022 12:36
> To: JMeter Users List 
> Subject: JMeter 5.4.3 unable to open jmx created in 5.2.1
>
> I am currently going through an upgrade of our JMeter instances from 5.2.1
> to 5.4.3.
>
> Most of our existing scripts were generated in JMeter 5.2.1, and all have
> been modified in such so they are all compliant with 5.2.1.
>
> When I try to open any of my scripts with either the default JMeter
> properties files, or our customised properties files we get an exception
> java.lang.NoSuchMethodError:
> org.apache.jmeter.save.converters.HashTreeConverter.readBareItem
>
> The full log sanitised log file has been included in the exception in a
> clean instance of jmeter 5.4.3.
>
> The script being loaded (portalLogOut.jmx) is one of our simplest. It was
> created in 5.2.1 and contains a single TestFragmentController, which
> contains a HttpTestSamplerGui, JSR223PostProcessor and Header Manager.
>
> As we are not undertaking a major release upgrade, I was expecting this to
> be a trivial move.
>
> I am struggling to find any other evidence of this occurring in the wild
> but also cannot find a recommended upgrade path from 5.2.1 to 5.4.3.
>
> I would like to avoid going through every version in between if I can.
>
> Any advice on how to resolve this issue?
>
> Thanks
>
> The information included in this email and any files transmitted with it
> may contain information that is confidential and it must not be used by, or
> its contents or attachments copied or disclosed to, persons other than the
> intended addressee. If you have received this email in error, please notify
> BJSS. In the absence of written agreement to the contrary BJSS' relevant
> standard terms of contract for any work to be undertaken will apply. Please
> carry out virus or such other checks as you consider appropriate in respect
> of this email. BJSS does not accept responsibility for any adverse effect
> upon your system or data in relation to this email or any files transmitted
> with it. BJSS Limited, a company registered in England and Wales (Company
> Number 2777575), VAT Registration Number 613295452, Registered Office
> Address, 1 Whitehall Quay, Leeds, LS1 4HR
>
> The information included in this email and any files transmitted with it
> may contain information that is confidential and it must not be used by, or
> its contents or attachments copied or disclosed to, persons other than the
> intended addressee. If you have received this email in error, please notify
> BJSS. In the absence of written agreement to the contrary BJSS' relevant
> standard terms of contract for any work to be undertaken will apply. Please
> carry out virus or such other checks as you consider appropriate in respect
> of this email. BJSS does not accept responsibility for any adverse effect
> upon your system or data in relation to this email or any files transmitted
> with it. BJSS Limited, a company registered in England and Wales (Company
> Number 2777575), VAT Registration Number 613295452, Registered Office
> Address, 1 Whitehall Quay, Leeds, LS1 4HR
>
> -
> To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
> For additional commands, e-mail: 

Why two jmeter executables for Linux?

2021-12-20 Thread Tong Sun
Hi,

Why two pairs of jmeter executables for Linux?

E.g.,

jmeter/bin/jmeter vs jmeter/bin/jmeter.sh
or jmeter/bin/mirror-server vs jmeter/bin/mirror-server.sh

I took a look at jmeter/bin/jmeter vs jmeter/bin/jmeter.sh and found
them quite similar. What's the point of proving two almost identical
scripts? thx

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



Re: Getting issue while sending the API request in 8443 port

2021-11-30 Thread Tong Sun
$ telnet elastic.moviuscorp.net 8443
Trying 169.57.62.3...
Connected to elastic.moviuscorp.net.
Escape character is '^]'.
^CConnection closed by foreign host.

Note the IP that I get is different from yours. So maybe, just maybe, your
POSTMAN is talking to an IP while your JMeter is talking to another IP?

On Tue, Nov 30, 2021 at 1:45 PM Venkatesh N
 wrote:

> Yes I am able to connect to the server using the telnet command with port
>
>
>
> ➤ telnet elastic.moviuscorp.net 8443
>
> Trying 109.07.00.0...
>
> Connected to elastic.moviuscorp.net.
>
> Escape character is '^]'.
>
> also from the POSTMAN tool I can able to execute this API requests.
>


Sharing the JDBC Connection between all the threads

2021-08-17 Thread Tong Sun
On Tue, Aug 17, 2021 at 5:06 AM Felix Schumacher <
felix.schumac...@internetallee.de> wrote:

>
> Do you want to share the connections over all the threads? (This is not
> the default in JMeter. Every thread/user has its own connection unless
> configured otherwise)
>

 Hi, Felix

Can you elaborate on how to share a single JDBC Connection between all the
threads pls?

All the threads can share a single CSV input but for them to share a single
JDBC Connection I'm yet to find how.

It'll help to send unique values in the requests from all the threads.

thanks


Re: Have JMeter Prepare SQL ONLY once and Execute Multiple times

2021-07-29 Thread Tong Sun
Hmm...

- can the Prepared the SQL statement be saved once and used later? If not,
- can the Prepared the SQL statement be saved once and used later outside
JMeter?



On Thu, Jul 29, 2021 at 11:38 AM Jeff Lutzow 
wrote:

> Cannot seem to get JMeter to NOT prepare the statement every time.
>
>
>
> I am trying to replicate an application server that might have queries
> that would be prepared one time and then run multiple times with different
> input variables.  I would think that would be something JMeter supported
> and not that hard to setup.
>
>
>
> If you have any other ideas please let me know.
>
>
>
> Thanks, Jeff
>
>
>
> *From:* A P 
> *Sent:* Wednesday, July 28, 2021 4:53 AM
> *To:* JMeter Users List 
> *Subject:* Re: Have JMeter Prepare SQL ONLY once and Execute Multiple
> times
>
>
>
> *EXTERNAL EMAIL*
>
>
>
>
> It's here:
>
>
>
>
>
> On Wed, Jul 28, 2021 at 2:25 AM Jeff Lutzow 
> wrote:
>
> I can’t even find the “Critical Section Controller” area.  I am running
> the latest 5.4.1 version.
>
> From: A P 
> Sent: Tuesday, July 27, 2021 1:43 PM
> To: JMeter Users List 
> Subject: Re: Have JMeter Prepare SQL ONLY once and Execute Multiple times
>
> EXTERNAL EMAIL
>
>
>
> Not sure but you can try "Critical section controller"
>
> On Tue, Jul 27, 2021 at 11:55 PM Jeff Lutzow  >
> wrote:
>
> > Is there a way to accomplish the above? Everything I have tried I still
> > see JMeter “Prepare” the SQL statement every time when using the JDBC
> > driver to connect to IBM Data Virtualization Manager.
> >
> > I would like to run a test where it runs the same request multiple times
> > but ONLY Prepares the request one time.
> >
> >
> > Sent from Mail https://go.microsoft.com/fwlink/?LinkId=550986>> for
> > Windows 10
> >
> >
> > 
> > Rocket Software, Inc. and subsidiaries ¦ 77 Fourth Avenue, Waltham MA
> > 02451 ¦ Main Office Toll Free Number: +1 855.577.4323
> > Contact Customer Support:
> > https://my.rocketsoftware.com/RocketCommunity/RCEmailSupport<
> https://my.rocketsoftware.com/RocketCommunity/RCEmailSupport>
> > Unsubscribe from Marketing Messages/Manage Your Subscription Preferences
> -
> > http://www.rocketsoftware.com/manage-your-email-preferences<
> http://www.rocketsoftware.com/manage-your-email-preferences>
> > Privacy Policy -
> > http://www.rocketsoftware.com/company/legal/privacy-policy<
> http://www.rocketsoftware.com/company/legal/privacy-policy>
> > 
> >
> > This communication and any attachments may contain confidential
> > information of Rocket Software, Inc. All unauthorized use, disclosure or
> > distribution is prohibited. If you are not the intended recipient, please
> > notify Rocket Software immediately and destroy all copies of this
> > communication. Thank you.
> >
>
> 
> Rocket Software, Inc. and subsidiaries ■ 77 Fourth Avenue, Waltham MA
> 02451 ■ Main Office Toll Free Number: +1 855.577.4323
> Contact Customer Support:
> https://my.rocketsoftware.com/RocketCommunity/RCEmailSupport
> Unsubscribe from Marketing Messages/Manage Your Subscription Preferences -
> http://www.rocketsoftware.com/manage-your-email-preferences
> Privacy Policy -
> http://www.rocketsoftware.com/company/legal/privacy-policy
> 
>
> This communication and any attachments may contain confidential
> information of Rocket Software, Inc. All unauthorized use, disclosure or
> distribution is prohibited. If you are not the intended recipient, please
> notify Rocket Software immediately and destroy all copies of this
> communication. Thank you.
>
> 
> Rocket Software, Inc. and subsidiaries ■ 77 Fourth Avenue, Waltham MA
> 02451 ■ Main Office Toll Free Number: +1 855.577.4323
> Contact Customer Support:
> https://my.rocketsoftware.com/RocketCommunity/RCEmailSupport
> Unsubscribe from Marketing Messages/Manage Your Subscription Preferences -
> http://www.rocketsoftware.com/manage-your-email-preferences
> Privacy Policy -
> http://www.rocketsoftware.com/company/legal/privacy-policy
> 
>
> This communication and any attachments may contain confidential
> information of Rocket Software, Inc. All unauthorized use, disclosure or
> distribution is prohibited. If you are not the intended recipient, please
> notify Rocket Software immediately and destroy all copies of this
> communication. Thank you.
>


Composite Graph for none-GUI mode

2021-07-27 Thread Tong Sun
On Tue, Jul 27, 2021 at 7:55 AM Philippe Mouawad 
wrote:

>
>- https://jmeter-plugins.org/wiki/CompositeGraph/
>
>
 Interesting. Thanks!

is such Composite Graph for GUI only mode?
Any way to get such Graph even when using none-GUI mode?

Thx!


Re: Showing JMeter cmd line parameters in HTML Dashboard Report

2021-06-26 Thread Tong Sun
+1,

threads, ramp up time, loop are very important information for the
documentation.

On Sat, Jun 26, 2021 at 11:02 AM Prateek Dua 
wrote:

> Hi Team,
>
> Need your help / suggestion if any on below problem statement
>
> Use case : Have to show JMeter parameters threads, ramp up time, loop  (
> getting passed via cmd line in Jenkins' shell script)  in JMeter's HTML
> Dashboard output Report.
>
> Please find screengrab of Jenkins JMeter cmd line parameters
> https://imgur.com/a/Y82xaOC
>
>
>
>
>
> So is there any alternative to do that.
>
>
> Thanks,
> Prateek
>
> The contents of this email, including the attachments, are *privileged
> and confidential* to the intended recipient at the email address to which
> it has been addressed. If you receive it in error, please notify the sender
> immediately by return email and then permanently delete it from your
> system. The unauthorized use, distribution, copying or alteration of this
> email, including the attachments, is strictly forbidden. Please note that
> neither the sender nor the company accepts any responsibility for viruses
> and it is your responsibility to scan the email and attachments (if any).
>
> -
> To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
> For additional commands, e-mail: user-h...@jmeter.apache.org


Re: Comparison between navigation times registered by JMeter and other tools

2021-05-26 Thread Tong Sun
On Wed, May 26, 2021 at 3:37 PM Felix Schumacher wrote:
>
> Can you describe the test elements, that you are using? What is inside the 
> transaction that takes eight seconds?

I think in such a situation, the best way forward is to test a (simple
& reliable) public service using JMeter and HP BSM.

If the two still can't agree with each other this way, record the
public service visiting with fiddler. The closer to fiddler's
reporting wins.

-
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 Tong Sun
On Wed, May 26, 2021 at 11:49 AM glin...@live.com  wrote:
>
> 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
> <https://jmeter.apache.org/usermanual/test_plan.html#scoping_rules>   so if
> you put  JSON Assertion
> <https://jmeter.apache.org/usermanual/component_reference.html#JSON_Assertion>
> (or even better  JSON JMESPath Assertion
> <https://www.blazemeter.com/blog/the-jmeter-json-jmespath-extractor-andassertion-a-guide>
> ) at the Thread Group level - it will be applied to *all samplers* in all
> Thread Groups.
>
> Hopefully this is something you're looking for

Perfect! That's exactly what I was looking for.

Thanks for the speedy reply

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



Script wide validation

2021-05-26 Thread Tong Sun
Hi,

I know currently JMeter doesn't have script-wide validation, a feature
available in other testing tools like MS VS, that a single script-wide
validation rule can be used to check every request in the whole script.

This is something I miss moving from  MS VS to JMeter. Since all our
returns are json based, and all have a unified way to report errors, a
single script-wide validation rule makes perfect sense in this case.

So, what options/workarounds do I have? thx


Re: This is a valid jmx file, but will turn empty when saved

2021-04-11 Thread Tong Sun
On Tue, Nov 24, 2020 at 5:03 PM Tong Sun wrote:
>
> Hi,
>
> This is my first post here, and I don't know the policy on attaching
> files. So I put my file at
>
> https://dpaste.com/F3K6Y7ZV2
>
> It's a valid jmx file (search.jmx), which can be included from e.g.,
>
> https://dpaste.com/DB5TEMNSW
>
> Everything is OK, except that when open the search.jmx file and save
> again in JMeter, I'll get an almost-empty file instead, like
>
> http://dpaste.com/ESVT2FWLG
>
> This has been the case for old and current version of JMeter, like
> 5.2.1 and 5.3.

Revisiting this old thread, as the problem still exists for 5.4 and
the latest snapshot build.

> Please verify.

Is there any way to fix it please?

> Thanks

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



Re: Starting Jmeter without the logo

2021-04-11 Thread Tong Sun
On Sun, Apr 11, 2021 at 4:49 AM Felix wrote:
>
>
> Am 10.04.21 um 22:39 schrieb Tong Sun:
> > On Sat, Apr 10, 2021 at 2:03 PM Felix Schumacher wrote:
> >
> >> https://bz.apache.org/bugzilla/show_bug.cgi?id=65232
> >>
> >> A fix has been applied to trunk. Are you able to test it and report, 
> >> whether it fixes your (first) problem?
> > Thanks a lot for the quick response and fix.
> >
> > I've tried building JMeter from source before and wasn't successful.
>
> You don't have to build it yourself, you can download nightlies and
> builds from trunk from https://jmeter.apache.org/nightly.html

Ah, good, next time, I'd know. thx!

> What was your problem building it?

- Java building is quite new to me
- I'm behind corp firewall that even blocks Java package download

Basically I'm too green, :)

> I had already created such a file to develop the fix, but it is always
> better to have feedback from the reporter :)

Yes, it works.
Thanks Felix

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



Re: Starting Jmeter without the logo

2021-04-10 Thread Tong Sun
On Sat, Apr 10, 2021 at 2:03 PM Felix Schumacher wrote:

> https://bz.apache.org/bugzilla/show_bug.cgi?id=65232
>
> A fix has been applied to trunk. Are you able to test it and report, whether 
> it fixes your (first) problem?

Thanks a lot for the quick response and fix.

I've tried building JMeter from source before and wasn't successful.

Here is one way you can do a quick test yourself,

- Find a smallest JMeter file and open with a text editor
- Make any tag imbalance, by introducing a typo or removing the end tag

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



Re: Starting Jmeter without the logo

2021-04-10 Thread Tong Sun
On Sat, Apr 10, 2021 at 12:30 PM Felix Schumacher <
felix.schumac...@internetallee.de> wrote:
>
>
> Am 10.04.21 um 18:21 schrieb Tong Sun:
> > On Sat, Apr 10, 2021 at 6:02 AM Felix Schumacher <
> > felix.schumac...@internetallee.de> wrote:
> >>
> >> Am 10.04.21 um 09:23 schrieb Adrian Sp:
> >>> Hi,
> >>>
> >>> It's an open source project. Just check the code and see how it works
> >>> under the hood if you feel comfortable with this.
> >> Apart from the sources there are other places, where you might be able
> >> to find the good stuff, bugzilla for example ;)
> >>
> >> https://bz.apache.org/bugzilla/show_bug.cgi?id=64658
> > If you still want to disable the splash screen, there is a patch
> >> referenced, that should do that.
> >
> > Thanks Felix, for your effort in trying to help in the previous case,
and
> > sent that patch.
> >
> > Ok, if the option to turn off the splash screen is not acceptable,
Felix,
> > would you make another PR that it ends in an earlier spot please?
> >
> > The current situation is that, whenever Jmeter has finished load scripts
> > and has found a start up problem, the pop up error windows will be
behind
> > the splash screen. I don't mind the splash screen normally, but I think
> > blocking the error windows is something not intended by design, and
should
> > be fixed.
>
> Can you tell us, which error is displayed?

[image: image.png]

Moreover, when it happens, It's staying on top of everything, making it
difficult for me to work on anything else.

[image: image.png]

> It seems that there are at least two different problems:
>
> First, that there is an error ;) (We should try to not let that happen)

I tried to hand-craft my jmeter script the way I want externally using a
tex editor, but this is what I got so far, and I haven't figured out why
yet. The physical structure itself pass xml validation but seems it is a
logical error. I was planning to do trial and error to pinpoint where the
problem is, but Felix if you don't mind taking a quick look for me, I'll be
very grateful.

> Second, that that error is displayed and hidden behind the splash
> screen. That should not be the case.

Thanks for agreeing with that.


Re: Starting Jmeter without the logo

2021-04-10 Thread Tong Sun
On Sat, Apr 10, 2021 at 6:02 AM Felix Schumacher <
felix.schumac...@internetallee.de> wrote:
>
>
> Am 10.04.21 um 09:23 schrieb Adrian Sp:
> > Hi,
> >
> > It's an open source project. Just check the code and see how it works
> > under the hood if you feel comfortable with this.
>
> Apart from the sources there are other places, where you might be able
> to find the good stuff, bugzilla for example ;)
>
> https://bz.apache.org/bugzilla/show_bug.cgi?id=64658

If you still want to disable the splash screen, there is a patch
> referenced, that should do that.


Thanks Felix, for your effort in trying to help in the previous case, and
sent that patch.

Ok, if the option to turn off the splash screen is not acceptable, Felix,
would you make another PR that it ends in an earlier spot please?

The current situation is that, whenever Jmeter has finished load scripts
and has found a start up problem, the pop up error windows will be behind
the splash screen. I don't mind the splash screen normally, but I think
blocking the error windows is something not intended by design, and should
be fixed.

Thanks


[OT] Associate JMeter with .jmx files under Mac

2021-03-15 Thread Tong Sun
Hi,

In windows' term, associating JMeter with .jmx files means
double-clicking .jmx files in file explorer will launch jmeter to open
the file.

I'd assume it's a quite common request under Mac as well.
Has anybody managed to do that?

thx

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



Re: [OT] Using JMeter source with Java 15 (openjdk)

2021-03-05 Thread Tong Sun
On Fri, Mar 5, 2021 at 2:39 PM Tong Sun  wrote:
>
> On Fri, Mar 5, 2021 at 10:53 AM Vladimir Sitnikov
>  wrote:
> >
> > Hi,
> >
> > Have you tried ./gradlew runGui ?
> > An alternative option is to use ./gradlew createDist which would copy all
> > the dependencies, so you could launch JMeter with bin/jmeter.
> >
> > Please find the commands at
> > https://jmeter.apache.org/usermanual/jmeter_tutorial.html#building
>
> Thanks Vladimir,
>
> It works, for my Java 8.
>
> However, my JMeter scripts need Java 15, so I installed Java 15, following
>  https://mkyong.com/java/how-to-install-java-on-mac-osx/
>
> However this is what I got:
> (sorry, just realized that it is not jmeter's problem but Java15's, so
> marking OT in subject, as I have nowhere to turn to for help, because
> searching for that error message didn't give me much good hits)

NVM, this is really not a jmeter question, and I shouldn't have asked here.
Will ask somewhere else...

> $ /Applications/apache-jmeter-5.4/bin/jmeter
> /Applications/apache-jmeter-5.4/bin/jmeter: line 128: [: : integer
> expression expected
> dyld: Library not loaded: @rpath/libjli.dylib
>   Referenced from:
> /Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home/bin/java
>   Reason: image not found
> /Applications/apache-jmeter-5.4/bin/jmeter: line 199: 48130 Abort
> trap: 6   "$JAVA_HOME/bin/java" $ARGS $JVM_ARGS $JMETER_OPTS
> -jar "$PRGDIR/ApacheJMeter.jar" "$@"
>
> Here is more info, that I think relevant:
>
> $ sed -n '128p' /Applications/apache-jmeter-5.4/bin/jmeter
> if [ "$CURRENT_VERSION" -gt "$MINIMAL_VERSION" ]; then
>
> $ type java
> java is hashed (/usr/local/opt/openjdk/bin/java)
>
> $ java -version
> openjdk version "15.0.1" 2020-10-20
> OpenJDK Runtime Environment (build 15.0.1+9)
> OpenJDK 64-Bit Server VM (build 15.0.1+9, mixed mode, sharing)
>
> $ /usr/libexec/java_home
> /Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home
>
> $ echo $JAVA_HOME
> /Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home
>
> $ ls -l /Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home/
> total 4
> drwxr-xr-x 32 t admin 1024 2021-01-18 18:43 bin
> drwxr-xr-x  7 t admin  224 2021-01-18 18:43 conf
> drwxr-xr-x  5 t admin  160 2021-01-18 18:43 demo
> drwxr-xr-x  9 t admin  288 2021-01-18 18:43 include
> drwxr-xr-x 71 t admin 2272 2021-01-18 18:43 jmods
> drwxr-xr-x 71 t admin 2272 2021-01-18 18:43 legal
> drwxr-xr-x 56 t admin 1792 2021-01-18 18:43 lib
> drwxr-xr-x  3 t admin   96 2021-01-18 18:43 man
> -rw-r--r--  1 t admin 1152 2021-01-18 18:43 release
>
> $ groovy -v
> dyld: Library not loaded: @rpath/libjli.dylib
>   Referenced from:
> /Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home/bin/java
>   Reason: image not found
> Abort trap: 6

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



[OT] Using JMeter source with Java 15 (openjdk)

2021-03-05 Thread Tong Sun
On Fri, Mar 5, 2021 at 10:53 AM Vladimir Sitnikov
 wrote:
>
> Hi,
>
> Have you tried ./gradlew runGui ?
> An alternative option is to use ./gradlew createDist which would copy all
> the dependencies, so you could launch JMeter with bin/jmeter.
>
> Please find the commands at
> https://jmeter.apache.org/usermanual/jmeter_tutorial.html#building

Thanks Vladimir,

It works, for my Java 8.

However, my JMeter scripts need Java 15, so I installed Java 15, following
 https://mkyong.com/java/how-to-install-java-on-mac-osx/

However this is what I got:
(sorry, just realized that it is not jmeter's problem but Java15's, so
marking OT in subject, as I have nowhere to turn to for help, because
searching for that error message didn't give me much good hits)

$ /Applications/apache-jmeter-5.4/bin/jmeter
/Applications/apache-jmeter-5.4/bin/jmeter: line 128: [: : integer
expression expected
dyld: Library not loaded: @rpath/libjli.dylib
  Referenced from:
/Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home/bin/java
  Reason: image not found
/Applications/apache-jmeter-5.4/bin/jmeter: line 199: 48130 Abort
trap: 6   "$JAVA_HOME/bin/java" $ARGS $JVM_ARGS $JMETER_OPTS
-jar "$PRGDIR/ApacheJMeter.jar" "$@"

Here is more info, that I think relevant:

$ sed -n '128p' /Applications/apache-jmeter-5.4/bin/jmeter
if [ "$CURRENT_VERSION" -gt "$MINIMAL_VERSION" ]; then

$ type java
java is hashed (/usr/local/opt/openjdk/bin/java)

$ java -version
openjdk version "15.0.1" 2020-10-20
OpenJDK Runtime Environment (build 15.0.1+9)
OpenJDK 64-Bit Server VM (build 15.0.1+9, mixed mode, sharing)

$ /usr/libexec/java_home
/Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home

$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home

$ ls -l /Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home/
total 4
drwxr-xr-x 32 t admin 1024 2021-01-18 18:43 bin
drwxr-xr-x  7 t admin  224 2021-01-18 18:43 conf
drwxr-xr-x  5 t admin  160 2021-01-18 18:43 demo
drwxr-xr-x  9 t admin  288 2021-01-18 18:43 include
drwxr-xr-x 71 t admin 2272 2021-01-18 18:43 jmods
drwxr-xr-x 71 t admin 2272 2021-01-18 18:43 legal
drwxr-xr-x 56 t admin 1792 2021-01-18 18:43 lib
drwxr-xr-x  3 t admin   96 2021-01-18 18:43 man
-rw-r--r--  1 t admin 1152 2021-01-18 18:43 release

$ groovy -v
dyld: Library not loaded: @rpath/libjli.dylib
  Referenced from:
/Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home/bin/java
  Reason: image not found
Abort trap: 6

-
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 Tong Sun
On Fri, Mar 5, 2021 at 9:38 AM glin...@live.com  wrote:
>
> 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

Thanks glinius, that actually answered my next question, how to
overcome the failed tests.

So, to summarize it up,

- use the tar.gz download as suggested by Felix
- and build with above command to avoid the failed tests

Now I have a jmeter-5.4.1-SNAPSHOT.jar file.

So the next question regarding building JMeter from source -- how to
make use of the build result?

I did

rsync -ua /Applications/apache-jmeter-5.3/bin/
/Applications/apache-jmeter-5.4/bin/

and copied my build/libs/jmeter-5.4.1-SNAPSHOT.jar as
/Applications/apache-jmeter-5.4/bin/ApacheJMeter.jar

but when invoking it with,
/Applications/apache-jmeter-5.4/bin/jmeter

I got
no main manifest attribute, in
/Applications/apache-jmeter-5.4/bin/ApacheJMeter.jar

thanks

-
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 Tong Sun
On Fri, Mar 5, 2021 at 9:03 AM Tong Sun  wrote:
>
> Hi,
>
> I'm having trouble building JMeter from source and I have no idea why.
> I'm using Java 8.
>
> $ groovy -v
> Groovy Version: 3.0.3 JVM: 1.8.0_261 Vendor: Oracle Corporation OS: Mac OS X
>
> $ gradlew -v
>
> 
> Gradle 6.7
> 
>
> Build time:   2020-10-14 16:13:12 UTC
> Revision: 312ba9e0f4f8a02d01854d1ed743b79ed996dfd3
>
> Kotlin:   1.3.72
> Groovy:   2.5.12
> Ant:  Apache Ant(TM) version 1.10.8 compiled on May 10 2020
> JVM:  1.8.0_261 (Oracle Corporation 25.261-b12)
> OS:   Mac OS X 10.15.7 x86_64
>
> I got the source from
> https://jmeter.apache.org/download_jmeter.cgi
> https://apache.claz.org//jmeter/source/apache-jmeter-5.4.1_src.zip
>
> The error is:
>
> FAILURE: Build completed with 2 failures.
>
> 1: Task failed with an exception.
> ---
> * What went wrong:
> Execution failed for task ':buildSrc:autostyleKotlinGradleCheck'.
> > The following files have format violations:
> build.gradle.kts
>   @@ -1,77 +1,77 @@
>   -/*\r\n
>
> I've published the full build scan at
> https://gradle.com/s/73bo65dlralmy

$ ./gradlew autostyleApply -PmaxCheckMessageLines=50
-PmaxFilesToList=10 -PminLinesPerFile=4
> Task :buildSrc:autostyleKotlinGradleCheck FAILED
> Task :buildSrc:batchtest:autostyleKotlinCheck FAILED

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
---
* What went wrong:
Execution failed for task ':buildSrc:autostyleKotlinGradleCheck'.
> The following files have format violations:
build.gradle.kts
  @@ -1,77 +1,77 @@
  -/*\r\n
  - * Licensed to the Apache Software Foundation (ASF) under one or more\r\n
...

2: Task failed with an exception.
---
* What went wrong:
Execution failed for task ':buildSrc:batchtest:autostyleKotlinCheck'.
> The following files have format violations:

subprojects/batchtest/src/main/kotlin/org/apache/jmeter/buildtools/batchtest/BatchTest.kt
. . .

  Violations also present in:

subprojects/batchtest/src/main/kotlin/org/apache/jmeter/buildtools/batchtest/BatchTestServer.kt

subprojects/batchtest/src/main/kotlin/org/apache/jmeter/buildtools/batchtest/BatchtestPlugin.kt

subprojects/batchtest/src/main/kotlin/org/apache/jmeter/buildtools/batchtest/WriterExtensions.kt
  You might want to adjust -PmaxCheckMessageLines=50
-PmaxFilesToList=10 -PminLinesPerFile=4 to see more violations
  Run './gradlew autostyleApply' to fix the violations.

I've tried
./gradlew autostyleApply -PmaxCheckMessageLines=50 -PmaxFilesToList=10
-PminLinesPerFile=4
several times and it always returns errors like this.

> My work is blocked because of this -- I must get the jmeter build from
> source. I know, it's weird, but that's what is required from my work.
>
> Any help appreciated. Thanks

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



Building JMeter from source with Java 8

2021-03-05 Thread Tong Sun
Hi,

I'm having trouble building JMeter from source and I have no idea why.
I'm using Java 8.

$ groovy -v
Groovy Version: 3.0.3 JVM: 1.8.0_261 Vendor: Oracle Corporation OS: Mac OS X

$ gradlew -v


Gradle 6.7


Build time:   2020-10-14 16:13:12 UTC
Revision: 312ba9e0f4f8a02d01854d1ed743b79ed996dfd3

Kotlin:   1.3.72
Groovy:   2.5.12
Ant:  Apache Ant(TM) version 1.10.8 compiled on May 10 2020
JVM:  1.8.0_261 (Oracle Corporation 25.261-b12)
OS:   Mac OS X 10.15.7 x86_64

I got the source from
https://jmeter.apache.org/download_jmeter.cgi
https://apache.claz.org//jmeter/source/apache-jmeter-5.4.1_src.zip

The error is:

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
---
* What went wrong:
Execution failed for task ':buildSrc:autostyleKotlinGradleCheck'.
> The following files have format violations:
build.gradle.kts
  @@ -1,77 +1,77 @@
  -/*\r\n

I've published the full build scan at
https://gradle.com/s/73bo65dlralmy

My work is blocked because of this -- I must get the jmeter build from
source. I know, it's weird, but that's what is required from my work.

Any help appreciated. Thanks

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



Exiting the jsr223 sampler

2021-02-25 Thread Tong Sun
Hi,

Quick & simple question, how to stop the jsr223 script from reaching
the following processing code (B), return, exit, or ...?

if (A) exit
B

I just  want the jsr223 script not to process the following code, B,
not to stop the whole thread execution, of which it's the only hits
I've found from the internet so far.

thanks

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



Re: How to handle Concurrent sessions for single user id in Jmeter

2021-02-22 Thread Tong Sun
On Mon, Feb 22, 2021 at 5:31 AM Harshal Kulkarni
 wrote:
>
> Hello Team,
>
> I am working on load testing of one application using Jmeter 5.1.1.
> Unfortunately, client can not provide multiple test user IDs, so we have
> only 3 test user IDs. I want to load test with 50 concurrent users load.
> Application allows concurrent sessions from single user on browser and I
> can login with single user id on multiple machine and browser at same time.

Can you login with single user id on the same machine and same browser
(different session) at same time?

> But when I am trying to use single user id for multiple threads, in jmeter
> response I see that "session already active" message for 2nd and onwards
> threads. Only first thread able to login.

Are you using distributed jmeter testing now?

> I ha e used HTTP cache and cookie manager to clear cache.
> I tried to set different config from HTTP Cookie manager, but seeing same
> error.
> Could someone help me how I need to handle this?
>
> Thanks in advanced!
>
>
> Harshal

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



Re: JTL file for PerfMon Metrics Collector for JMeterPluginsCMD

2021-02-04 Thread Tong Sun
On Thu, Feb 4, 2021 at 10:50 AM Tong Sun  wrote:
>
> Hi,
>
> JMeterPluginsCMD supports PerfMon Metrics Collector for generating
> graphs out of JTL files, as per the doc.
>
> But I don't know what its JTL file should be in order to get it working.

Found it,

https://groups.google.com/u/1/g/jmeter-plugins/c/hv8j6DzdsZ8/m/sU91BhxxAwAJ

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



JTL file for PerfMon Metrics Collector for JMeterPluginsCMD

2021-02-04 Thread Tong Sun
Hi,

JMeterPluginsCMD supports PerfMon Metrics Collector for generating
graphs out of JTL files, as per the doc.

But I don't know what its JTL file should be in order to get it working.

Anyone can help please?

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



Bug? JMeter is not using the default groovy

2021-02-02 Thread Tong Sun
Hi,

I've already set the default groovy version, but it seems that JMeter
insists something of its own:


$ groovy --version
Groovy Version: 2.4.12 JVM: 1.8.0_261 Vendor: Oracle Corporation OS: Mac OS X

$ jmeter -f -n -t $jmxf.jmx
Creating summariser 
CStarting standalone test @ Tue Feb 02 17:01:38 EST 2021 (1612303298756)
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message
on port 4445
Uncaught Exception java.lang.ExceptionInInitializerError in thread
Thread[StandardJMeterEngine,5,main]. See log file for details.

$ grep -A18 'Uncaught ' jmeter.log
2021-02-02 17:01:39,132 ERROR o.a.j.JMeter: Uncaught exception in
thread Thread[StandardJMeterEngine,5,main]
java.lang.ExceptionInInitializerError: null
at 
org.codehaus.groovy.jsr223.GroovyScriptEngineFactory.getLanguageVersion(GroovyScriptEngineFactory.java:95)
~[groovy-jsr223-3.0.3.jar:3.0.3]
at 
org.apache.jmeter.util.JSR223BeanInfoSupport.(JSR223BeanInfoSupport.java:70)
~[ApacheJMeter_core.jar:5.3]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) ~[?:1.8.0_261]
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
~[?:1.8.0_261]
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
~[?:1.8.0_261]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
~[?:1.8.0_261]
at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_261]
at 
com.sun.beans.finder.InstanceFinder.instantiate(InstanceFinder.java:96)
~[?:1.8.0_261]
at com.sun.beans.finder.InstanceFinder.find(InstanceFinder.java:66)
~[?:1.8.0_261]
at java.beans.Introspector.findExplicitBeanInfo(Introspector.java:448)
~[?:1.8.0_261]
at java.beans.Introspector.(Introspector.java:398) ~[?:1.8.0_261]
at java.beans.Introspector.getBeanInfo(Introspector.java:173)
~[?:1.8.0_261]
at 
org.apache.jmeter.testbeans.TestBeanHelper.prepare(TestBeanHelper.java:67)
~[ApacheJMeter_core.jar:5.3]
at 
org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:202)
~[ApacheJMeter_core.jar:5.3]
at 
org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:380)
~[ApacheJMeter_core.jar:5.3]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_261]
Caused by: groovy.lang.GroovyRuntimeException: Conflicting module
versions. Module [groovy-xml is loaded in version 3.0.3 and you are
trying to load version 2.4.12



So how to tell my JMeter not to use groovy v3.0.3 but v2.4.12?

Note this only happens when running JMeter in -n(NON_GUI) mode. GUI
mode is somehow fine.

Thanks

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



Re: Mark error in JSR223 steps

2020-12-31 Thread Tong Sun
Thanks Felix
I've been banning my head on the wall for a few days.
Thanks for helping & resolving the issue.

Happy New Year!

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



Re: Mark error in JSR223 steps

2020-12-30 Thread Tong Sun
Hmm,

I've put

SampleResult.with {
successful = false
responseCode = "500"
responseMessage = "some error"
}

into my catch section, but they are still green and correct (even
error is caught) viewed in Result Tree.

I also tried to use

SampleResult.setSuccessful(false)

but that didn't work either -- itself generated another exception.

So do I have to `new` a SampleResult before making use of the class?
If so, how can JMeter know to use my own newed SampleResult as the result?

On Wed, Dec 30, 2020 at 12:02 PM Tong Sun  wrote:
>
> Thanks a lot Mariusz, I could never come up with answers like that myself!
>
> On Wed, Dec 30, 2020 at 11:50 AM Mariusz W  wrote:
> >
> > To see it in reports and listeners:
> > SampleResult.with {
> > successful = false
> > responseCode = "500"
> > responseMessage = "some error...."
> > }
> >
> > Regards,
> > Mariusz
> >
> > On Wed, 30 Dec 2020 at 16:40, Tong Sun  wrote:
> >
> > > Hi,
> > >
> > > My JSR223 steps have problems, some even have exceptions, but viewing
> > > from View Result Tree, they are all green and correct.
> > >
> > > How to mark those JSR223 steps that have problems red and failed?
> > >
> > > I tried to throw an exception, but that killed the whole thread.
> > >
> > > thx
> > >
> > > -
> > > To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
> > > For additional commands, e-mail: user-h...@jmeter.apache.org
> > >
> > >

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



Re: Mark error in JSR223 steps

2020-12-30 Thread Tong Sun
Thanks a lot Mariusz, I could never come up with answers like that myself!

On Wed, Dec 30, 2020 at 11:50 AM Mariusz W  wrote:
>
> To see it in reports and listeners:
> SampleResult.with {
> successful = false
> responseCode = "500"
> responseMessage = "some error"
> }
>
> Regards,
> Mariusz
>
> On Wed, 30 Dec 2020 at 16:40, Tong Sun  wrote:
>
> > Hi,
> >
> > My JSR223 steps have problems, some even have exceptions, but viewing
> > from View Result Tree, they are all green and correct.
> >
> > How to mark those JSR223 steps that have problems red and failed?
> >
> > I tried to throw an exception, but that killed the whole thread.
> >
> > thx
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
> > For additional commands, e-mail: user-h...@jmeter.apache.org
> >
> >

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



Mark error in JSR223 steps

2020-12-30 Thread Tong Sun
Hi,

My JSR223 steps have problems, some even have exceptions, but viewing
from View Result Tree, they are all green and correct.

How to mark those JSR223 steps that have problems red and failed?

I tried to throw an exception, but that killed the whole thread.

thx

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



Re: How to print Java stack trace in JMeter

2020-12-23 Thread Tong Sun
On Wed, Dec 23, 2020 at 1:19 PM Felix Schumacher
 wrote:
>
>
> Am 23.12.20 um 19:16 schrieb Tong Sun:
> > Hi,
> >
> > Most people would have some Java code to support JMeter test scripts.
> > How to print stack trace for the Java code when something went wrong?
> >
> > I tried:
> >
> > try {
> >// some code
> > } catch(Error e) {
> >log.error("Error: $e")
> >log.info("${org.codehaus.groovy.runtime.StackTraceUtils.sanitize(new
> > Exception(e)).printStackTrace()}")
> > }
> >
> > base on 
> > https://stackoverflow.com/questions/6259202/how-do-i-print-a-groovy-stack-trace
> > and also `e.printStackTrace()` from Java, but both print out just "null"
>
> Where would you place those code? If you use that inside of JMeter
> JSR-223 scripts, you will get bitten by JMeter replacing the ${...} stuff.

Yeah, exactly in the JSR-223 scripts.

I put merely

org.codehaus.groovy.runtime.StackTraceUtils.sanitize(new
Exception(e)).printStackTrace()

before but nothing get printed in log, so I changed to log.info instead.

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



How to print Java stack trace in JMeter

2020-12-23 Thread Tong Sun
Hi,

Most people would have some Java code to support JMeter test scripts.
How to print stack trace for the Java code when something went wrong?

I tried:

try {
   // some code
} catch(Error e) {
   log.error("Error: $e")
   log.info("${org.codehaus.groovy.runtime.StackTraceUtils.sanitize(new
Exception(e)).printStackTrace()}")
}

base on 
https://stackoverflow.com/questions/6259202/how-do-i-print-a-groovy-stack-trace
and also `e.printStackTrace()` from Java, but both print out just "null"

pls help. thx

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



Re: Best approach to use groovy/grapes cache jar files

2020-12-23 Thread Tong Sun
On Wed, Dec 23, 2020 at 12:22 PM Mariusz W  wrote:
>
> Hi,
> You can put java jar file in jmeter lib folder and after restart JMeter you
> can use classes from this jar in jsr223 sampler in groovy script after
> import.

I have a huge list of third party jar files, and it'll be painful
doing it this way,

> I prefer building my supporting utils (java or groovy) in external IDE
> project eg. IntelliJ (Gradle/Maven) and pack it as jar.

You meant building one single fat jar to include them all, all those
third-party jar files?

> On Wed, 23 Dec 2020 at 17:55, Tong Sun  wrote:
>
> > Hi,
> >
> > - Most people would have some Java code to support JMeter test scripts.
> > - Those Java code would most probably need to be built on third party libs
> > - Those third party libs are downloaded and cached automatically by
> > groovy/grapes in its cache.
> >
> > So the question is what is the best approach to use groovy/grapes
> > cache jar files?
> >
> > I did some research but didn't find much good answers, the best one I
> > found is
> >
> > https://stackoverflow.com/questions/59398827/
> >
> > which is as simple as providing JMeter a grapeConfig.xml file. But
> > that's all within the conversation -- I don't know where to find such
> > grapeConfig.xml, or how to generate one.
> >
> > Anyway, the question/goal is what is the best approach to use
> > groovy/grapes cache jar files. thx
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
> > For additional commands, e-mail: user-h...@jmeter.apache.org
> >
> >

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



Best approach to use groovy/grapes cache jar files

2020-12-23 Thread Tong Sun
Hi,

- Most people would have some Java code to support JMeter test scripts.
- Those Java code would most probably need to be built on third party libs
- Those third party libs are downloaded and cached automatically by
groovy/grapes in its cache.

So the question is what is the best approach to use groovy/grapes
cache jar files?

I did some research but didn't find much good answers, the best one I found is

https://stackoverflow.com/questions/59398827/

which is as simple as providing JMeter a grapeConfig.xml file. But
that's all within the conversation -- I don't know where to find such
grapeConfig.xml, or how to generate one.

Anyway, the question/goal is what is the best approach to use
groovy/grapes cache jar files. thx

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



Re: Issue with Recording Scripts in JMeter

2020-12-18 Thread Tong Sun
On Fri, Dec 18, 2020 at 8:18 AM Nandini Sathanur
 wrote:
>
> Thanks Elke.
>
> I have tried launching JMeter through cmd with the same command as an
> administrator.
> When I do that, my application URL does not launch at all. I see - *The
> page cannot be displayed *error*.*

What's the "details" of that error?

Have you accepted the proxy server's certificate into Java?

-
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 Tong Sun
On Wed, Dec 16, 2020 at 7:37 AM glin...@live.com  wrote:
>
> 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

Sorry I can't get it to work. I'm getting

java.lang.IllegalArgumentException: File 1 must exist and be readable

It must be something simple but I just can't figure it out now. So
here is my code:

-
CsvFile = "Test.csv"

log.info("CsvFile: ${CsvFile}")
props.put("CsvFile", CsvFile)
log.info("CsvFile: ${__P(CsvFile)}")
setProperty("CsvFile", CsvFile)
log.info("CsvFile: ${__P(CsvFile)}")
-

And for that, I'm getting:

2020-12-16 16:48:49,970 INFO o.a.j.p.j.s.J.init: CsvFile: Test.csv
2020-12-16 16:48:49,970 INFO o.a.j.p.j.s.J.init: CsvFile: 1
2020-12-16 16:48:49,970 INFO o.a.j.p.j.s.J.init: CsvFile: 1

What's wrong? Thx!!

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



Thread Groups based initialization for each thread group

2020-12-15 Thread Tong Sun
Hi,

I need to do some initialization for each thread group before they
start, by calling several groovy functions.

I know there is a setup thread group, which is run once before all
thread groups, but how can I do setup once for each thread group?

Say for the following groovy script,

---
import C1
import C2
import C3

c1 = C1.init()
c2 = C2.init()
jdbc =C3.getjdbc(c1, c2)
---

how can I call it only once for each thread group?

thx!

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



Prepare dynamic csv test data in setup thread

2020-12-15 Thread Tong Sun
Hi,

I want to

- prepare dynamic csv test data in setup thread
- and use the generated .csv data for all other thread groups
- ideally, the name of the .csv is better be changed in the setup
thread as well.

How much of the above steps are possible?

Point 2 & 3 seems to be impossible to me at this point.

thx!

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



Using Test Plan variables to define another Test Plan variable

2020-12-07 Thread Tong Sun
I've defined the following variables on the Test Plan:

HOST www.example.com
URL${__P(URL, __V(https://${HOST}/api/path))}

I.e., I want to define a Test Plan variable from the previously
defined existing Test Plan variable(s), if URL is not
defined/overwritten on cli. How to do that? Mine above is not working.

thx

-
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-02 Thread Tong Sun
Yes, thanks a lot!


Re: How to set system property within JMeter

2020-12-01 Thread Tong Sun
On Tue, Dec 1, 2020 at 11:21 AM glin...@live.com  wrote:
>
> 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
> 
>

>From https://www.blazemeter.com/blog/apache-jmeter-properties-customization,

There are 2 types of properties which are in use by Apache JMeter ...:

- System Properties
- JMeter Properties

I know one can set a *JMeter* Property via  __setProperty() function,
but it is the "*System* Properties" that I was talking about.

I need to set a system property programmatically *within* JMeter.

thanks

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



How to set system property within JMeter

2020-12-01 Thread Tong Sun
Hi,

I need to set a system property programmatically *within* JMeter.
How can I do that?

in
https://www.blazemeter.com/blog/apache-jmeter-properties-customization
the Option 3 is to use JMeter __P, but

It seems that I can only read system property from __P(), but cannot
set it, correct?

thx

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



This is a valid jmx file, but will turn empty when saved

2020-11-24 Thread Tong Sun
Hi,

This is my first post here, and I don't know the policy on attaching
files. So I put my file at

https://dpaste.com/F3K6Y7ZV2

It's a valid jmx file (search.jmx), which can be included from e.g.,

https://dpaste.com/DB5TEMNSW

Everything is OK, except that when open the search.jmx file and save
again in JMeter, I'll get an almost-empty file instead, like

http://dpaste.com/ESVT2FWLG

This has been the case for old and current version of JMeter, like
5.2.1 and 5.3.

Please verify.

Thanks

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