Pages

Sunday, November 20, 2011

A roadmap for an aspiring tester

I was assigned with a task to prepare a roadmap to learn testing for a batch of new joiners in our team. The roadmap should include what they should learn and why, how they should learn and from where they should learn. I have compiled an outline which I am sharing it in this post. I believe that there are much more to learn for a tester than what I have managed to list here. I welcome suggestions from all of you as comments.

A tester needs to learn:

There are many technologies a tester needs to learn. Some of them (important ones) are:

SQL: A tester has to do a lot of activities related to database. So it is obligatory for any tester to learn the SQL language. This learning includes concept of RDBMS, SQL queries, query optimization and database administration.
 
Excel: Excel is a very powerful tool and capable of doing much more thing than you can imagine. It’s a best friend of a tester. Gain mastery over it.
                Sources: http://www.baycongroup.com/el0.htm             

HTML/DOM: For testing web application efficiently and effectively, one has to understand HTML and Document Object Model. Knowledge on CSS is also good.
                Sources: http://www.w3schools.com/html/default.asp
 
XML: XML is a widely used technology and supported by many testing tools to store data. It’s a must for a tester.
                Sources: http://www.w3schools.com/xml/default.asp
 
Scripting languages: There are many scripting languages such as java script, PERL, python, ruby etc. Learning a few of them comes handy while testing. You can build your own tool to carry out few tasks with the help of a scripting language. Java script is of highest priority. Learning PERL or python is a bonus. Choose your own language.
                Sources: http://www.w3schools.com/js/default.asp
                http://www.tizag.com/javascriptT/
                http://www.learn-javascript-tutorial.com/
                http://echoecho.com/javascript.htm
                http://www.perl.com/pub/2000/10/begperl1.html
                http://www.perltutorial.org/
                http://www.tizag.com/perlT/
                http://docs.python.org/tutorial/
                http://www.tutorialspoint.com/python/

The above mentioned sources are not the ONLY sources. Information is strewn across the internet. Explore as much you can.        

Tools that come handy:

There are several open source tools to carry out specific testing related tasks. There are some cool Firefox/Chrome add-ons. Explore in this area and zero on whatever suits your purpose best. Few of the tools/add-ons are:

Bug reporting tools:
 
Add-ons:
Firebug: It’s the most popular and a powerful add-on for Firefox. Below is a link to a nicely compiled mind map of add-ons.
Selection of tools depends on your requirement. Google you purpose and you shall get the list of all related tools.

Blogs: Repositories of failure/success stories

Make a habit of reading few blog posts regularly. There are hundreds of good blog sites and they narrate their success as well as failure stories. Learn from their learning. You can’t afford to make all the mistakes by your own and learn from them. Life is too short for it. Better if you start writing your own.
The link below provides list of top 100 testing blogs:
Following are links to some really good blogs out of the above 100:

Videos:

This is an effective way to demonstrate things. What you can’t express in writing you can show it through videos. It is a plus who hates to read much (though you have to get rid of this habit).

Following are links to few really nice videos:

1. http://testertested.blogspot.com/p/audio-video-podcasts.html contains audio and video related to exploratory testing and basic of software testing.

 
 
4. Open lecture by James Bach - www.youtube.com/watch?v=ILkT_HV9DVU  

5. How to think efficiency in software testing by James Bach- http://vimeo.com/10715536  

6. Becoming a software expert by James Bach- http://loadstorm.com/2009/software-testing-experts-james-bach
 
 

Tuesday, November 15, 2011

Knowing the programmer


Having a propensity towards programming, I often sit beside my friend who is a web developer when he is on work to learn the basics of web development. I being a tester, he enjoys my involvement on his work for I scrutinize when he develops. He asks me how should a functionality be implemented, how should the GUI look like etc. Though I am not a connoisseur of programming, there are many occasions when looking at his code, I have found out many potential issues and conveyed it to him. On one such occasion, I was sitting beside him and he was writing some java script codes to validate a form. He was writing a java script function which was supposed to be called when a checkbox is ticked or unticked. I noticed a potential issue on this part of the code. To illustrate it, I have designed that part of the form and also written the java script function. There were few more functionalities in his code but I have kept it simple because it suffices my purpose of addressing the issue. And of course his GUI looked different than mine.

