Automated Acceptance Testing with Load Impact and TeamCity (New Plugin)

teamcity512

As you know, Continuous Integration (CI) is used by software engineers to merge multiple developers’ work several times a day. And load testing is how companies make sure that code performs well under normal or heavy use.

So, naturally, we thought it wise to develop a plugin for one of the most widely used CI servers out there – TeamCity by JetBrains. TeamCity is used by developers at a diverse set of industry leaders around the world – from Apple, Twitter and Intel, to Boeing, Volkswagen and Bank of America. It’s pretty awesome!

The new plugin gives TeamCity users access to multi-source load testing from up to 12 geographically distributed locations worldwide, advanced scripting, a Chrome Extension  to easily create scenarios simulating multiple typical users, and Load Impact’s Server Metrics Agent (SMA) for correlating the server side impact of testing – like CPU, memory, disk space and network usage.

Using our plugin for TeamCity makes it incredibly easy for companies to add regular, automated load tests to their nightly test suites, and as a result, get continuous feedback on how their evolving code base is performing. Any performance degradation, or improvement is detected immediately when the code that causes it is checked in, which means developers always know if their recent changes were good or bad for performance – they’re guided to writing code that performs well.

 

Here’s how Load Impact fits in the TeamCity CI workflow:CD-TeamCity

 

TeamCity-Button

 

Once you have the plugin installed, follow this guide for installing and configuring the Load Impact plugin for TeamCity. 

The Load Impact Session Recorder – Now Available as a Chrome Extension!

Start a load test with just a few clicks. Record all HTTP traffic and use the recordings to simulate real user traffic under realistic load.

The Load Impact Chrome extension will capture everything – every single thing being loaded into the browser as you click – including ads, images, documents, etc., so you get a far more accurate read of what’s going on.

Just press “record”, start browsing and when complete, the script will automatically upload to your Load Impact account.

Here’s how it works:

output_ZcOpmw

With the help of our Chrome extension, you can run up to 10 different users scenarios in each load test and simulate up to 1.2 million concurrent users.  You can also run the multiple user scenarios simultaneously from up to 10 different geographic regions in a single test (powered by Amazon and Rackspace).

Until now our session recorder required developers to go to our website and manually change the proxy settings in the browser or operating system to perform a recording. That was a bit of a hassle, and the proxy solution sometimes caused problems with SSL certificates.

The extension now automates the entire process, from recording traffic in a specific browser tab, to stopping, saving and sending the scrip to your Load Impact account for future use.

The Chrome extension is available free of charge from the Google Chrome Web Store and is easily ported to the Safari and Opera browsers.  An extension for the Firefox browser is planned for release early next year.

To use the Chrome extension, you will need to register for a Load Impact account at loadimpact.com.

HealthCare.gov tech taskforce is invited to use our load testing services free of charge

We’re offering to provide the technology taskforce responsible for fixing the troubled HealthCare.gov website free use of our performance testing services until the Obamacare website is functioning at full capacity.

Healthcare .gov

In testimony before the House Energy and Commerce Committee on Thursday, officials of companies hired to create the HealthCare.gov website cited a lack of testing on the full system and last-minute changes by the federal agency overseeing the online enrollment system as the primary cause of problems plaguing the government exchange for President Barack Obama’s signature health care reforms.

Moreover, according to a confidential report obtained by CNN, the testing timeframes for the site were “not adequate to complete full functional, system, and integration testing activities” and described the impact of the problems as “significant.” The report stated there was “not enough time in schedule to conduct adequate performance testing” and was given the highest priority.

We know that there’s really nothing new in the failure of the Obamacare site. Websites have been developed that way for years – often with the same results. But there are now new methodologies and tools changing all that. That’s why  we’ve reached out to our California representatives and all of the companies involved to let them know we’re ready to provide our stress testing services to them free of charge.

It isn’t like it used to be – this shouldn’t be hard, time consuming or expensive. You just need to recognize that load testing is something that needs to be done early and continuously throughout  the development process. It’s not optional anymore. Unfortunately, it seems they found that out the hard way. But we sincerely want to help make it work.

HealthCare.gov represents hope for many Americans, and the elimination of their worst fears in medical care. Instead of whining about how incompetently HealthCare.gov has been built, we want to be part of making it work as it should and can.

Write Scalable Code – use Jenkins to Automate your Load Testing

Starting today, we’re  accepting applications for early access to our new Load Impact Continuous Delivery service, which for the first time allows developers of websites, apps and APIs to make stress testing an integrated part of their continuous delivery process.

Our Continuous Delivery service comprises our API, SDKs and a library of plug-ins and integrations for popular continuous delivery systems – starting with Jenkins.

Easy to USe and Flexible Graph png

