Thursday, July 23, 2015

Basics of Software Testing - Part-III : Understanding of software

A little background about this - Each person may have their own way of testing or finding issues. They may not necessarily find my method helpful to understand the basics, this is something i'm trying to generalize for the newcomers in software/ firmware testing.  My intention is to make a series out of it, if i can and get enough motivation to write the basic stuffs.



It is really hard to summarize the 4 year course, i’m just touching some topics which may give you an overall idea about the software. Details can be found on Google/ Wiki as well, if interested.


Basics continues…… from previous topics


Types of Software:
In order to get into software testing, one need to understand some basic idea/ knowledge about software. Again, i’m trying to give ideas from a software testing point of view.


A software can be divided into two broad category- Desktop Application or Web Based Application.


  1. Desktop Application- For the desktop application you need to run the software on a machine that has a operating system. Desktop application is basically used by single user at a time (other than Client Server model).


  1. Web Application - On the other hand, Web Application is basically hosted on a machine (Server) and then it can be accessed from any machine using the browser/ other interface. So, on client machine, you don't have to install any software, not required for Admin privilege to install/ run software. It will require to run on a web server/ service. Most of the big business provider uses web application using interfaces to run the application. It definitely requires database at the back-end to store the data.    


Software can also differentiated into many other types like whether it’s a Business to Business Application (B2B), Client Server Application, Standalone application, Application Software, System Software (operating system), Embedded Software/firmware etc. We will focus on these two above mentioned categories.


Software also can categorized as shareware - usually intended for sale after a trial period,  freeware free software but with copyright restrictions or not for commercial use, open source software - where the source code is furnished and users agree not to limit the distribution of improvements.


Web Service Tools:
May not need to know these in details now, just want to give some name. May be in future, if it is relevant, i might want to discuss a little bit. For now, in short, these are the programs that needed to run the Web application. Web application has to be run from these tools.
  1. Microsoft’s IIS Server
  2. Apache Web Server
  3. Tomcat Container
  4. WebSphere Server


Programming Language
Wiki definition “A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs to control the behavior of a machine or to express algorithms.”


Most commonly used programming languages to develop software are:
  1. C, Pascal, Perl - Structure programming language, suitable for small program or project.
  2. Visual Basic - Structural programming language with Visual User Interface. Good for desktop application.
  3. C++, C#, JAVA - object oriented programming language used for larger scale projects.
  4. HTML, ASP, JSP, Servlet, PHP- Needed for the Web application development.


There are few things that are not considered as programming language, but acts like them. These are called Scripts. These are popular
  1. Javascript
  2. VBScript


Programming tools
Programming tools itself are programs that helps the developer to write code. once the language is settled, the first thing it needs an editor that will help to write the code effectively. Developer can write code on a text editor as well, but using an Integrated Development Environment (IDE) helps them to write the code, to compile, to run and to debug the code.    


Developing Software
The way I describe it is, a programming language is a way to write some instructions that machine can understand. Software is collection of function/ programs, whereas Program is a piece of code that perform certain functions. So it needs different material and steps to build a software.
Writing code for software ultimately needs - platform, framework, libraries, language, editor (IDE), compiler/ interpreter.


Two major development platform used for developing software are:
  1. Java/ J2EE framework / J2SE/ J2ME
  2. C#/ .NET framework/ ASP .NET


Writing code itself does not make software. It needs or involves into few more steps. Software Development Life Cycle (or popularly know as SDLC) defines some steps which in total makes the whole life cycle of the software. Starting from Requirement Analysis to Design, then writing code, debugging code, testing, implementation of the software etc.


SDLC itself evolves its process. There different methodologies for SDLC -Waterfall, Agile, Spiral, Test Driven Development, RUP etc. From a software testing perspective, all we need to know is HOW the software should work, WHAT the software supposed to deliver - in other words, the Specs/ Requirements.  


