Showing posts with label testing. Show all posts
Showing posts with label testing. Show all posts

Thursday, August 22, 2013

Lesser known Stress testing Utility - Siege

Siege is a HTTP/HTTPS Stress testing tool.

Here is the man page for it.

Here is short intro from the man page -

Siege is a multi-threaded http load testing and benchmarking utility. It was designed to let web developers measure the performance of their code under duress. It allows one to hit a web server with a configurable number of concurrent simulated users.


A basic command for testing a web app locally is
siege http://localhost:8000/?q=pants -c10 -t10s
c -> number of concurrent users
t -> time for running tests for.


Hope it was useful. 

Thursday, May 31, 2012

How to Test Facebook App using selenium

I had given a lot of thought for building test cases for the FB app .
Major areas for testing were -
a) New user registration
b) Permission acceptance flow
c) Other features of the app. but most of which should be manually tested.

Enter, Selenium . It simple automate browsers.  Its really simple . I did the following

1) Fired firefox. Added Selenium IDE Plugin . It basically records user actions , initially in HTML which later can be exported to python or other supporting laguage.

2) After step 1, half work is already done   :)

3)  Now on to FB part. Here I was trying to automate New User Registration Flow. Here I needed a new test user everytime I run the script.

Enter , Facebook's Test User Api.
a) First get App Access Token
b) Then get a new test user credentials

4) Now include this flow in your test case, Call the script to get test user credentials, and login and go to app, and viola, Test Case Completed.

5) There is one small thing though, :) , the python exported test case gave error on the action when it tries to select frame of the app. Here we can use switch_to_frame method.

Rest all was a piece of Cake.
//Edit - Not exactly piece of cake, cause the test cases are performing a bit weird.  :)