In order to better serve our customers and allow them to integrate their Continuous Delivery methodology with the Load Impact platform, we’re building programming libraries that make the API super easy to use. We’re starting with Jenkins and will soon rollout plug-ins for TeamCity, New Relic and CloudBees.

Simply put, the Jenkins plug-in will integrate load testing into developers’ automated Jenkins test suite to determine whether new builds meet specified traffic performance criteria.

(Download the plug-in)

The new Jenkins plug-in features multi-source load testing from up to 12 geographically distributed locations worldwide, advanced scripting, a GUI based session recorder to easily create tests simulating multiple typical user scenarios, and our new Server Metrics Agent (SMA) for correlating the Server Side impact of users on CPU, memory, disk space and network usage.

Read more about how to automate your load testing here and here.

Apply now to join our private beta group and receive FREE unlimited load testing for the duration of the beta period!

Know your node.js

As part of a follow up to last months column about PHP vs Node.js, I hit some problems with Node under load. As with all technologies, Node.js does have some limitations that may or may not be a problem for your specific use case. If the last column about comparing PHP and Node.js had a deeper message, that message would be that if you want to scale you have to know your stack. To be completely clear, when I say stack I mean the layers of technology used to server http requests. One of the most common stacks out there are simply called LAMP – (L)inux (A)pache2 (M)ySQL (P)HP (or Perl). You now see a lot of references to LNMP, where Apache2 is replaced with Nginx. When building Node.js applications, things can vary a lot since node.js comes with it’s own http server. In my previous text, I used Node.js together with MySQL on a Linux box, so I guess we can dub that the LNM stack if we absolutely need to have a name for it. And when I say Know your stack. I mean that if you want to produce better than average performance numbers, you have to be better than average in understanding how the different parts in your stack works together. There are hundreds of little things that most of us never knew mattered that suddenly becomes important when things come under load. As it happens, watching your application work under load is a great way to force yourself to know your stack a little better.

Background

When testing Apache/PHP against Node.js, I found that the raw performance of Node.js as well as the ability to handle many concurrent clients was excellent. Faster and more scalable than Apache2/PHP. One reader pointed out that the test wasn’t very realistic since there was just one single resource being queried and there was no static content involved. Apache2/PHP could very well relatively better if some of the content was static. So I set up a test to check this and while running this. Node.js crashed. As in stopped working. As in would not server any more http reqeusts without manual intervention. So to keep it shord, Apach2/PHP won that round. But in the spirit of ‘know your stack’, we need to understand why Node.js crashed. The error message I got was this:

Unhandled 'error' event "events.js:71"

First of all, it took a fair amout of googling to figure out what that the error message was really about. Or, rather, the error message was saying that something happened and there’s no error handler for it. So good luck.

Fixing it.

The first indication I got via Google and Stack Overflow was that this may be an issue with Node.js before 0.8.22 and sure enough, I was running 0.8.19. So the first thing I did was upgrade to version 0.8.22. But that did not fix the problem at all (but a later and greater version is of course a nice side effect). With almost all other software involved being up to date, this actually required some structured problem solving.

Back to the drawing board

I eventually managed to trace the error message down to a ‘too many open files’ problem which is Interesting as it answers the crucial question: What went wong? This happened at roughly 250 concurrent users with a test that was accessing 6 different static files. This is what it looks like in LoadImpact:

node_failed_test

So a little depending on timing, and exactly when each request comes in, it would roughly indicate that some 1500 (6 files times 250 users) files can be open at the same time. Give or take. Most Linux systems are, by default, configured to allow relatively small number of open files, e.g. 1024. The Linux command to check this is ulimit:

$ ulimit -n
1024

1024 is the default on a lot of distros, including Ubuntu 12.10 that I was running the tests on. So my machine had 1024 as the limit but it appears that I had 1500 files open at the same time. Does this make any sense? Well, sort of, there are at least 3 factors involved here that would affect the results:

  1. Load Impact simulates real browsers (Virtual Users). A VU user only opens 4 concurrent connections to the same server even if the script tells it to download 6 resources. The other 2 resources are simply queued.
  2. Each open TCP socket counts as an open file. So each concurrent TCP connection is an open file. Knowing that our limit is 1024, that would indicate that node.js could handle up to 256 concurrent users if each user uses the maximum of 4 open connections.
  3. In our sample, the requests for static resources also opens a file and thereby occupies another file handle. This file is open for less time than the actual connection, but still, under a certain time, a single request can consume 2 open file handles.

So in theory, the limit for concurrent simulated browser users should be 256 or less. But in reality, I saw the number of concurrent users go all the way up to 270 before the Node.js process died on me. The explanation to that is more likely than anything just timing. Not all VU’s will hit the server at exactly the same time. At the end, hitting problems when running about 250 concurrent users reasons well with the open files limit being the problem. Luckily, the limit of number of open files per process is easy to change:

$ ulimit -n 2048

The next test shows real progress. Here’s the graph:

node_better_test

Problem solved (at least within the limits of this test).

Summary

Understanding what you build upon is important. If you choose to rely on node.js, you probably want to be aware of how that increases your dependency on various per process limitations in the operating system in general and max number of open files in particular. You are more affected by these limitations since everything you do takes place inside a single process. And yes. I know. There are numerous of more or less fantastic ways to work around this particular limitation. Just as there are plenty of ways to work around limitations in any other web development stack. The key thing to remember is that when you select your stack, framework, language or server, you also select all the limitations that comes with it. There’s (still) no silver bullet, even if some bullets are better out of the box than other. Having spent countless of hours with other web development languages, I think I’m in a good position to compare and yes indeed! Node.js delivers some amazing performance. But at present, it comes with a bigger responsibility to ‘Know Your stack’ than a lot of the others.

Load generation from Australia

A few days ago Amazon announced the availability of its new AWS data center in Sydney, Australia. We here at Load Impact are now happy to announce that we have implemented support for load tests from the Sydney data center.

This means that we are now able to generate simulated user traffic from 8 different locations around the globe:

  • Palo Alto, California, USA
  • Portland, Oregon, USA
  • Ashburn, Virginia, USA
  • Sao Paolo, Brazil
  • Dublin, Ireland
  • Singapore, Singapore
  • Tokyo, Japan
  • Sydney, Australia

You are of course also able to use multiple locations where your traffic is generated, in a single load test. This is something unique to Load Impact that other services don’t offer.

Some other new things we have released recently include:

  • Parallel deployment of test configurations for large tests – This will drastically reduce the time it takes to start larger load tests. Where previously we configured all involved load generator cloud instances in a load test sequentially, we now configure them in parallel.
  • Graceful test shutdown – Previously, when a test was completed, the load generator instances would be killed abruptly. This meant that tests usually ended at the exact moment they were supposed to, but it also meant that some transactions that were “in transit” would never be recorded by Load Impact, even though they might appear in the logs on the web server. To make this less likely to happen, we have now started shutting down tests more gracefully than before, waiting a little bit for all simulated clients to be done with their current transactions. This means that while earlier, all clients in a test would just disappear when the test ended, you will now see a short ramp-down period where the number of clients ramps down quickly from whatever level you were at, to zero.
  • Various bug fixes and improvements – We have implemented lots of smaller bug fixes and improvements, for example in script validation, script conversion, user session handling, etc.

New updates

The world’s best load testing service gets even better!

Yesterday, on Aug 2, we pushed a small update that included the following features and changes:

  • Ramp-up restrictions removed
    You can now ramp up or down the number of simulated users in a test as quickly as you like (well, almost – a ramp operation can be done in as little as 1 minute now).
  • Ramp steps can be any length
    Previously, a single ramp-up/down step could have a duration of max 120 minutes. This limit has been removed. There is now just a single limit for the whole test schedule, which can be max 24 hours (1440 minutes).
  • Changed default values for tests
    All defaults for test configurations, are now to ramp up to 50 VU during 10 minutes (previously, an automatically created test configuration would ramp up to 50 VU during 15 minutes, while a new test configuration created by a user would by default ramp up to 25 VU during 10 minutes).
  • New load script API functionality: auto_cookie_handling
    There is now a new boolean option that can be set with http.set_option() – “auto_cookie_handling”. It is set to true by default, but if set to false it will turn off the automatic handling of cookies between requests, allowing the script programmer to design his/her own cookie management.
  • Load generator bug fix
    Fixed an intermittent bug caused by issuing sleep statements with sleep time set to zero.
On June 20, we pushed another small update that included these changes:
  • Several proxy recorder bug fixes:
    • Fixed problem with injected toolbar appearing in the wrong place
    • Fixed problem with extra HTML added
    • Fixed problem with proxy sometimes generating extra CRLF’s to requests
  • New page on site: The state of web readiness 2012
    http://loadimpact.com/readiness
  • Company address on invoices
    You now get your company’s address on your receipts/invoices, viewable online at loadimpact.com
On June 8, we released Load Impact 2.4 that contained the following fixes and improvements:
  • New load script API functionality
    In this release we introduced a range of new API functions:

    • client.get_user_scenario_name() – returns name of currently executing user scenario
    • client.get_time_since_start() – returns elapsed time since the simulated user started executing
    • client.get_source_ip() – returns the source IP address seen in network traffic generated by this user
    • test.get_name() – returns the name of the currently running load test
    • test.get_time_since_start() – returns elapsed time since start of test execution
    • util.unique() – returns a string guaranteed to be unique across simulated clients in a test
  • Extra IP addresses
    You can now configure your load test to use more source IP addresses when generating traffic. This comes at an extra cost as it requires more infrastructure (cloud) resources, but can be very useful for e.g. spreading traffic evenly if you have a load balancer.
  • Small UI changes
    Several minor UI tweaks & fixes:

    • Changed “Test title” to “Test name”, for consistency
    • Fixed inconsistent naming of load zones. Load zones are now named as: CITY, COUNTRY CODE (PROVIDER)
      E.g. “Ashburn, US (Amazon)”
  • Bugfixes
    • Fixed broken resend email activation link
    • Fixed bug allowing tests to be scheduled up to 1 hour in the past
    • Fixed pagination bug in URL table on test results page
    • Fixed deployment bug affecting graphical editor user scenarios containing Unicode characters
    • Fixed bug causing screen to gray out in certain cases when selecting script editor for new user scenario

