Monthly Archives: April 2010

Stress Testing the application!

Yesterday I needed to quickly test one of web modules for performance. Easiest way was to do some stress testing, simulate real world environment (100 users hitting url at the same time) and then checking the service response time. It looked simple, I just needed a stress-testing tool, which could take url of my webpage and return me the performance data. But it turned out much more complex than that.

First shock came when I came to know that not many professionals are doing stress testing for their applications. I checked with some of my friends and got the same answer that they were not doing stress testing. How could I blame others when I did stress testing for one of my applications like 4 years ago.

Anyway, I knew that I would have to figure out things from scratch. I was told about Apache Benchmark (ab).  That looked promising to start with and I was able to get some performance data for static sites. But I was not able to look at the output, that ab was bringing back from the site. I tried to figure out how to check it for some time, but it turned out to be complex process, and I wanted to get over with the testing as soon as possible as other pending work was waiting.

So I though of using some UI based tool rather then command based (that’s the disadvantage of getting used to Windows). I googled around and found Jmeter, which looked very promising, and my kind of tool (open source). Again it started off well. And this time I was able to get back the output. The Jmeter could show the output in multiple formats, including HTML. This also helped to see that the output I was getting back from website was actually an error message instead of the correct page. The tool was showing the test case as success, because the error message was actually embedded in the correct HTML page (based on some conditions, it was to be shown or hidden). Now I figured out that this was because the tool was not able to set values in session for multiple test cases. Jmeter looked promising and I was sure that there must be some place where I could set the session settings (it had a lots of settings options for cache/ cookies etc). But too many setting options could only confuse. I again spent a couple of hours on this tool before giving up.

Time was running out, and I needed a tool that could help me testing my application without much complexity. So I thought of trying trial version (14 days or some limited features) of some paid software, when I figured out webserver stress tool’s. That worked like piece of cake. All the required settings were just 3-4 screens. Setting up sessions meant just checking the check-box for cookies. Clear output files with detailed logs, Summary log, and logs for each user simulated, url logs etc made it easier to compare different performance parameters. The paid version is also cheap (less than 250$) for this.

Anyone has better ideas for load/ stress/ performance testing of the application?

Creating a website, in less than an hour, for free

Over the weekend a friend discussed his idea of creating a web portal for some specific services with me. The failed entrepreneur in me liked his idea and encouraged him to go ahead (anyone, who is trying, should be encouraged). He shared some wireframes for his portal, but he was not sure how will it actually look on the web. So after returning home, I decided to get some basic version of the website up on the internet to help him. Resulting in the journey mentioned below.

Step 1: I knew I will have to share my email address with service providers (hosting space/ domain name etc.). And as I am looking for free stuff, it would be more than possible that I come across some fake websites. So I thought of creating a dummy email id which could be used to register to all these websites.

Step 2: Now I needed a domain name. I could buy, but as this was just a dummy site, why waste money. Next option is using subdomain from web hosting provider. Here I had to look for a free web hosting provider, and my past experience with free hosting providers is ‘don’t trust them’. The site can go down anytime without notice (its for free. What were you expecting?). So I thought of getting a free domain name, yes, a co.cc domain. I registered a domain with http://www.co.cc/, which I could use with any service provider.

Step 3: Now I needed web hosting. I googled around some free web hosting sites, zeroed upon one (checked features and reviews), registered, and bam, it is not working. Moved to second one, registered, and this time it worked. It was awardspace.com. I got Linux hosting with Apache, PHP, MYSQL. Basically all I needed, for free. I set up the nameservers for the domain and all is good. (Ofcourse I tried a hello world example, I am still the same old fashioned developer at heart).

Step 4: Now we have all set to host our web pages. I had the wireframe with me, and I had frontpage, I could easily create the HTML pages. BUT, from my past experience, I knew designing web pages is a sin for a developer (“Are you colorblind! Why are all the pages grey?”). So instead I pinged a designer friend and asked for some templates. Who suggested checking http://projectw.org for free html/ php templates (you will find more interesting stuff on the forum, but handle with care :D). Ok so I had a template with me, now I needed to customize it for my pages. Actually this was the part which took most of the time. Once done! I just had to upload the pages to my website using ftp. And we are done.

Wasn’t it simple. If instead of a website you are trying to create a blog, you can simply upload the blogging software. Infact most of control panels come with blogging softwares, so that is actually simpler.

If you don’t have your website yet, what are you waiting for? Go ahead! Get your hands dirty.