Wednesday, May 18, 2011

Performance Testing and my Learnings

For the last 2 months(actually part time) i am working on performance testing of my product and have learnt quite a bit in this short time. Here are my observations and suggestions for the people who do performance testing .

1. Stress / Load Testing selection : First and foremost thing is know what u exactly want from performance testing . Do u want to know the metrics where your product is going to break or u want to know how faster ur application or site is loading . My objective was mainly to see where my product is going to die down after keeping the load. Keeping a very high load can crash the server , but one should know at what load the server actually crashes . And now comes the second point.

2. Tool selection : Selection of tool is as important as the testing itself .Search for different tools , choose a few which suite your economic and functional requirements. Try each one of them , know the tool which suites you better and then start your load test. Due to some economic or company constraints , my first choice of tool was my a forced one and i did not have much of a choice , which indeed lead to some improper results. The first tool i worked on (dont want to mention the name of the tool) was buggy and was an half working on . It was generating the load on the application , but the functionality wise part was failing . This lead me to go for Jmeter which was acutally used by one of my working products customer . And Jmeter suited me well .So i learnt something from the mistake i did . I could have tried different tools before itself and could have avoided wasting lot of time . Even reading some good reviews on various tools and some good advice would have helped .

3. Network Hardware : For any performance testing , one should have some dedicated machines . Otherwise the results that show will be mostly wrong . Assume u are testing some java application x on some system and you are testing the amount of memory it going to occupy and are also documenting when your application breaks . And you have some java based applications running on that machine . The other java applications that are running on that machine can impact the output of your application . The output results might be wrong . It is always better to have a separate machines for testing , ie different machine for load generator , application and also for database if needed so . Also See that there is sufficient space on the system , the logs are going to occupy lot of size .

4. Dedicated Network : See that the machines which are used for performance testing are connected well . There are n number of factors which can stop or impact your performance testing . System going out network , human failures like some one unknowingly stopping the machine , slow networks , packet looses , etc should not be present

5. Dont report or publish the results just be testing for one time .Test for a few times and check the outputs , take an average of the best results and publish them .

Monday, May 16, 2011

StaleElementReferenceException while running Selenium2 WebDriver

For the last one day i have started working on WebDriver and the first issue that came for me was the StaleElementReferenceException . My example was simple , ie do a google search for a word and click on submit .

First time , it worked ..Added some more commands i started getting this exception org.openqa.selenium.StaleElementReferenceException: Element is no longer attached to the DOM

Reasons for this issue was due to the faster load of the page .Kept a Tread.sleep command and it worked .

As thread.sleep is not a good way of programming , i used

WebDriverWait wait = new WebDriverWait(driver, 10);


When i searched a bit more , found one more way to make it wait ,

driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS)


called impilicit way of waiting which also worked...

WebdriverWrapper and WebElementWrapper can also be used which will get the new WebElement Object .

Tuesday, May 10, 2011

Changing the Language of Firefox from English to other language

Yesterday i was stuck with a customer data where the language of the customer was french. The customer used jmeter for load testing our product and he used some french html source in it .In order to crack his data , i had 2 options one was to change the OS to french and the second was to change the Firefox language to french and see the source .

Steps to change the Firefox language to french

Open Firefox -> Tools tab present in the top -> Click on Options ->Content Tab -> Choose Button present next to the languages in the window ->In this window , click on the "Select a language to add" dropdown and go to the language you'd like to add -> Choose the language , add them and click on ok






The localized versions of firefox for different locations is this http://www.mozilla.com/en-US/firefox/all.html .
One can get a localized version from the above link

Thirdly there is Firefox add-on which can change the Firefox language . The add is called the quick locale switcher which can downloaded from this link https://addons.mozilla.org/en-US/firefox/addon/quick-locale-switcher/

Thursday, May 5, 2011

How to Run Jmeter in command line mode

JMeter can be run in 2 different modes

1. GUI based
2. Non-GUI based

While we can use Start in the GUI Mode to start the tests , the test can also be run from command prompt

1. Open a command prompt
2. Go to the folder where Jmeter is present and go in side bin
3. Now type java -jar ApacheJMeter.jar -n -t

Wednesday, May 4, 2011

Why do Managers/Team Leads judgement on people goes wrong

Many a times managers misjudge the people working under them .Managers are also humans who go as per there nature .Each one will have there own expectations .Some managers see the actual stuff of a person and some see if the person has reached the expectation kept my them. But ever the nature of the manager is , assuming he sticks to it , then he should be able to judge his total team in the same way.But here are some reasons why this wont happen and one team mate is rated above other.

Let us consider 2 people who work under a lead . Both of them are equally talented and both of them work hard.

Reason 1: One of them is a smart ass who informs everything to the manager , even the smaller things like a dog eats biscuit .The other person is cool person who solves all the problems which he gets by himself and wont say to the manager the smaller things .But here the first one gets a good appraisal. Here the manager is blindfolded by the stupid smartness of the first guy and he is actually a bad manager

Reason 2: The one who talks more to the lead is the good guy and the other is the bad guy.So being non-talkative is a bad virtue of the poor second guy who always remain second

Reason 3: Third reason is not being a show off . The first guy sends reports to the team all the time .I say sending a report means the report can have any thing. The report can be a manipulated one , half baked one or even can be a total failure report .But where as the second guy who works hard to get the work done correctly is the bad guy.As he took a bit of extra time to send a report , he is the bad guy.

Reason 4 : Very few managers do cast there vote based on the region/caste basis although this percentage is very less. These sort of managers could just be shot out of sight.

Reason5 : The final one is the tough one. Each person is allocated some work by the manager. Let us assume 2 persons are given some x and y works which can be rated of the same level. Person 1 does work x with full concentration , this guy digs his work really well and does it perfectly . On the other hand person 2 does work y to some extent and he also sees work z which was not allocated to him , but has some value . Output wise , the amount of benefit the company would have got will be same . Now comes the appraisal time when a manager have to calculate the appraisal .Many managers do things wrongly here . Some managers feel the work a person1 as bigger and rate him above the other , where as some managers feel that the person2 is taking care of other works too and his doing good work . But this is totally wrong . Both the persons should be rated same here .

Note : Words Manager and Lead are both used here . Replace them as per ur convenience who ever gives an appraisal for you.

Good and New Google Chrome commercial


Well made google chrome commercial