Network traffic simulation test - performance

I've got a PHP site up and running, and the db is mysql. before launching the site, I would like to test the traffic handling. Now am assuming that there are soe softwares that would simulate the traffic and log the processes running on my site. Any recommendation of software I should use? the traffic doesn't have to be real, but nonetheless, I would like to generate a high traffic to investigate the threshold of the site.
Appreciate the help

You can use Gatling https://github.com/excilys/gatling.
It's a stress tool written in Scala which aims at being more efficient and lighter than Jmeter.
Basically you record a scenario on your website and then run it 'n' times in parallel.
Here is the wiki for more infos https://github.com/excilys/gatling/wiki/Basic-Usage

You can use Jmeter:
It's free.
it's easy to Start with lot of documentation on its Website and on internet
it has a proxy feature to easily create test plan from browser navigation
It is easy to start up processes on other machines. It remote testing, can be done from GUI or console.
The scripts can be written in beanshell, java, or any jsr223 language ( groovy, Javascript, scala, jexl ...)
it has a lot of built- in samplers and thanks to its plugin architecture it's very Easy to add new ones or use any scripting engine to do what's missing
it has great user mailing list
it has very reactive support
it's now a top Level Apache
it can run thousands of users
professional solutions exist to run it from cloud
...
See:
Performing a Stress Test on Web Application?
Best way to stress test a website
How do you test the performance of a website?

Related

Performance Testing of APIs

Please could someone suggest:
I need to performance test a few APIs. Which of the below methods will be better way of conducting the tests (trying to understand the pros and cons of various ways to run JMeter tests):
Create Ultimate Concurrency Thread groups using only Jmeter.
Buy Blazemeter, add the Jmeter scripts, create scenario and run the tests
Run the JMeter tests using Maven plugin as part of the build.
Thanks,
N
Testing the performance of an API can be achieved by the above mentioned 3 ways.
Open Source: (Standalone JMeter/Taurus)
Cloud based solutions (Octoperf/Blazemeter)
If you are looking for an open source tool + you have your LG machine allocated + not gonna test with massive number of users - I would suggest to go with standalone JMeter/ taurus for your load testing solution.
If you are looking for an hassle free environment to manage all your test, LGs, reports, monitoring, etc then cloud based solutions like Blazemeter/Octoperf seems promising. This is going to cost you money and requires a port needs to be open for the solution to communicate with AUT.
For Scripting: You can use the same JMeter scripting in all 3 cases. Choosing a thread group requires what kinda test you wanna perform on your microsevrices.
In any case you will be using JMeter so points 2 and 3 don't really differ. The pro is that you don't have to pay. The con is that you need to manage your infrastructure yourself.
BlazeMeter provides easy way of launching a JMeter test so you don't have to worry about creating and configuring machines, installing JMeter, setting up distributed testing, real time monitoring and results comparison.
JMeter Maven Plugin makes the following processes easier:
installing JMeter
generating reporting dashboard
returning non-zero exit status code when acceptance criteria are not met

What are websites or applications for practicing performance testing from home

