This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

jMeter tracking outputs

 
Ranch Hand
Posts: 1393
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I would like when usign jMeter, to control the flux if it. For example, when keeps giving you back 200 http, when reach a 503 http response code, or when reach a dos.

Or for example if a website takes 3 seconds in loading, then the result can be calified as great, when the web takes in loading 6 seconds is ok, when in between 6 and 15 second it is frustating, and scary when the user receives an error.

Is possible to programming or make a script kind of if....then.... in jMeter?

I need to know the breakpoints when the above situation happend and build a graph with it. Jmeter offers reporting capability, but what about graphical report?

Regards, Isaac
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For checking response code and duration you can use Response Assertion and Duration Assertion correspondingly. Assertions allow to conditionally set fail criteria and determine whether request successful or not, for instance if response code is 200 but request took 40 seconds - it looks like a failure. On the other hand "negative" test, like attempt to log in as user which does not exist returns 4xx response code, but is is expected, to avoid false negative response you can set "Ignore Status" so request will be treated successful. See How to Use JMeter Assertions in 3 Easy Steps guide for comprehensive information on JMeter Assertions and their user cases.

In regards to graphs, it is currently the weakest part of JMeter. You can work it around using custom listeners available via JMeter Plugins project (see Automatically generating nice graphs at end of your Load Test with Apache JMeter and JMeter-Plugins article for details on how this can be accomplished OR alternatively I recommend using Taurus tool - automation framework and wrapper around JMeter (also supports Gatling, Grinder, Locust and Selenium) which simplifies the process of configuring, launching and analyzing JMeter tests, it provides enterprise-grade reports (along with flexible pass/fail criteria) so it looks like a swiss-army-knife solution for you.
 
Angus Ferguson
Ranch Hand
Posts: 1393
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok and it is possible to get that codes and using a script or class in a programming language and for example write a different messages in a file depending of the code which we retrieved?

I have downloaded from Jmetersite the JMeter extra version, I have extracted it inthe JMeter forder just upper the bin folder and I have restarted JMeter. I cant see any listener called jp@gc Graphs Generator

Any advice, please?

Regards, Isaac
 
Dmitri Tikhanski
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure. For instance take a look into Beanshell Assertion

If you add a Beanshell Assertion at the same level as your test requests live and use the following code to its "Script" area:



It will write the relevant message into "myfile.txt" depending on current sampler response code.

See How to Use BeanShell: JMeter's Favorite Built-in Component guide for more information on Beanshell scripting in JMeter.
 
Angus Ferguson
Ranch Hand
Posts: 1393
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And where should be located in JMeter?
 
Angus Ferguson
Ranch Hand
Posts: 1393
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On the other hand when when I run it it doesnt works, but maybe if I run it from the command line it could run



For example this is the route I am using:



is this part when it writes isnt it?



 
Dmitri Tikhanski
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It will work. "myfile.txt" will be created in working directory (where you launch JMeter from, most likely its /bin folder). If not - check jmeter.log file for any errors.

 
Angus Ferguson
Ranch Hand
Posts: 1393
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if I use as Ramp-up period 100 and number of threads. What it means?
 
Angus Ferguson
Ranch Hand
Posts: 1393
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok Im now writing an script like this one:




As I show above I want send a message when an error occur to the user not to the technical staff. Something so concrete like "call your server provider to the number xxx, and ask for an increse of RAM of 250 mb(It costs 50 dollars)"

So from the bellow list of errors, whcih ones are relevants to put in the script, and whcih ones can be "translated" into user language, thats what I am trying to do now.



Any idea, please?
 
Yeah. What he said. Totally. Wait. What? Sorry, I was looking at this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!