The State of Web Readiness 2012

For the moment we are attending the O’Reilly Velocity Conference in Santa Clara, where we have launched our brand new report “The State of Web Readiness 2012”.  In short the report covers how robust sites are based on 8,522 load tests executed in 132 countries. We found out that the average site was load tested at up to 3.4 times the actual capacity. What does that mean? Well the short summary is that a large part of the websites in the world might not stand up to what site owners expect of them.

This is actual data from actual load tests conducted with our own cloud-based online load test tool and frankly, we were a bit concerned with the findings of our study. Not that we are surprised that websites go down when we need them the most. Even though web sites have been a mainstream occurrence for over 15 years, we don’t lift an eyebrow when Apple Store crashes when a new iPhone-model is released. And if even the largest company in the world isn’t able to provide a premium sales channel that performs reliably, then who is, right? It almost seems unavoidable that websites go down. Like a natural disaster you can’t prepare for.

Our analysis indicates something else. After going through 8,522 actual tests we believe that you can be prepared with the right knowledge. The analysis shows that an important factor in the unreliable web is simply overconfidence about how many visitors websites can really handle. If you haven’t done the tests and you still think your website will continue to work unaffected during a hot product launch, a seasonal peak in interest or if you are luckily beeing “slashdotted”, think again!

Have a look at our report here. And we’re looking forward to hear more about what you think about the state of web readiness.

New partner in Benelux

Today we’re proud to announce that we have signed a premium partnership agreement with Systemation in Benelux, one of the leading distributors in integration testing and quality assurance in northern Europe. 
As you might already know, we provide a full-scaled partner program in priority markets in the U.S., Europe and Asia. Together with partners like Systemation we can reach out much faster to clients in need of efficient load testing. As a Premium Partner, Systemation will actively represent, sell and implement customer projects for the Benelux market.
Systemation acts as distributor in the Benelux countries for several leading international software companies like Load Impact. Together with the software solutions Systemation provides their clients with a comprehensive suite of professional services, including implementation, local technical support and software maintenance.
Jaap Franse, Managing Director of Systemation, states the following concerning our partnership:
“We are proud to add the world class Load Impact solution to our portfolio of services. This marks a significant step in supporting our customers when executing performance tests for their business critical web applications.”
So if you’re active in the Benelux market and in need for performance testing, contact Systemation directly.

Load Impact 2.3 released!

We’re happy to introduce Load Impact 2.3!

Load Impact 2.3 contains a new and improved proxy recorder that automatically detects pages and creates page load time result metrics for each of your web pages. The recorder also allows you to insert code comments in the generated user scenario, which can be useful in order to find where in your user scenario code a certain page is being loaded.

Behind the scenes, Load Impact 2.3 also includes a lot of optimizations that result in a much faster reporting interface, especially for large tests that generate a lot of results data these optimizations will make a huge difference to how snappy the “view test” page feels. And for live tests, the reporting page will also be a lot smoother. In fact, Load Impact 2.3 is a major rewrite of the underlying storage subsystem and how data is being accessed by the user interface code. More things are loaded on-demand now (i.e. as/when needed) and this results in a page that is much lighter on the client computer. You should now be able to view even the largest tests on the flimsiest of laptops.

Other improvements you will find in 2.3 include:

 

  • Graphical editor support for data stores, custom metrics and other new API functionality
  • Several API updates – http.page API functions, named parameters, etc.
  • You can now plot graphs of load generator CPU and memory usage during the test!
  • The URL list on the report page now displays bytes received and compression ratio
  • Content type classification now uses the Content-Type header
  • Click the pie charts to highlight different objects in the URL list on the test report page
  • Many bug fixes…

 

About Load Impact

Load Impact is the leading cloud-based load testing software trusted by over 123,000 website, mobile app and API developers worldwide.

Companies like JWT, NASDAQ, The European Space Agency and ServiceNow have used Load Impact to detect, predict, and analyze performance problems.
 
Load Impact requires no download or installation, is completely free to try, and users can start a test with just one click.
 
Test your website, app or API at loadimpact.com

Enter your email address to follow this blog and receive notifications of new posts by email.