I want to practice performance testing at home using some load testing tool like jmeter. Can anybody tell me some links of websites or applications on which I can practice performance testing by throwing load by load testing tool from home?
It is not a LEGAL way to conduct load/stress test on any live websites/web applications without the permission.
So, you can deploy your own sample application or download sample applications available online and deploy it in your local server like Apache HTTP server or Apache Tomcat etc.
From my knowledge, You can use WebTours sample application from HP LoadRunner as an application to put your load.
Download HP Load Runner community edition from here. free for 50 vusers for life time. You need to create an account in the website.
You can download the webtours application from the HP website (comes with Apache HTTP server, which acts as a Web server).
Setup WebTours as per the instructions here
Confirm the successful installation/configuration by accessing the application from the browser (similar to http://localhost:8080/WebTours). The app is about flight booking (though not in real time ;) ).
Now, you can use the WebTours application as an AUT (Application Under Test)
Either you can continue with Load Runner or download latest JMeter version (3.1 as of now)
JMeter tutorials:
Getting Started
Component Reference
Builiding a Test plan
For Load Runner, there is documentation available in the following link to start with:
http://lrhelp.saas.hpe.com/en/12.53/help/WebHelp/Content/WelcomeContent/c_Welcome.htm
There is community support available managed by HP.
Use the sample applications which ship with the tool
Take your choice of open source application, install them on servers you own, manage and control. Use these applications as targets.
You are welcome to use api.jmeter.ninja. I built it for that purpose. A more formal API declaration is on it''s way but you can start with
http://api.jmeter.ninja/example.html.
http://api.jmeter.ninja/objects.xml
http://api.jmeter.ninja/objects/${OBJECT}.XML
Where ${OBJECT} is taken from the objects.xml page.
Or swap xml for dot json for the same in Jason format.
Exercises/Tutorial is available at http://api.jmeter.ninja/jmeter.pdf
Currently I just use this service for my own training sessions. But I hope to make it more generally available in the near future. There a currently no automatic limits so please just use your common sense and don't run high at throughput for a sustained periods of time. Anything under a total 100k requests is no problem.
Only caveat is that service is provided on a best effort basis at this point. Any abusive/problematic users may be blocked without notice.

100k HTTP Requests simultaneously

I have to test my rest API such that 100k API calls are made simultaneously(within 500ms).Any Idea how to simulate it?Utility to use?
I would suggest to use JMeter too, it enable your test to create multiple concurrent jmeter server. Just to be clear you can control multiple remote JMeter engines from a single JMeter client and replicate a test across many computers and thus simulate a larger load on the target server.
To be honest, your target is quite high (100k API calls simultaneously within 500ms), i.e. you'll need a lot of jmeter servers. When you create stress tests, there are not magical recipes, guides or manuals. Trial and error is a fundamental method of solving this kind of problems.
In my experience, I first try with few concurrent users and see how the server react. Then increase the number of concurrent users till to reach an intolerable performance decrease or, worst, a bottleneck .
http://jmeter.apache.org/usermanual/remote-test.html
You will obviously need a load testing tool which can be run in a distributed mode, i.e. 1 controller and X load generators executing the same test.
Grinder - scripts are written in some Python dialect
Apache JMeter - this guy doesn't require any specific knowledge, you can create tests using simple GUI
Tsung - is written in Erlang, known for capability to produce high loads even on low-end hardware.
See Open Source Load Testing Tools: Which One Should You Use? article for more information on above tools.
JMeter
The Apache JMeter™ application is open source software, a 100% pure
Java application designed to load test functional behavior and measure
performance. It was originally designed for testing Web Applications
but has since expanded to other test functions.

Software for performance tests on an http server

I have developped a HTTP web service which is queried by smartphone. I want to test the performances of all this service containing :
A java server (java 6, java + play framework)
A database (Mysql 5.1.41)
A Linux (ubuntu) server (kernell 2.6.32)
I have tried leading test campaigns using python scripts with many threads or sequential tests. But it's hard to have conclusions...
I want to be able to have the maximum number of request per second for my service, the average time for each request... complete dashboards displaying a lot of information
I can do many scripts to test that but I am shure that well-known softwares permits to conduct these tests. Ideally these softwares could also display information about where I loose time ...
Do you have hints ?
Thanks for your help
Some tools I've used for HTTP benchmarking
Apache Bench
Siege
JMeter
Of these, JMeter is probably best for the situation you describe. All of these display a lot of information, but won't explain where you lose time.
For that, I'd suggest a profiler such as JVisualVM (comes with the JDK) or YourKit. From a profile you can observe where you spend the most time and focus on optimizing that.

JMeter versus The Grinder? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I'm looking at stress testing our website and having trouble picking the right tool.
It looks to me like two of the most popular are JMeter and The Grinder. Can anyone help with reasons in favor of either?
Thanks!
I have worked a bunch with The Grinder and there are three main reasons I like it.
It's free. I assume from your question, you are only looking at free solutions. There are some excellent commercial products as well, but most of the time, I cannot justify the cost
It is easy to start up processes on other machines. When really trying to crank up load on a cluster, I need to easily distribute the load out to remote machines. Grinder is great for that.
The scripts are all Jython. That allows me to easily customize my scripts to programatically tweak my scripts (e.g. randomize certain paths).
I haven't used JMeter in a long time, so I cannot say authoritatively how it compares on points 2 & 3.
As of Jmeter:
It's free.
it's easy to Start with lot of documentation on its Website and on internet
it has a proxy feature to easily create test plan from browser navigation
It is easy to start up processes on other machines. It remote testing, can be done from GUI or console.
The scripts can be written in beanshell, java, or any jsr223 language ( groovy, Javascript, scala, jexl ...)
it has a lot of built- in samplers and thanks to its plugin architecture it's very Easy to add new ones or use any scripting engine to do what's missing
it has great user mailing list
it has very reactive support
it's now a top Level Apache project
...
Use gatling.
http://gatling-tool.org/
Its lovely, great DSL, and you can just edit the .scala files and rerun and it will compile for you on demand. Also emits very nice graphs
http://gatling-tool.org/sample/index.html
If you're not familiar with Jython (like I wasn't) then there is also a great little tool that comes with Grinder (the TCP Proxy or some such name) that allows you to click around in a webapp and save your actions as a ready-made Jython script for Grinder, which you can then analyse/edit/adopt as necessary.
There is an excellent blog post that describes
Load Test Tools:
Grinder 3.11
Gatling 2.0.0.M3a
Tsung 1.51
JMeter 2.11
The Grinder
The Grinder consists of two main parts:
The Grinder Console - This is GUI application which controls various Grinder agents and monitors results in real time. The console can be used as a basic IDE for editing or developing test suites.
Grinder Agents - These are headless load generators; each can have a number of workers to create the load
Key Features of the Grinder:
TCP proxy - records network activity into the Grinder test script
Distributed testing - can scale with the increasing number of agent instances
Power of Python or Closure combined with any Java API for test script creation or modification
Flexible parameterization which includes creating test data on-the-fly and the capability to use external data sources like files, databases, etc.
Post processing and assertion - full access to test results for correlation and content verification
Support of multiple protocols
Apache JMeter
Key Features of the JMeter:
Cross-platform. JMeter can be run on any operating system with Java
Scalable. When you need to create a higher load than a single machine can create, JMeter can be executed in a distributed mode - meaning one master JMeter machine will control a number of remote hosts.
Multi-protocol support. The following protocols are all supported ‘out-of-the-box’: HTTP, SMTP, POP3, LDAP, JDBC, FTP, JMS, SOAP, TCP
Multiple implementations of pre and post processors around sampler. This provides advanced setup, teardown parametrization and correlation capabilities
Various assertions to define criteria
Multiple built-in and external listeners to visualize and analyze performance test results
Integration with major build and continuous integration systems - making JMeter performance tests part of the full software development life cycle
I just went through the process of trying at both and I would totally agree with Rob here. Grinder also seemed faster, and I really like how simple and lightweight it is compared to Jmeter. The grinder.properties file is totally easy to use, especially if you're more of a console guys then a UI guy.

Resources