Tuesday, May 31, 2011

An easy way to reach the top?

Copied but a good one

Narayana Murthy (NRN), at old Infosys campus in 1990s. Since most of them know about the story of Infosys and NRN, let me narrate some interesting and rare facts which many might not know.

If Indian engineering students have taken job placements for granted, it is because of visionaries like Narayana Murthy. He is the Sultan of Indian IT but the journey was not as smooth as that of Tipu Sultan or other kings who were born in royal families.

Coming from a middle class family, like any other Indian, he had a dream of getting into IIT. He had managed to clear the IIT-JEE exams but his father could not afford IIT hostel and tution fees, due to which he made up his mind and joined a local engineering college (NIE, Mysore). He said to himself "All students from the IITs study well and do big things in life. But it is not the institution, ultimately it is you and you alone who can change your life by hard work" and he went on to prove his statement!! After engineering, he received Master's degree from IIT Kanpur.
Not many know that his first job was at IIM-A as systems engineer (also, he had 5 job offers including HMT, Air India, Telco after graduation but took up IIM-A which was the least paying).

He was initially a firm believer of communism but an interesting incident changed his life which led him to become a capitalist & an entrepreneur. During a foreign visit, for having talked against the Bulgarian govt with somebody in train, NRN was jailed for 4 days without food but later released because he was from India (which was a friendly country to them). This changed his life, he gave up the idea of communism and decided to create jobs in India. Thats how the story of his entrepreneurship started.

Infosys was his second attempt as an entrepreneur. The first one being Softronics, which was targetted to domestic market. Since India was not mature for IT yet, it turned out to be a big flop. So he started InfoSys (yes, the S was capital) and the rest is history.

Here is an interesting 3 min clip from a BBC documentary showing Infosys, Indian IT in general and the impact on India.
http://www.youtube.com/watch?v=I6-2hIImXok

The journey of Infosys was certainly not smooth and had seen lots of obstacles. Getting a computer took them 24 months, thanks to our govt red tape. Getting a loan was almost impossible. And at some point of time, the company was even at the verge of a sell-out. How they overcame all those troubles and became such a successful company is another story which I will be narrating using a different photo later :)

As usual, our next question. What is thought provoking in this story and what can we learn from it?
NRN has demonstrated that even if you are from a middle class family, inspite of studying in a local college, and being without any money to start a company & inspite of license raj of 1980s, you can go on to succeed in life and build a great empire by creating millions of jobs. He has shown that you need not have a surname called Tata/Birla to be successful. You dont have to be only from IIT to succeed. All it takes is hard work, determination & self confidence!! Hoping to see many more Narayana Murthys in future :)

Wednesday, May 25, 2011

how to start server with proxyInjectionMode option from the code

The below code can be used to start the server from the java code

RemoteControlConfiguration config = new RemoteControlConfiguration();
config.setProxyInjectionModeArg(true);
SeleniumServer server = new SeleniumServer(config);

Java Vs DotNet (Copied) Trailer

Well made and nice thought .

Sunday, May 22, 2011

Check List Document for writing TestCases

Being an Form based Application(product i have has more than 500 forms minimum), i have prepared a Checklist for writing testcases . Hope it helps some one.

Checklist:

Usability

1. Check for presence of
  • Links
  • Buttons
  • Help Messages(Info messages if any needed)
  • Color / Type of Text
  • Size of the text(Maximum text that can be entered)

Functionality