Below is the image of that part of the form. 


Look at the image and guess how this is supposed to work. There are two fields; a present address and a permanent address. If these two addresses are same for a user, he doesn’t have to fill the two fields with same data. Instead, he will just tick the checkbox and the content of first field will be copied to the second field and the second field gets disabled. When he unticks the checkbox, the content of the second field gets removed and it gets enabled.  In fact, this functionality was suggested by me and he appreciated

Now I shall give you the code. You copy it and paste it in an editor, save it as an html file. Open the html file and try to figure out the issue. Do not view the code for the java script function. Try out different combinations to figure out the issue. I expect everyone to figure it out because this form has very limited possible combinations and if you work out all of them, you can find it out. If you cannot figure out by looking at the application, go view the code and then try.

Below is the code: (Please replace "#" with "<" and "%" with ">" while saving )

#html%
#head%
#title%#/title%
#script type="text/javascript" language="javascript"%

function setAdd() {
var chkStatus = document.forms["myform"]["chk1"].checked;
if (chkStatus==true) {
document.forms["myform"]["txt2"].value = document.forms["myform"]["txt1"].value;
document.forms["myform"]["txt2"].disabled = true;
}else if(document.forms["myform"]["txt2"].value!=""){
document.forms["myform"]["txt2"].disabled = false;
document.forms["myform"]["txt2"].value ="";
}
return true;
}
                   
#/script%
#/head%

#body bgcolor="gray"%
#form name="myform"%
#center%
Present Address:#input type="text" name="txt1" id="pradd" /%#br%
#input type="checkbox" name="chk1" id="addsame" onclick="return setAdd();" /%
#font size="2" color="white"%Click if present and permanent address are same#/font%#br%
Permanent Address:#input type="text" name="txt2" id="peadd"/%#br%
#/center%
#/form%
#/body%
#/html%

For them who still could not figure out the issue, I shall explain what the issue is and how was I able to figure it out by looking at the code. If you look carefully at the “else if” condition of the java script function, it implies that the second field has to contain some value (it is not blank) in order to be enabled when the user unticks the checkbox. I asked him what if it is blank. Then he replied how can it be blank?  If the user has ticked the checkbox, he must have entered some value in the first field. So obviously the second field has that value. Then I asked what if the user has ticked the checkbox without providing any value in the first field? He immediately launched the application, ticked the checkbox without providing any value in the first field. The second field got disabled. When he unticked the checkbox, the field was still disabled because it had no value. In a way to enable it again, he had to provide some value in the first field, tick the checkbox and again untick it.

When I unveiled the issue before my friend, he confessed that in his work, he has made several such types of silly mistakes and no tester has happened to report them. He could then literally recollect on which project and on which part he had made such mistakes. God forbid those issues to be figured out by the users. He candidly revealed before me that he was under an impression that a tester is not necessarily required for a good developer. But now he had understood the importance of a good tester. He learnt a lesson.

What lesson we the testers learned? By knowing the mindset of the developers, how they implement certain functionalities, we can actually uncover many issues of similar types on different areas of a project or even different projects where that developer is involved. To know about their programming habit, we have to build good relations with them. We have to spend some time with them. We can ask questions to them on how they would implement certain functionalities.

Monday, November 14, 2011

Guessing the password


Being an avid reader, every day I make a point to read some blog posts on testing. I am a regular follower of some good blogs written by some revered testers of the world. One of them is Pradeep Soundararajan’s Tester Tested ! On one such occasion of going thru his blog, I came across a post where he has written about how he uses puzzle exercises to teach testing . Having a great propensity towards riddles, the post seemed very interesting to me. With utmost alacrity, I jumped into solving few of them. This article is about my experience of solving such a puzzle, Guess the Password - Version 1 & Version 2. Anyone who is reading this post and has not yet solved these two puzzles, I request them to go solve them first and then come back and read further.

I tried version1 first. Having solved many online riddles earlier, it didn’t take much effort of mine to guess the correct username/password. I navigated to the version 1 page and tried to find out if any clue related to username/password was displayed on the page. Initially I thought this application must be validated at server side.  I thought there must be some clue displayed on the page itself looking at which we have to guess the credentials. After we give the credentials and press Log In button, the data is being sent to the server and there it is validated against correct credentials stored in the database. Not finding any clue on the page, I viewed the page source thinking I might get some clue written there as comment lines. To my amazement, the first comment line I saw read something like “Oh, you think you could crack it from the source code? You thought it would be so simple?” I was disheartened reading this. If there is no clue either on the page or the page source, how would I suppose to guess the credentials? But knowing something about the way Pradeep and Santosh present exercises, I took no time in understanding that this comment line was meant to deceive the solution seeker. I therefore started looking at the code at it took merely 2 minutes to guess the correct credentials. I started from the form. My knowledge on java script helped me here. I saw a java script function “validate” is being called when the Log In button is clicked. I then realized that my earlier view on credentials being validated at server side was wrong. I jumped into the validate function code. And it was pretty much simple. The values of the username and password fields are being retrieved and stored in two variables. There are two more variables which contain the correct username and password. There is a condition which checks the username and password values given by the user against the correct username and password stored in two variables. If it matches, you have cracked the username/password. Mine matched on first try. 

However, version 2 was not a kind of cakewalk for me. Though the way of puzzling is almost similar to that of version 1, it took me one whole day and a mail to Santosh to guess the correct username and password. After I succeeded, I realized that I had already guessed the correct username and password much earlier but wasn’t combining them properly. The first difference between version 1 and version 2 was the interchange of variables that store the actual username and password. This didn’t take much time to figure out. The next was the username seemed to be a “blank space” and the password as “testing”. I tried the combination only to fail. I then suspected the character which looks like a blank space was not actually the same blank space that can be generated by the space keystroke on the keyboard. I was aware of a character like this. But I acted over smart, copied the space like character and pasted it in the username field. This didn’t help either. Then I thought of copying the entire source code to a notepad and save it as a local html file. I did so. I then opened it and gave the combination “blank space” and “testing” and hit Log In. Bravo. This time it worked. I was perplexed. It seemed to me weird. I did a lot of research on why this behaved differently when saved as a local html file. I had no more patience to try more combinations. I wrote a mail to Santosh asking what was the correct credentials. I briefly wrote about my effort. He got back to me saying the character looking like a blank space is a variant of space. He asked me to go to StartàRunàType Charmap and search for that special character and copy it from there and paste it in the username field. I did so and this time it worked. This evoked me to try the character which seems like a space but is not a space I was aware of. I pressed Alt+255 to generate that character in the username field and provided the password. This time it did work. I then confirmed that the character displayed in Charmap was same as the character obtained by pressing Alt+255. I was curious to know why when I did a “view page source” to the application and copied the space and pasted did not work. All these time I was using Firefox. I thought of opening the application in IE. I opened it in IE, did a view source, copied the entire source code and pasted in notepad. I then saved it as a local html and try the “no-break space” and “testing” combination. It worked perfectly fine this time. Copying the source code from firefox and saving it as a local html file didn’t work but with IE it worked. From this I drew a conclusion that firefox was not able to display the “no-break space” character. It was displaying it as a blank space. I do not know whether it is a limitation of firefox to be not able to display the special character and converting it into a blank space.

There are few things I learned from this exercise. They go as below:

1.      Analyzing the code gives an idea about how the system works. If some part doesn’t work properly, by looking at the code we can deduce the possible reason. In order to do so, we need to have the basic understanding of programming.

2.       Something which looks like a very usual thing (No-break space in this case) may not be that thing in reality. So if we have to think of other possibilities of what that thing might be. Having an earlier knowledge on “what that thing might be” can be very helpful. Though in case of unavailability of prior knowledge, we should be able to figure out a way to find it.

3.       Trying the same process in different environments or browsers for that matter, many new things can be discovered about the application as well as the environment. In our case the inability of firefox to display the “no-break space” in the source code.

Thursday, November 3, 2011

