Rectangle 27 1

As per your Test Plan description, you can use 1 of the timers mentioned below:

JMeter: delay between each thread request a sampler - Stack Overflow

jmeter delay
Rectangle 27 3

In code of WebService Soap sampler it is said that:

// It is not possible to access the actual HTTP response code, so we assume no data means failure

// It is not possible to access the actual HTTP response code, so we assume no data means failure
            if (length > 0){
                result.setSuccessful(true);
                result.setResponseCodeOK();
                result.setResponseMessageOK();
            } else {
                result.setSuccessful(false);
                result.setResponseCode("999");
                result.setResponseMessage("Empty response");
            }

So you don't have a solution with this sampler.

Another solution is to use HTTP Sampler with Raw Post Body and test only response code with assertion.

web services - Call an async fire and forget SOAP webservice with JMet...

web-services soap jmeter
Rectangle 27 15

Performing a Stress Test on Web Application? - Stack Overflow

web-applications stress-testing performance webapplicationstresstool pylot
Rectangle 27 4

The only way to get Beanshell PostProcessor failure in the test results is amending parent sampler result setting it to "Failure" at the Beanshell script beginning and to "Success" at the script failure, something like:

prev.setSuccessful(false);
//your main Beanshell code goes here
prev.setSuccessful(true);

So if any Beanshell error will occur in-between these prev.setSuccessful methods - the parent sampler will be failed.

Given your test relies on scripting I would recommend switching to JRS223 Test Elements and Groovy language, it will be much better from performance perspective, see Groovy Is the New Black article for more information, benchmarks, and scripting best practices.

Thanks. Apparently faster and got better error reporting, which is nice, however this approach still requires active effort to code the script in a specific way to capture such failures. As a developer, I see it as a job for the platform itself, after all the interpreter was executed and knows if errors were present, so why can't such information be used to abort the test or set a failure instead of forcing the developer to use tricks to reach the same result? Anyway, thanks for your answer, it is my best alternative so far.

java - JMeter doesn't fail on BeanShell errors - Stack Overflow

java jmeter jmeter-plugins beanshell
Rectangle 27 3

This is a regular behaviour of JMeter Test Script Recorder, it removes:

http.authentication.preemptive$Boolean=true

And add in user.properties:

hc.parameters.file=<full path to hc.parameters>

java - Why jmeter recording does not capture Basic Authorization relat...

java node.js jmeter integration-testing superagent
Rectangle 27 6

Check out JMeter WebDriver http://jmeter-plugins.org/wiki/WebDriverTutorial/ . You can define one parallel to your load test in order to gauge performance perceived by the client while the server is under load.

Web Driver Sampler automates the execution and collection of Performance metrics on the Browser (client-side). A large part of performance testing, up to this point, has been on the server side of things. However, with the advancement of technology, HTML5, JS and CSS improvements, more and more logic and behaviour have been pushed down to the client. This adds to the overall perceived performance of website/webapp, but this metric is not available in JMeter. Things that add to the overall browser execution time may include:

Client-side Javascript execution - eg. AJAX, JS templates CSS transforms - eg. 3D matrix transforms, animations 3rd party plugins - eg. Facebook like, Double click ads, site analytics, etc All these things add to the overall browser execution time, and this project aims to measure the time it takes to complete rendering all this content.

javascript - How to approach "end-client" performance testing on singl...

javascript performance testing single-page-application performance-testing
Rectangle 27 104

JMeter is an open-source load testing tool, written in Java. It's capable of testing a number of different server types (for example, web, web services, database, just about anything that uses requests basically).

It does however have a steep learning curve once you start getting to complicated tests, but it's well worth it. You can get up and running very quickly, and depending on what sort of stress-testing you want to do, that might be fine.

  • Open-Source/Free tool from the Apache project (helps with buy-in)
  • Easy to get started with, and easy to use once you grasp the core concepts. (Ie, how to create a request, how to create an assertion, how to work with variables etc).
  • Very scalable. I've run tests with 11 machines generating load on the server to the tune of almost a million hits/hour. It was much easier to setup than I was expecting.
  • Has an active community and good resources to help you get up and running. Read the tutorials first and play with it for a while.
  • The UI is written in Swing. (ugh!)
  • JMeter works by parsing the response text returned by the server. So if you're looking to validate any sort of javascript behaviours, you're out of luck.
  • Learning curve is steep for non-programmers. If you're familiar with regular expressions, you're already ahead of the game.
  • There are large numbers of (insert expletive) idiots in the support forum asking stupid questions that could be easily solved if they'd give the documentation even a cursory glance. ('How do I use JMeter to stress-test my Windows GUI' shows up quite frequently).
  • Reporting 'out of the box' leaves much to be desired, particularly for larger tests. In the test I mentioned above, I ended up having to write a quick console app to do some of the 'xml-logfile' to 'html' conversions. That was a few years ago though, so it's probable that this would no longer be required.