Difference between Software and Firmware
In very general term, Software is collection of program that runs on operating system. It requires environment and mostly used/ hosted on a PC (/ phone!). Software, most of the time has User Interface (UI).


On the other hand, a firmware is program or small number of program that runs on a device without the operating system and without UI. For example, device drivers. These are firmware that interact with the device and the other interface does not necessarily need an OS to run.  


Wednesday, July 22, 2015

Basics of Software Testing - Part-II : System/ Environment

A little background about this - Each person may have their own way of testing or finding issues. They may not necessarily find my method helpful to understand the basics, this is something i'm trying to generalize for the new comers in software/ firmware testing. My intention is to make a series out of it, if i can and get enough motivation to write the basic stuffs.



Few more basic things- On my previous post I tried to give an basic idea of Software Testing. It was mostly to get an idea what / how we do testing. This was meant for the people who does not have idea about software testing but more or less has some literacy about the Software.


the “System” /Environment for software to install and run:
I’m only going to describe about the following topic in details form software testing point of view and/or that are relevant to our testing (avoiding the technical jargons/ definitions).


Operating System (OS):
Most of us know that software runs on an operating system. We need to have some basic idea about the operating system as well. Windows is (one upon a time, used to be) one of the favorite platform for software. Now a days there are many other operating system like Linux, Android, Apple OS etc that allows to run software/ application to perform some functions. I’m more familiar with Windows operating system and thus will provide specific info on windows.    


  1. 32 or 64 bit: OS can also be a 32-bit or 64-bit operating system. Windows 7, 8, 8.1 all of these supports both 32 and 64 bit operating system.


  1. Installation Path: Depending on the 32/ 64 bit, it installs the software on different location. For Windows 32-bit OS, all the software goes under the “C:\Program Files\<software folder>”. Under this folder it copies all the executable files along with dependent library files.


For a 64 bit machine, if the software is a lagecy software (that is meant to be for 32 bit), then the installation will go under the “C:\Program Files(x86)\<software folder>”. If the software itself meant to be for the 64 bit on a 64 bit machine then it will be under “C:\Program Files\<software folder>”.


  1. Data files: Since WIndows 7, most of the programs data/ configuration file goes under some hidden folder “C:\Program data\<software folder>” or under “C:\Users\<UserName>\AppData\Roaming\<software folder>”. Small programs that does not use big databases may use this folder to put the data file.


It is important to know that, both these “C:\Program Files\” and “C:\Program Data\” folder requires Administrative Privilege to install / access.
  1. Sometimes the versions of the OS also plays a role. For windows they have Professional, Home, Enterprise etc versions. Depending on the nature of the software, it may be necessary to have an idea of different version of the operating system.


Hardware (H/W):
Basic ideas needed about the followings:
  1. Storage devices - Hard Disk Drive, Optical Drives, USB drives. Need to know how much data it can hold, how much free and how much occupied.


  1. Memory - Memory or RAM is needed to run programs on demand. RAM makes it easier/ faster to access program/ data as needed. The more the memory, usually, the better the performance would be (with some exceptions).


  1. Processor-  Need to know whether it’s a 32 bit or 64 bit Processor. Need to know the basic requirement to run a software on a machine. If a software requires to run on 64 bit machine, you won’t be able to install it on 32 bit machine and its operating system.


  1. Port - Again, depending on the nature of the program, it may needed to have an overall idea about using COM (Serial) Port, USB to Serial Port. Port is a path to communicate with the program and the external hardware.


