• 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
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Which aspects test when using JMeter

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

I have built a JMeter test plan with Graphs and sumary reports, it shows me the the max time it takes to load the min, the average. I want to build a document like this:




Which are the most important scenarios which should I have into account when stressing a website, this one is for ecommerce and has 50 visits per day a the moment.

I mean for example if the internet go slower till 256 per sec then do this.....

I order to check every case is maybe a good idea to do it use BeanShell Assertion, for example:



In this case which are the codes I should have into account?.

I found this link: codes. For example, could someone answer this:



When getting this message, what is supposed the user or a administrator with knowledge of programming should do?

Are there codes for things like check when the memory is collapsing and other situation to have into account?

I hope I have explained the situation I have now.

Any advice please?

Regards, ISaac

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need to re-invent the wheel, JMeter automatically saves response message in its .jtl results file.


1442430997331,407,HTTP Request,200,OK,Thread Group 1-1,text,true,1591,1,1,407
1442430997764,215,HTTP Request,404,Not Found,Thread Group 1-1,text,false,1622,1,1,214
1442430997979,219,HTTP Request,405,Method Not Allowed,Thread Group 1-1,,false,189,1,1,219



Code: 200, Message: OK
Code: 404, Message: Not Found
Code: 405, Message: Method not allowed.

You can control what and how JMeter saves in its results file by modifying properties which names start from jmeter.save.saveservice. See jmeter.properties file in /bin folder of your JMeter installation for default values and Apache JMeter Properties Customization Guide for advanced information on JMeter properties and ways of working with them.
 
Angus Ferguson
Ranch Hand
Posts: 1346
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I modified the jmeter.properties liker this, sorry I just put the whole file, I deleted all the coments jmeter.save.saveservice, and I will run it tonight but I need to know where the resulting file will be placed.
Could someone tell me in which line of this file is that especified, please?




 
Dmitri Tikhanski
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Revert your changes, results file I mentioned can be obtained using default settings.

Just run JMeter in command-line non-GUI mode as



This test-results.jtl file will be in CSV format and will contain response code and response message along with other metrics as per my above example.
 
Angus Ferguson
Ranch Hand
Posts: 1346
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to schedule the start of it, no do it manually

Any idea, please?
 
Angus Ferguson
Ranch Hand
Posts: 1346
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
also when I scheduled my tests they doesnt start automatically all looks correct for me the startup delay option is 0.

Any idea, please?
 
Angus Ferguson
Ranch Hand
Posts: 1346
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

You don't need to re-invent the wheel, JMeter automatically saves response message in its .jtl results file.



Yes but what I want is something like this:

When error 500 happens then: The person in charge of the app should restart the server...
When error XXX happens then: The person in charge of the app should do the appropiate action

and so on thats why looks like I need to use a script like this isnt it?



In order write the customized message for every code


 
Angus Ferguson
Ranch Hand
Posts: 1346
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when I use

Isaacs-Mac-mini:bin isaac$ jmeter -n -t SugarTrendstarde.jmx -l test-results.jtl
-bash: jmeter: command not found



or this

Isaacs-Mac-mini:bin isaac$ ./jmeter -n -t SugarTrendstarde.jmx -l jmeteroutput.csv
-bash: ./jmeter: Permission denied



Any idea?
 
Dmitri Tikhanski
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you need a custom message for each response code - you'll have to use a script.

For JMeter execution problem - try adding execution permissions to jmeter binary as:



To schedule JMeter execution on MacOSX see How can I get a script to run every day on Mac OS X?

For other JMeter execution options (other than command-line) check out Five Ways To Launch a JMeter Test without Using the JMeter GUI guide.
 
Angus Ferguson
Ranch Hand
Posts: 1346
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now I get this one:


Any idea, please?
 
Dmitri Tikhanski
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Go to JMeter /bin folder
2. Execute "chmod +x jmeter"
3. Make sure that you can launch JMeter GUI by "./jmeter" command
4. Close the GUI
5. Execute "jmeter -n -t ...." command
 
Angus Ferguson
Ranch Hand
Posts: 1346
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I made all the steps and the last one after close the GUI shows this error:



I also tried it like this:


How could I open a jtl?

Any idea, please?
 
Dmitri Tikhanski
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe it is a problem with your JMeter installation. The easiest way to get it installed on Mac is using Homebrew

Install Homebrew as



Install JMeter as



Run JMeter as


Open JMeter GUI as


Add Listener of your choice to the test plan, using Browse button locate .jtl file and open it.

Analyze results.

Maybe it will be easier for you to use Taurus tool instead, it simplifies many JMeter aspects.
 
Angus Ferguson
Ranch Hand
Posts: 1346
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I got the jtl file. Maybe this question is out of context, or not extrictly about programming. As I never have analized a jtl file, or any result coming from JMeter. Could I find posible bottlenecks in the code, or performance problems in the server, in other words how could I get conclusions about the web application behaviour and know to improve it? I mean how could I interpret the result I have got from JMeter?

Also if I in JMeter use 500 number of threads and a ranp up period of 100. Does it mean that 5 users per second are added to the execution of the test? So second 1: 5 users, second 2: 10 users .....second 100: 500 users are active using the site concurrently at the same time?


To schedule JMeter execution on MacOSX see How can I get a script to run every day on Mac OS X?






Any idea, please?
 
Dmitri Tikhanski
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For better results representation I once again recommend running your .jmx file using Taurus tool, this way you'll be able to get easy-understandable graph reports.

For ramp-up: if you have enough loops - the answer is yes. JMeter starts with 0 threads and add threads each second as per your ramp-up scenario. In your case it will be 5 users each second. On start threads begin executing samplers upside down (or according to the Logic Controllers). When thread doesn't have any more samplers to execute and loops to iterate it's being shut down. So make sure you provide enough loops to achieve desired concurrency. Alternatively you can put loop number to "Forever" and set desired test duration under "Scheduler" section in the Thread Group

Schedule execution on Mac -

1. iCal alarm with "Run Script" action
2. launchd
 
Angus Ferguson
Ranch Hand
Posts: 1346
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recorded a scenario with 5000 users and a ramp up of 100. The result shows a failure after 20 seconds and then it recovers it works for a while and then it fails again like this:


Any idea of what it can means? Should I increase the capabilities of the server? Should it be a bottleneck in the web app?

On the other hand also of the .jtl Im getting now in order to check if the server, the network, etc fails. Could I get without using the GUI(the test os for 5000 user and the terminal is recomended) get a file which contains reponse time, etc?
 
Dmitri Tikhanski
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Again the question is out of scope of the original one. It is recommended to open a new thread for a different question.

It looks like you running into a situation described in Connection Reset since JMeter 2.10 ? wiki page.

If you're absolutely sure that everything is fine with your server, you can play with JMeter config to make these errors go away.

First of all, change "Implementation" of all your HTTP Request samplers to "HTTPClient4". The best way of doing it is HTTP Request Defaults

In user.properties file (in /bin folder of your JMeter installation) add next 2 lines:



In hc.parameters file (again in JMeter's /bin folder) add (or uncomment and change the value for) the next line:

 
Angus Ferguson
Ranch Hand
Posts: 1346
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I should have deleted the previous one I found it on the net easily, I made it like in the link you posted and now I dont get that errors
 
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
Enterprise-grade Excel API for Java
https://products.aspose.com/cells/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!