I'm facing an untraceable problem in creating a 50 users load test on a JSF web application.
The approach that I'm following is this:
- Writing a test script in Eclipse using Selenium RC API.
- Exporting the test script as JAR and placing it in JMeter's /lib/junit folder.
My Test plan in JMeter is:
"Test Plan"
Thread Group
JUnit Request.
- jp@gc - Perfmon Metrics Collector.
- View Results Tree.
I either start Perfmon Metrics Collector serverAgent on the QA local build server OR the Amazon EC2 medium instance of the application, and add the server's IP and port number (where serverAgent is running) in the Perfmon Metrics Collector listener in my JMeter client.
Since the sampler I've used is a JUnit request, I've managed multiple users through Selenium code. Here's sample Selenium script. On the JMeter console, I provide the number of threads in the Thread group.
Along with Perfmon metrics collector, I'm using the command:
top | grep java
on the server's terminal to check the load.
- I run Selenium server before I start the JMeter test case.
Now, the problems I'm facing are:
- I can't run the test plan in JMeter for more than 4-6 users (thread) on one machine because for n users, the selenium server creates 2n instances of the browser. (in my case, Chrome) which actually kills the CPU if the users are more than 6! So, here what i've done is I've installed JMeter on 6 machines to create atleast a 30- 36 users load. But that too doesn't work well.
- Perfmon metrics collector shows high load, whereas the
top | grep java
command run on the application server shows no load / little load. So i'm not able to understand if the test is actually causing load on the application or not. - If i have 10 users manually using the application to create a load, that shows a good amount of load on the Amazon EC2 small instance of the application. And the same is not happening with automated load tests.
I know and have read that Selenium should not be used for load testing because it is not designed for load testing. The only reason why I'm using Selenium scripts with JMeter is JMeter alone is not working with JSF application due to JSessionID and ViewState issues that come up when I run proxy-recorded test cases on JMeter.
So, is there any other way I can create a real load on the JSF application with some other tool / some other approach without bothering about JSessionID and ViewState?
Suggestions/corrections will be extremely helpful. If any more inputs related to my query are needed please point them out. I'm a newbie in automation and load testing, kindly bear with me if I didn't explain things properly.