DataBase:
In order to store data, software needs some form of structure to save and retrieve data. This could be file base or could be using database. Following are some common databases that are used for the software. As a software tester we might need some basic knowledge about the followings as well. To work with databases, one need to know the SQL. SQL is the query language that can be run on the relational databases. Each database may have their own syntax, but they will have the same basic idea.


  1. Oracle - By Oracle group. Relational Database, supports multiple user, supports network access, heavy weight, requires more dedicated hardware resources.


  1. MS SQL - By Microsoft. Relational Database, supports multiple user, supports network access, heavy weight, requires more dedicated hardware resources.


  1. MYSQL - Bought by Oracle, used to be open source program.Relational Database, supports multiple user, supports network access and lightweight.


  1. MS Access - Used to a popular database by Microsoft. It is vulnerable, does not support multi user, has to be one instance, does not support network access.


  1. Any other databases - there are few other databases. Depending on the nature of the job or the company's interest they might choose to use different database.


File Base:
For smaller software/ application, it may not be necessary to have a database for storing the data. It could be a flat file format, could be an XML format or could be any other filebase format.

Next Topics.... "Understanding of software"

Basics of Software Testing - Part-I : Basic Idea and Mindset

A little background about this - Each person may have their own way of testing or finding issues. They may not necessarily find my method helpful to understand the basics, this is something i'm trying to generalize for the new comers in software/ firmware testing. My intention is to make a series out of it, if i can and get enough motivation to write the basic stuffs.

Software Testing Basics:
A software is a program that takes some input, process it and then displays the output. That's the most generic statement for software. Software testing is to make sure it takes and displays the correct result and handles the invalid scenarios properly.

Example:
For example, lets imagine a software functionality that takes two input as A and B, then adds them up and display the result.
A + B = Result
Looking at it, you get the idea. Best case scenario would be : two inputs are 1 & 2 and then process the input with given operator and the outcome as 3. (1+2=3). 

And then you re-run the same program few times.


Testing ideas/ Mindset:
“Challenge” is the one of the key factor in testing.  When you were given software to test, you need to basically challenge the product to find out the issues out of it. Even that the expected outcome would be correct, our task to challenge it and try to break it from every possible angle.
It’s so simple. So what’s the big deal about it? From a testing point of view, first you have to have a mind- set that will tell you that the expected result will not always be equal to the input. Here are some things that I would consider:
  1. Two variable inputs- could be anything. Could be
    1. Empty/ Null- try with empty inputs
    2. Alphanumeric- try with non numeric inputs
    3. Numeric- try integer/ long numeric values,
    4. Real - try real/ big real number,
    5. Big floating point number - try floating point calculation,
    6. Negative number- try with negative number,
    7. Special characters - try different characters like space, !@#$%^&&*(_)


  1. Then comes the operator sign. It could be:
    1. Regular arithmetic operators  +, -, /,x,
    2. Empty/ Null,
    3. Numbers,
    4. String


  1. Then the result. It could be
    1. The expected result – may display the correct result,
    2. Unexpected result – on a 2nd run it may display the number with previous result,
    3. Error/ Exception – displays error/ exception (divide by zero, infinity etc)


  1. Output could be
    1. Nothing (not output at all, fall into infinite loop or something),
    2. Could crash the operating system,
    3. Output can cause out of memory,
    4. People can die
    5. Earthquake/ Tsunami may happen


These are some basic things that can happen on a simple software function. When you have the mind-set of challenging the outcome, you will figure out the ideas by yourself how you can break it. You have to think beyond the basic expectation. Even though the last point (4.d, 4.e) may or may not happen, but you have to prepare yourself with unthinkable.  
When a programmer writes the code, the first thing they do is to write the code to process the input and output. Then they write more lines of code just to protect from this kind of scenarios as mentioned above. And, as a human being and as a nature of the job, they will make mistake, may not think about all of the possible things an end user can possibly do. Tester’s task is  to think like the end user (with a bit of technical knowledge) and make the code less vulnerable to the unwanted scenarios.

Testing is challenging. It requires more patients and different angle to look at it. I personally take it as fun because programmers are little bit scare (or annoyed) of me. :-)

Next topics: System / Environment

Thursday, June 11, 2015

Do You Know Much It Cost to Open Up a Microsoft Account for a CHILD!!!

[Completely off the professional topic, but its a part of my QA life as well....]


