Follow Us on Twitter

Stress testing your APEX application

by Douwe Pieter van den Bos on October 5, 2009 · 0 comments

When we develop an externally available application using Oracle Application Express (or an APEX application for a large amount of users), one of the important things to do before we put the application in production is performing a stress test. This means that we will try to pretend that we are a lot of users that access the application at the same time. Today I used a particular great tool in order to do so, and it works like a charm! Using the jMeter application from Apache I just did a test where over one thousand users concurrently accessed the APEX application, and the performance stood out like the beast it is supposed to be.

Using jMeter in order to do some serious testing is really easy: just download it and start using. No, to be frank, there’s a little bit more to it than that. When using jMeter we need to set up some environments before we can start the actual testing. At first, we need to start off jMeter itself (obviously) by running the bin/jmeter.bat. This starts off a fresh jMeter instance and now we can edit it in order to use it for stress testing. Now we create a new Thread Group under the Test Plan in the left pane window. When you have done that, please create, under Workbench, a new http proxy server (add -> non-test elements -> http proxy server) which we will use to make jMeter understand the path we want it to check and test for us. In this proxy server, we only want to define two things: which port we want it to run on (just a port that’s not in use, I used 9009) and the URL patterns to include (here, we can make it ourselves pretty complicated, so don’t just enter .* to have it use all URL patterns). When we have done this, we need to configure the browser to use this proxy. In Firefox, just go to Extra -> Options -> Tab advanced -> Tab network and click on the button to configure http connections. Here add a manual proxy server and add the port number (in my case 9009) on localhost.

Once you have done this, go back to the jMeter instance and hit Start on the Proxy Server tab. Now go back to your Firefox and navigate the path in your APEX application you want to stress test. In the jMeter instance we immediately see the path pointed out for us under the thread group we created. When you have done the path you want to test (or just one page) go to the proxy server and stop it. Now we go to the Thread Group to edit this in order to make the pages run when we test them. On top of the tree we created using the proxy server, we need to create a http Cookie Manager (Add -> Config Element -> HTTP Cookie Manager) and at the bottom of the tree we can create a listener to make sure we get the intel we need once we’re done with our test.

I, personally, love colorfull lines and graphs, so I added a Graph (Add -> Listener -> Graph results). Now it’s time to roll! Go to the Thread Group in jMeter and hit a number: start off small, you can do the test as often as you would like to, so don’t be ashamed. In the Number of Threads field fill in a number of users that you want to connect to your pretty and awesome APEX application and go to Run -> Start do try and kill your server! Have fun with it!

Ratings:
VN:F [1.9.4_1102]
Rating: 0.0/5 (0 votes cast)

Leave a Comment

Previous post:

Next post: