Software Testing FAQ and Interview Questions and Answers

Posted on Jun 17 2012 - 3:16pm by Raj

Testing is one of the important aspects of software development cycle. In this article I have listed down all the software testing frequently asked questions (FAQs) Interview Questions and Answers. This will help both freshers and experienced testers.
Q: What is software testing? What is the purpose of software testing?
According to definition given by The Institute of Electrical and Electronics Engineers, USA (IEEE) – Software testing is the process of analyzing a software item to detect the differences between existing and required conditions (that is, bugs) and to evaluate the features of the software item
According to the definition given by Dave Gelperin and William C. Hetzel – Software testing can be stated as the process of validating and verifying that a software program/application/product:
1.    meets the requirements that guided its design and development
2.    works as expected
3.    can be implemented with the same characteristics
4.    satisfies the needs of stakeholders
The purpose of software testing is to verify, validate and detect errors in the software application/item under testing.
Verification process helps in testing the conformance of software against the pre-defined requirements. This helps in identifying any issues related to missing or incomplete requirement implementation.
Validation process helps in ensuring that software system being developed is in sync with the expectations of the stakeholders. This helps in checking if the software developed is going to suffice the needs of all stakeholders.
Further, software testing process helps in finding defects/errors in the software system. Good testing is to find errors and defects whereas successful testing is about finding defects which were not unleashed in previous tests performed.

Q: What is black box testing? What do Black-box testing methods include?
The black-box testing involves testing of the software interface. In this testing approach only functionality of the software system is tested without considering the logic of the program and internal structure. This testing method emphasize on executing the functions and verifying and validating input and output data based on the requirements, therefore, black box testing also known as functional testing or data-driven testing.
Black-box testing methods include: equivalence partitioning, boundary value analysis, cause and effect diagram analysis, error guessing method.
In the equivalence partitioning black-box testing method input data of a software function is divided into partitions of data. These partitions are used to define test cases.  This helps in reducing the total number of test cases while ensuring that maximum requirements are covered and testing should be able to unleash all defects on the basis of defined test cases and data units.
For example, if the software application has input text box which allows number between 1-20. Hence instead of writing large number of test cases we can partition this data into three conditions –
•    Data with any valid number – meaning input data between 1 to 20
•    Data with invalid number ( lower value) – meaning input data from 0 to any negative value
•    Data with invalid number ( higher value) –

For example the sample below shows categorization and mapping for travel portal.

meaning input data from 21 to any higher value
Based on the equivalence partitioning, testing can be performed using these test cases to provide maximum coverage.
Boundary value analysis method is used for designing test cases to test the boundary conditions of software function under test. As most of the input conditions with boundary value cause errors in the system hence to detect the same boundary value of input range is used to detect errors. In boundary value analysis tester should select exactly equal, just greater than or just less than the boundary value as the test data, rather than the typical value. Boundary value analysis method supplements equivalence partitioning method of black box testing.
Considering the scenario stated above, test cases for input box accepting numbers between 1-20 will be created on the basis of –
•    Test data with exactly similar value as input boundaries which is  values 1 and 20
•    Test data with values just below the extreme values of input boundaries which is values 0 and 19
•    Test data with values just above the extreme values of input boundaries which is values 2 and 21

Cause and effect diagram method is used to identify test cases wherein inputs are logically combined and the related output conditions. Unlike Equivalence class partitioning and boundary value analysis wherein the focus is to consider specific input condition, in cause and effect method conditions are considered wherein there is link between the input conditions or forming mutual combination. Based on the diagram decision table is developed which helps in designing  test cases considering the description in the form of a combination of a variety of conditions, consequential action.
Error guessing method is used by experience testers wherein based on the understanding of requirements, complex areas of application are identified and targeted for writing test cases.

Risk profiling and analysis is performed by tester to –
•    Identify areas of application which are critical for the business
•    Parts of application with unclear requirements
•    Parts of application wherein there were number of requirement changes happened during development phase or release on release.
•    Implementation of requirement is done involving coding complex business logic
Based on identified scenarios as stated above, tester designs test cases for performing black box testing.
The black-box testing attempts to find the following types of errors:
1) Functional errors or omissions;
2) Interface error;
3) Data structures or external database access error;
4) Performance error;
5) Initialization and termination errors.

Approach to tiered regression testing –
As discussed above, we use different combination of techniques to identify error prone areas of the application to design test cases. Similarly while executing each cycle during development it involves lots of resources and effort to execute all test cases. To overcome the challenge of less time and execution requirement of large number of test cases, testers perform tiered regression testing.

To create regression suite, we can use weighted criteria approach. The matrix is formed listing all critical business drivers required to be accomplished by the software application on x axis and the functionality of the application which will result in achieving those goals on y axis. The result of this exercise is formulation of balanced score card for the application functionality and business goals.
For example the sample below shows categorization and mapping for travel portal.

As a next step for every release, based on the core functionality Tiering will be carried out with inputs from Business. Further, which tiers of regression testing are to be executed can be decided based on Risk profiling.

Q: What is white box testing? What do white-box testing methods include?
White box testing involves testing of the program code, code structure and the internal design flow of the application. White box testing is usually performed before black box testing as its focus is to test specific modules or component of the software application.
In white box testing, the test object is treated as an open box. This allows testers to use the program within the logical structure and related information, design or selection of test cases to test all program logic paths. Therefore, white-box testing is also known as structural testing or logic-driven testing.
White-box testing include statement coverage, decision coverage, condition coverage, decision and condition coverage combined conditions coverage, path coverage, etc.
In the statement coverage test cases are designed to execute statement and maximum coverage should be achieved. Whereas in decision based white box test design technique test cases are designed to execute decision outcomes. In decision coverage each judgmental point in the program is used at least once as “true value” or “false value”; or have procedures in each one to take “real” branch and take the branch of “false” experience at least once.
For conditions coverage, a set of test cases is designed to ensure that each condition (True/False) is met at least once to determine the possible values for each logical condition in the statement.
In data flow testing technique test cases are designed to execute definition and use pairs of variables. This helps in testing definition and usage of data variables used by developer.

Q: What is a software defect?
Software defect is a flaw in the software system or application that can cause the system to fail to perform its required function, e.g. an incorrect statement or data definition.
In the software release cycle generally we have three major releases  –  Alpha version, Beta version and  Final version.
Under the final version we can provide three options to users – Trial version, Unregistered version and Demo version.
α (Alpha) version
This version of the software is only a preliminary finished product. This is used primarily for internal communication by the development team to all stakeholders. In general, this version of the software is shared with professional testers. Development team uses this version to test the product if it is defective. It is used to verify that the product features and instructions, user manuals are aligned with requirements.
β (beta) version
This version of the software as compared to the α version is the improvised version of product. In this version, all serious issues are eliminated,  but still there could be some shortcomings, the need to further eliminate the large-scale release test. This version is usually released free of charge by the software company, the user can download from the related sites. Some professional enthusiasts report back test results to the development team. This version is not suitable for the average user to install.
γ Edition
This version is already quite mature and upcoming official version of the software system. This software system can be released in following formats to users:
Trial (trial version)
The trial version of software is quite popular in recent years, mainly due to the rapid development of the Internet. This version of the software is provided to the user for trial purpose. After time limit expires if the user wishes to continue using the software generally they have to pay a fee to register or purchase. Certain trail version software’s provide access to limited features of the licensed version of software application.
Unregistered (unregistered version)
Trial version and unregistered version are very similar to each other, however unregistered version doesn’t have any time limit. These versions also provide limited access to features of the license version.
Demo ( demo version)
This version is used for formal demonstration of software features to users. This helps users to learn the basic operation of the software. This helps in expanding the sale of official product by influencing user while showcasing its features. Demo versions are also available for free download from the Internet. Demo version generally cannot be upgraded or registered as the official version.

About the Author

Leave A Response