My 3.5 yrs old like calling (video) using his tablet. He kind of expert now in this regard. I used to sign in with my skype account and he used to use it. Now a days, as its getting out of control a bit, i decided to open him one skype account for him so that he does not randomly call my contacts. When i went to create skype account, it tells me to signup for Microsoft account. So i went to create it, filling up all the info using his real birth date. After submitting info, Microsoft detected its a child account and thus they prompt with a screen where it says a parent has to login to verify this. So i did. Now comes the unexpected fun part. 



It prompt me with another thing- wants me to verify that i'm an adult. A page was displayed with credit card purchase option. They want to charge my credit card $0.50 (even though they will donate this money to charity). To open a child account, Microsoft basically charge money! I have not seen it for the adult. (I personally would not mind donating money for good cause. )




Why i'm screaming about it? It does not make any sense, at least for me. For a 3.5yrs old 
- it required to read all those text on screen
- and fill up all those fields, 
- with the capcha security question, 
- then, read the instruction again and tell their parent to come over have them log-in to this PC - and submit the credit card info! 

Really! Microsoft ! what a genius way to verify its an adult who is creating an account for his child. 

I understand that Microsoft wants to make sure it was not created without parents permission, but does not make sense either of their adult verification process. Btw, i had no issue creating a google account for my 3.5 yrs old.   

Wednesday, June 3, 2015

User inputs and App crash - hard to dealt with!

Input character sets are not impossible to define theoretically but in real world how many character set would we define to make test data is a question. With two recent issues in the real world makes it a common scenario that testing was done with limited number of sets.  

If an app is set to be used for a specific purpose or by specific group of people, it is little bit easier to define the guessable sets. When an app is open to use to the world, target audience is, to me, infinite (not theoretical infinite). It is pretty much unobtainable to go through different sets - symbols, group of symbol, symbols in specific sequence, combination of different symbols. Here I’m referring the symbols for letters and symbols. 

Little bit backtrack why I started to write this …. Within a week, I came to know two incidents – one with iPhone message app and another is skype app on windows. 

Skype is used for sending messages, which used to be their primary use at earlier time, now days like smart phone, skype has many other features. On the latest version of skype, if anyone sends a message with the characters “http://:” from a windows pc, it crashes skype and receiving a message with those characters make it crash as well. Then the option is to uninstall the skype and reinstall it. It MAY work as long as you did not have the history turned on at the time of sending/receiving message. If the history is on, skype will crash and will not run. There could be some other ways to handle it, but that surely is not desirable by the end user


Picture curtesy: http://venturebeat.com/ If you want you can read more in details from this link

Another similar thing happened recently with the iPhone message app. Someone received a text from a group message with some symbols/ letters (non-English) and when they open the message, the messenger app stopped working.  Users who receive a mysterious string of characters in a text are noticing their Messages app will consequently crash, and in some cases, the phone will automatically reboot, according to9to5.



Now, if we look into the Skype message again you will see there is a “:” after the http:// which makes it really unusual to type. User may accidently type it and this (can) happen.  Based on the probability it’s had much lower chances, but it happened. 

For the iPhone message, this is hard to understand any meaning of the symbols, all the Greek to me and it may be greek to the Greek people as well. Chances of such message may be <.00001% or even less. But it happened. 

There will be bugs and it may happen. I understand that as well. But the problem is, things like this is spreading on the internet. Some curious people are trying having some fun sending the text to other people. And as it crashes whoever is receiving this message making it a problem. 

Both of the companies are aware of this issue and most probably dealt with it already, from my point of view, how can I prevent it from happening. How can I predict such things so that it does not happen (or reduces the chance of happening) it the real world. This is an input for me and for the people working on my line. I might not have any exact way to deal with it now, but surely i'll try something different while testing considering these scenarios. 

Communication - it's very important in recruiting people

One of the common part of our professional life is we get mails from recruiters time to time regardless whether you are looking for job o...