please clarify, if JMeter can help you test application installed on a remote VPS ? I'm not sure as it is desktop version

Another JMeter related option to be aware of is JMeter as a service. These types of SaaS provide highly scalable JMeter together with much improved reporting.

I disagree that JMeter is very scalable. A million requests per hour is merely 278 requests/second, which - for being run on 11 machines - is extremely low compared to other tools. I would actually put JMeter's scalability on the Cons side.

Performing a Stress Test on Web Application? - Stack Overflow

web-applications stress-testing performance webapplicationstresstool pylot
Rectangle 27 1

Try ZebraTester which is much easier to use than jMeter. I have used jMeter for a long time but the total setup time for a load test was always an issue. Although ZebraTester isn't open source, the time that I have saved in the last six months makes up for it. They also have a SaaS portal which can be used for quickly running tests using their load generators.

Performing a Stress Test on Web Application? - Stack Overflow

web-applications stress-testing performance webapplicationstresstool pylot
Rectangle 27 1

Your test seems to be badly designed, concurrent writing into the same file is not something recommended, you should have ReadWriteLock implementation or use JMeter's Critical Section Controller to ensure that only one thread is writing something into the file at a time.

Another option is running your CSV file creation logic before you will attempt to read the lines.

The third (and IMHO) the best solution is getting rid of the file, write everything into JMeter Variable(s) or properties and read the values from memory when required. I would also recommend considering switching to JSR223 PostProcessor and Groovy language as for your scenario Groovy will provide much better performance than you can achieve using Beanshell, see Groovy Is the New Black article for details.

I am not able to store it in memory, cause I use this CSV file in another tests for logging into application. I will try Critical section controller. And maybe I can rewrite it into Groovy as well.

csv - jMeter BeanShell postprocessor synchronization - Stack Overflow

csv synchronization jmeter beanshell post-processor
Rectangle 27 3

You may take a look at JMeter which is a free Java based desktop application allowing you to load test any web application. Another free tool is The Grinder.

Thanks, these are interesting and may be useful to me, but I'm really looking for solutions that will be able to pinpoint bottlenecks/candidates for optimisation within the application code.

There are some good profilers such as ANTS Profiler from Redate or dotTRACE from JetBrains but they are commercial. They provide trial versions that might be worth checking though.

ASP.NET MVC Application performance profiling - Stack Overflow

asp.net-mvc performance
Rectangle 27 1

#!/bin/bash
 NOW=$(date +"%m-%d-%Y")
 jmeter -n -t ~/tests/TP_Login_api.jmx -Jusers=12 -Jhost=devops1 -Juser_file=users_max.csv -Jaccount=max -l /results/results_TP_Login_api_$NOW.csv -e -o/results/report/TP_Login_api

java - How to add date to JMeter csv result file while running in comm...

java performance jmeter performance-testing
Rectangle 27 1

Use the following Regular Expression Extractor configuration:

sessionToken
"sessionToken": "(.+?)"
$1$

Refer the extracted value as ${sessionToken} where required.

How to write regex to extract a value from json response and pass it t...

json regex jmeter
Rectangle 27 9

We recently started using Gatling for load testing. I would highly recommend to try out this tool for load testing. We had used SOASTA and JMETER in past. Our main reason to consider Gatling is following:

  • Using Akka and Netty which gives better performance compare to Jmeter Threading model
  • Easy to write the tests, don't scare if it's scala.

Let me give you simple example to write the code using Gatling Code:

// your code starts here  
val scn = scenario("Scenario")  
     .exec(http("Page")
     .get("http://example.com")) 
// injecting 100 user enter code here's on above scenario.   
setUp(scn.inject(atOnceUsers(100)))

However you can make it as complicated as possible. One of the feature which stand out for Gatling is reporting which is very detail.

Performing a Stress Test on Web Application? - Stack Overflow

web-applications stress-testing performance webapplicationstresstool pylot
Rectangle 27 3