Is QUALITY all about customer’s need and satisfaction?


In our organization, we (testers) have made a point to discuss on a weekly basis about testing, what we do at our work, what we do to test better. Besides, we discuss the possible ways of acquiring knowledge on this craft. We learn, unlearn, and relearn. We argue, we agree. Sometimes we fight to impose our own views on others on certain things. To justify self, we learn more about those things and resume the argument (fight rather). Sometimes we give up without any conclusive decision on whose views were more appropriate and applicable on a particular context. We keep our own views with us and move ahead. But never have we given up our discussions or fights for we enormously get benefited from these. 

On one such occasion, I and one of my colleagues had a long discussion on whether “Quality is all about customer’s need and satisfaction”. Not until we saw a bunch of people gathered at our cubicle to listen to what we’re discussing we realized that we were literally fighting. And unfortunately it was such of a few occasions when we give up our fight. I was against of the view that quality is ALL about customer’s need and satisfaction. She was for it. Actually she had prepared a set of questions for the new joiners in our team. One question was “What is true about Quality” and the correct answer (as per her) was “It’s all about customer’s need and satisfaction”. I was given to correct few papers and the moment I saw this question, I was surprised. I didn’t buy the answer. I called her to ask her views on this. Below is the conversation of mine with her.” I” represents me and “S” represents her.

I:  Do you really think Quality is ALL about customer’s need and satisfaction?
S: Yes, I do.
I: (reiterated the question)
S: Of course it is. What else do you think quality is?
I: What about a case where your customer is not the user? (By customer being not the user, I meant someone who pays us but has his own customers who’ll actually use the product)
S: I didn’t understand. Tell me a case like that.
I: Our client who pays us to build the product. But he is not going to use it; rather he has customers that are going to use it. The client is the customer for us in that matter. He might be quite happy with our work but the end user may feel unhappy using the product.
S: But by customer, I meant users only. So in that case, the end users are the customers.

Somewhere at my deep inside, I knew that it was not correct though I couldn’t at that point of time able to think of a situation by which I could convince her that quality is not all about customer’s need and satisfaction. I hastily searched my Skype to see who were online. Fortunately James Bach was. More fortunate I was when I pinged him and he responded in no time. I was on cloud nine since I knew that I was going to learn few things now. Besides, I was prepared to be amazed by his dexterity on “on-spot thinking of a situation to explain things”. Plus I was prepared to answer few of the questions I was anticipating I’ll be asked by him. That’s been his way of explaining things. You keep answering his questions until you realize you’ve got the answer to the question you’ve asked him. The discussion went as below:

I: Hi James
JB: Hi
I: Can quality be ALL about customer’s need and satisfaction?
JB: No
I: (whew, I was correct )
I: I even think “No” in case the customer and the user are different
JB: It’s not all about anyone
I: then?
JB: It's about the relationship between the vendor, the product, and anyone whose opinion of the product matters.
I: including testers, right?
JB: No, testers don’t matter.
I: who are the people then whose opinions matter but they aren’t the customer?
JB: You tell me. It depends on the project. But testers do not matter. Testers are agents for the people who DO matter.
(Then I was amazed by his dexterity I was talking aboutJ)
JB: Let's say you are selling pet food. The customer is a human. Their opinion matters, because otherwise you won't have customers anymore. But the government may matter, too. If there are laws about what can be in pet food; and the pet may matter... because if the pet refuses to eat the food, the customer will not buy more of it.
I: Oh yes, probably that's why we need to meet industry-specific standards.
JB: plus, if your pet food is found to contain toxins, the pet may love it, but pet lover organizations will go after you. So there are various stakeholders whose opinion matter.
I: True.
JB: One of your jobs is to figure out whose opinions matter.
I: Thank you so much, James.

I then conveyed it to my colleague. She seemed to get impressed but to justify her own view, she asked “if there are already rules to dictate you what not to do, why would you do it and hence ruled out the government’s role in pet food case”. I preferred to keep quiet for sometimes it is best weapon to use. But I had already learned a big lesson that “Quality is not ALL (all big case) about customer’s needs and satisfaction”.