2. Functionality
  • Check for the working of all the links
  • Check all features of the application (* Checking for what the software is intended for (Eg. If compose mail, whether the mail is sent correctly to the specified user(s))


Messages

3. Information / Errors / Warnings (thrown to user, by the system)
4. Confirmation messages
5. Warnings/Errors when something is done wrong

Configurations

6. Configurations based
  • Browser based - Write check lists of what browsers and browser versions are supported
  • OS based - Testcases should cover testing for all the OS supported
  • Database Compatablity - Check what versions of databases are supported (Application i use support quite a few (Mysql , MSSQL 2000 , MSSQL 2003 , MSSQL 2007, Oracle )

The Configurations will change based on the Application , eg Testing an Mobile app conisists of testing in different hardware , Testing an Mail should be tested in various mail clients like OutLook , Gmail and with IMAP , POPS , etc

Impact

7. Impact testing
*Check for the impact areas due to the change
8. Breakdown (or) Crash ie application down / site down
*Test to check the behavior when an unexpected breakdown occurs (Eg. like server shutdown/crash)
9. Recovery
*Test to check the behavior on recovery (Eg. like restarting the server)
10. Inopportune scenarios
*Scenarios when a sudden valid thing happens at a particular time which is not expected to happen at that time (Eg. trying to delete a file while some one else is viewing it)


Database Testing

11. Database check
  • Checking the relevant database tables for any operation
  • Check for unwanted queries , tables
  • Check for unique key, foreign key constrains , etc


BackUp / Upgrades

12.Backup / Restore
*Take all database and configuration backup & move to some other system, restore the backed up data and checking for proper working
13. Check whether upgrades ( if present) are happening correctly or not
14. Check whether all the functionalities are working well after the upgrade

General

15. Multiple source to achieve things - Various places from where a particular operation can be done
16. Different options on doing a kind operation from different places
* Differences in doing a same operation from different areas (same functionality can by achieved by various methods
17. Tab feature , Enter key , Delete and various keyboard based shortcuts
18. Duplication - Adding multiple entries of same kind
19. Deleting and adding the same entry
*Delete a particular entry and adding the same entry again with the same name and configuration

Internalization

20. I18N
* Check if all the strings are i18ned
21. Check if the text boxes accept non-english characters
22. Check whether all the functionalities are working in non-english language

Logs

23. Code checks
24. Check whether Proper debugging is enabled to ease support
25. Logging - Check whether proper logging has been done for the feature

Various Logins

26. Type of user login - Check the functionality with free user / paid user / administrator previliges etc
27. Impact of a particular change in different places
28. License Check
*Check for license(if any) for any new feature implementation

Security

29.Security Testing
  • Password encryption
  • Not to expose files
  • Not to expose hidden functionalites (Typing the full url some times will bypass the checks )
  • Check whether the passwords can be seen in Logs / database /URLS etc .. No password should be in readable format


Performance Related

30.Performance testing
31.Scalability - Max no of nodes
32.Max no of users that can log in / or can access the site at a time
33.Stress test

Friday, May 20, 2011

Selenium commands to get browser name, browser version , operating system and few more

Browser name : selenium.getEval("navigator.appName;") returns the name of the browser.

Browser code name : selenium.getEval("navigator.appCodeName;") returns the code name of the browser.

Browser version : selenium.getEval("navigator.appVersion;") - The appVersion property is supported in all major browsers and it returns the version of the browser.

Browser and Operating system : selenium.getEval("navigator.userAgent;") - This property returns the value of the user-agent header sent by the browser to the server.

Whether Java Enabled : selenium.getEval("navigator.javaEnabled();") - returns a Boolean value that specifies whether the browser has Java enabled.

selenium.getEval("navigator.platform();") - returns for which platform the browser is compiled

Check Cookie Enabled or not : selenium.getEval("navigator.cookieEnabled();") - returns a Boolean value that specifies whether cookies are enabled in the browser.

Thursday, May 19, 2011

Testing Cirucus Magazine and TeaTimewithTesters Magazine

For the last few days , i read few good articles from the following 2 magazines . Both have done amazing work and have superb information for testers .Strongly recommend both the magazines and both are free as of now .

The site links to get the magazines or the free pdfs of them are http://www.teatimewithtesters.com and http://testingcircus.com

The links for downloading the pdf's are giving below

Testing Circus Magazine free pdf download links

May 2011 - http://testingcircus.com/Documents/Testing-Circus-Vol2-Issue5.pdf


April 2011- http://testingcircus.com/Documents/Testing-Circus-Vol2-Issue4.pdf

March 2011 - http://testingcircus.com/Documents/Testing-Circus-Vol2-Issue3_India-Cover.pdf

Feb 2011 - http://testingcircus.com/Documents/Testing-Circus-Vol2-Issue2.pdf

Jan 2011 - http://testingcircus.com/Documents/Testing-Circus-Vol2-Issue1.pdf

Dec 2010 - http://testingcircus.com/Documents/Testing-Circus-Vol1-Issue3.pdf

Oct/Nov 2010 - http://testingcircus.com/Documents/Testing-Circus-Vol1-Issue2.pdf

Sept 2010- http://testingcircus.com/Documents/Testing-Circus-September-2010.pdf

Tea Time for Tester Magazine pdf free download

Feb 2011 - http://issuu.com/teatimewithtesters/docs/tea-time_with_testers_february_2011__year_1__issue

March 2011 - http://issuu.com/teatimewithtesters/docs/tea-time_with_testers_march_2011__year_1__issue_ii

April 2011 - http://issuu.com/teatimewithtesters/docs/tea-time_with_testers_april_2011__year_1__issue_ii

May 2011 - http://issuu.com/teatimewithtesters/docs/tea-time_with_testers_may_2011__year_1__issue_iv

Thanks for the authors who have done a fabulous job of putting things together.

Wednesday, May 18, 2011

Any solution for this problem "Cache Access Denied"

ERROR

Cache Access Denied


While trying to retrieve the URL: http://www.thecheesecakefactory.com/

The following error was encountered:

  • Cache Access Denied.

Sorry, you are not currently allowed to request:

    http://www.thecheesecakefactory.com/
from this cache until you have authenticated yourself.

You need to use Netscape version 2.0 or greater, or Microsoft Internet Explorer 3.0, or an HTTP/1.1 compliant browser for this to work. Please contact the cache administrator if you have difficulties authenticating yourself or change your default password.

I have cleared all the cache and worked on the proxies too , but not able to solve this .. Any answers please

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