Blaze meter has a chrome extension for recording sessions and exporting them to JMeter (currently requires login). You also have the option of paying them money to run it on their cluster of JMeter servers (their pricing seems much better than LoadImpact which I've just stopped using):

I don't have any association with them, I just like the look of their service, although I haven't used the paid version yet.

Performing a Stress Test on Web Application? - Stack Overflow

web-applications stress-testing performance webapplicationstresstool pylot
Rectangle 27 57

If you're just testing your APIs manually, we've found RestClient 2.3 or the Poster add-on for Firefox to be pretty helpful. Both of these let you build requests that GET, PUT, POST, or DELETE. You can save these requests to rerun later.

For simple automated testing try the Linux (or Cygwin) 'curl' command in a shell script.

Thanks Jim! I'm currently using cURL and some bash scripts but wanted to just have the tests saved in one place (like a json or xml file that I can put in /tests/ directory of my app) and then something that allow me to re-run those tests while I develop. Will test Poster and RestClient

I wrote a REST client plugin called Requester for Sublime Text, github.com/kylebebak/Requester. It's inspired by HTTPie and Postman. It's very powerful and easy to use, and it's cross-platform. If you're not in love with your HTTP client it's definitely worth a try.

What tools do you use to test your public REST API? - Stack Overflow

api rest qa functional-testing soapui
Rectangle 27 2

If I were you I would use XDebug to track down which parts of your application ar eating the time and causing the failed requests.

Since you are on windows ( i presume ) then you can use a handy little program called WinCacheGrind to open and review the output files. It will show you, line by line or function by function, exactly how long the different blocks of code in your application take to run.

If you find that there is nothing surprising in the grind then that is the time to start looking at the environment.

Hello, Ben. Thank you for the reply. I have already used XDebug for debugging purporses during writing the code, and I'm quite sure that my script is as fast as possible. I will look at WinCacheGrind (it's very interesting to face new useful tools) but from my point of view the problem is in the environment.

By the way, I also tried to use Alternative PHP Cache downloaded from here but Apache has some problems - it doesn't respond after 1000-1500 requests. In its error.log I can see that some threads were unable to be finished correctly, and a little bit later get the message that they have been terminated.

Finally, there are problems with environment. Windows is not suitable to be used as secure server platform for PHP with port of memcached.

Now come on - Windows isn't really a suitable server full stop now is it? lol!

Although I am sorry that I couldn't help more - I do run both windows and linux servers but I have never experienced a problem like yours - although I have not tried using Memcached on the windows box ... looks like its experimentation time!!

Load testing of PHP script on Windows + Apache + PHP thread safe with ...

php windows apache thread-safety jmeter
Rectangle 27 3

You asked this question almost a year ago and I don't know if you still are looking for another way of benchmarking your website. However since this question is still not marked as solved I would like to suggest the free webservice LoadImpact (btw. not affiliated). Just got this link via twitter and would like to share this find. They create a reasonable good overview and for a few bucks more you get the "full impact mode". This probably sounds strange, but good luck pushing and braking your service :)

Performing a Stress Test on Web Application? - Stack Overflow

web-applications stress-testing performance webapplicationstresstool pylot
Rectangle 27 1

hi Zemike, can u give more description about write realization of protocol or any good tutorial for it

I don't remember tutorial about it. If shortly, you must write class that implement "JavaSamplerClient" interface of JMeter, compile your project and put in jmeter/lib/ext. Then in JMeter you must select sampler "JavaRequest". It has dropdown list where you can choose your class. Interface has four methods: 1) describe sampler arguments 2) runTest is method going through cycles 3) setup is executed before runTest 4) tearDown after runtest

testing - load test of secured web-service - Stack Overflow

web-services testing security load-testing ws-security
Rectangle 27 22

A little late to this party. I agree that Pylot is the best up-and-coming open source tool out there. It's simple to use and is actively worked on by a great guy (Corey Goldberg). As the founder of OpenQA, I'm also happy that Pylot now is listed on our home page and uses some of our infrastructure (namely the forums).

However, I also recently decided that the entire concept of load testing was flawed: emulating HTTP traffic, with applications as complex as they have become, is a pain in the butt. That's why I created the commercial tool BrowserMob. It's an external load testing service that uses Selenium to control real web browsers when playing back load.

The approach obviously requires a ton more hardware than normal load testing techniques, but hardware is actually pretty cheap when you are using cloud computing. And a nice side effect of this is that the scripting is much easier than normal load testing. You don't have to do any advanced regex matching (like JMeter requires) to extract out cookies, .NET session state, Ajax request parameters, etc. Since you're using real browsers, they just do what they are supposed to do.

Sorry to blatantly pitch a commercial product, but hopefully the concept is interesting to some folks and at least gets them thinking about some new ways to deal with load testing when you have access to a bunch of extra hardware!

Performing a Stress Test on Web Application? - Stack Overflow

web-applications stress-testing performance webapplicationstresstool pylot
Rectangle 27 12

Maybe you should give JMeter a try.

yes, we are currently using Jmeter

Benchmarking/Performance testing of the API - REST/SOAP - Stack Overfl...

api rest soap benchmarking