Thứ Sáu, 3 tháng 4, 2015

How to stress test this chat application

I am creating a chat application with node.js and socket.io. I want to know how many chatters my application can handle.
What I want to know is what will happen to CPU and memory on the server having 10,100,1000,10000,100000 chatters talking to each other and see if the application and server can handle this much connections. I also want to know if the messages these chatters send will be progressed as they should.
I'm testing my application with Cucumber and Selenium. With Cucumber/Selenium I could open a few browser windows and start chatting, but I guess this would not be a good solution testing it with 1000 or more chatters. Though this would be ideal to test with because I can use real scenarios.
I have also looked at ab but I am not very sure if it can test the application itself or just create a lot of connections.
What would be the best way to test and are there good tools for testing this?
shareimprove this question

   
Welcome to SQA, Klaasvaak. What do you mean by, "if the messages these chatters send will be progressed as they should"? –  user246 Dec 19 '12 at 16:01
   
With that I mean the functionality I made should keep working if there are a lot of users. –  Klaasvaak Dec 19 '12 at 16:57

2 Answers

As I understand it, you have two requirements: a load requirement (simulate up to 100,000 simultaneous chats; determine whether chatters can connect) and a functional requirement (determine whether the chats are processed correctly). You will probably use different technologies for the two of those.
For the load requirement, you want something that can handle initiating and communicating over lots of simultaneous connections. ab appears measure how many of the same request the server can handle simultaneously. Presumably your chat protocol is more complicated than that. For example, I suspect the chat application has to start by logging in.
I assume you are looking for an open source solution. There are plenty of those available, but you might start by looking at JMeter and The Grinder.
For the functional requirement, you may want to use Selenium since you are already familiar with it. You do not need 100,000 of these -- just one (or a handful) should suffice.
shareimprove this answer

   
Thanks for your answer. You are right about Selenium use for functional requirement. I was just thinking to use it for load testing, which would be a little difficult... I will take a look at JMeter and The Grinder and let you know if this is what I was looking for. –  Klaasvaak Dec 19 '12 at 17:00
use Jmeter and recording with proxy. Set proxy to internet explorer as all app shared that settings. And depend on the chat application, you can create a test case and then run that. For basic idea on jmter, you may see my blog(http://shantonusarker.blogspot.com/p/jmeter.html) or you may mail to me.
Thanks
shareimprove this answer

Không có nhận xét nào: