Interview Questions On Software Testing
Interview Questions On Software Testing
Interview Questions On Software Testing
Plan
Act Do
Check
Plan: Define the goal and the plan for achieving that goal.
Do/Execute: Depending on the plan strategy decided during the plan stage
we do execution accordingly in this phase.
Check: Check/Test to ensure that we are moving according to plan and we
are getting the desired results.
Act: During the check cycle, if any issues are there, then we take appropriate
action accordingly and revise our plan.
In real projects, tailored models are proven to be the best, because they share
features from The Waterfall, Iterative, Evolutionary models, etc. and can fit into
real life time projects. Tailored models are most productive and beneficial for
many organizations. If it's a pure testing project, then the V model is the best.
Interview questions on Software Testing
When a defect reaches the end customer it is called a failure and if the defect is
detected internally and resolved it's called a defect.
5. Should testing be done only after the build and execution phases are
complete?
In traditional testing methodology testing is always done after the build and
execution phases. Fixing a defect in maintenance is ten times costlier than fixing
it during execution. So the earlier we catch a defect the more cost effective it is.
In the requirement phase we can verify if the requirements are met according
to the customer needs. During design we can check whether the design
documents cover all the requirements. In this stage we can also generate rough
functional data. We can also review the design document from the architecture
and the correctness perspectives. In the build and execution phase we can
execute unit test cases and generate structural and functional data. And finally
comes the testing phase, done in the traditional way i.e. run the system test
cases and see if the system works according to the requirements. During
installation we need to see if the hardware system is compatible with the
software. Finally, during the maintenance phase when any fixes are made we
can retest the fixes and follow the regression testing.
Therefore, testing should occur in conjunction with each phase of the software
development.
6. Will there be more defects in the design phase or in the coding phase?
The design phase is more error prone than the execution phase. One of the most
frequent defects which occur during design is that the product does not cover
the complete requirements of the customer.
Since the design phase drives the execution phase it is the most critical phase
to test. The testing of the design phase can be done by reviews and inspections.
On average, 60% of defects occur during design and 40% during the execution
phase.
Interview questions on Software Testing
Verification is static type of software testing. Code will not be executed. The
product is evaluated by going through the code.
8. Which test cases are written first: white box’s or black box’s?
Normally black box test cases are written first and white box test cases later. In
order to write black box test cases we need the requirement document and,
design or project plan. All these documents are easily available at the start of
the project. White box test cases cannot be started in the initial phase of the
project because they need more architecture clarity which is not available at the
start of the project. So normally white box test cases are written first.
Black box test cases do not require system understanding but white box testing
needs more structural understanding. And structural understanding is clearer
in the later part of project, i.e. while designing and executing. For black box
testing you need to only analyse from the functional perspective which is easily
available from a simple requirement document.
Entry and exit criteria are a must for the success of any project. If you do not
know where to start and where to finish then your goals are not clear. By
defining exit and entry criteria you define your boundaries.
For instance, you can define entry criteria that the customer should provide the
requirement document or acceptance plan. If this entry criteria is not met then
you will not start the project. On the other end, you can also define exit criteria
for your project. For instance, one of the common exit criteria in projects is that
the customer has successfully executed the acceptance test plan.
Interview questions on Software Testing
For instance, code review and syntax checking is verification while actually
running the product and cross-checking the results is validation.
A latent defect is an existing defect that has not yet caused a failure because the
corresponding sets of conditions are not yet met.
A masked defect is an existing defect that hasn't yet caused a failure just
because another defect has prevented that part of the code from being executed.
Alpha testing is the acceptance testing done at the development site. Some
organizations have a different visualization of alpha testing. They consider
alpha testing as testing which is conducted on early, unstable versions of
software. On the contrary beta testing is acceptance testing conducted at the
customer end.
In short, the difference between beta testing and alpha testing is the location
where the tests are done.
13. What is coverage and what are the different types of coverage techniques?
Statement coverage: This coverage ensures that each line of source code has
been executed and tested.
Decision coverage: This coverage ensures that every decision (true/false) in
the source code has been executed and tested.
Path coverage: In this coverage we ensure that every possible route through
a given part of code is executed and tested.
Automation is the integration of testing tools into the test environment in such
a manner that the test execution, logging and comparison of results are done
with little human intervention. A testing tool is a software application which
helps automate the testing process. But the testing tool is not the complete
answer for automation.
Many testers learn the hard way that everything cannot be automated. The best
components to automate are repetitive tasks. So many companies first start
with manual testing and then see which tests are the most repetitive ones and
only those are then automated.
Code and document reviews: Do not try to automate code and document reviews.
All repetitive tasks which are frequently used should be automated. For
example, regression tests are prime candidates for automation because they're
typically executed many times. Smoke, load, and performance tests are other
examples of repetitive tasks that are suitable for automation. White box testing
can also be automated using various unit testing tools. Code coverage can also
be a good candidate for automation.
Interview questions on Software Testing
For example, if the user is an admin he will have full rights, while a user will
have limited rights and support if he only has read-only support rights. In this
scenario the testing steps are the same but with different user ids and
passwords. In data-driven testing, inputs to the system are read from data files
such as Excel, CSV (comma separated values) and ODBC. So the values are read
from these sources and then test steps are executed by automated testing.
Preventative tests are designed early; reactive tests are designed after the
software has been produced.
18. What is the difference between Testing Techniques and Testing Tools?
Testing technique is a process for ensuring that some aspects of the application
system or unit function properly. There may be few techniques but many tools.
Testing Tools are vehicles to conduct testing. The tool is a necessary resource
to the tester, but not sufficient.
An input range of values such that only one value in the range becomes a test
case. Only one value in an equivalence represents a range of values for a test
case. If this value passes a test case then all other values in that partition will
also pass. Equivalence partitioning technique reduces the number of test cases
to be written.
Interview questions on Software Testing
20. Name the type of functional testing, which investigates the functions
relating to detection of threats, such as virus from malicious outsiders?
Security Testing
21. Which testing activity is performed to expose defects in the interfaces and
in the interaction between merged components?
Integration Testing
Independent testers are unbiased and identify different defects at the same
time. He will have different set of assumptions from that of developers and
other members in the team.
An independent tester can report his results honestly and without any
concern for reprisal that might result from pointing out problems in co-
workers’ or, worse yet, the manager’s work.
24. Consider the following techniques. Which are static and which are
dynamic techniques?
Equivalence Partitioning
Use Case Testing
Data Flow Analysis
Exploratory Testing
Decision Testing
Inspections
Data Flow Analysis and Inspections are static. The rest are dynamic.
25. Why static testing and dynamic testing are described as complementary?
Because they share the aim of identifying defects but differ in the types of
defects they find.
Interview questions on Software Testing
A negative test is when you provide an invalid input and get errors as expected.
While a positive testing, is when you provide a valid input and expect output
in accordance with the specification.
Re-testing ensures the defect has been removed whereas regression testing
looks for unexpected side effects as a result of changes made in the code.
30. Which method of static testing requires formal entry and exit criteria,
including metrics?
Inspection
32. Name the form of testing in which we subject the target of the test, to
varying workloads to measure and evaluate the performance behaviours
and ability of the target and of the test to continue to function properly
under these different workloads?
Load Testing
33. An input field takes the year of birth between 1987 and 2002 what are the
boundary values for testing this field?
1986,1987,2002,2003
Interview questions on Software Testing
34. What is the one key reason why developers have difficulty testing their
own work?
Lack of Objectivity
35. What is black box testing? What are the different black box testing
techniques?
Black box testing is a form of dynamic testing, which is used to test the software
without knowing the internal structure of code or program. This testing is
usually done to check the functionality of an application. The black box testing
techniques are
Equivalence partitioning
Boundary value analysis
Error guessing
It is led by a trained leader, uses formal entry and exit criteria and checklists.
41. When testing a grade calculation system, a tester determines that all
scores from 95 to 100 will yield a grade of A+, but scores below 95 will
not. Name the analysis technique.
Interview questions on Software Testing
Equivalence Partitioning
Static testing: In this type of testing method, the code is not executed and it is
performed using the software documentation.
COTS stands for Commercial Off The Shelf. It is used to refer the software
products which are available to general public for sale.
45. What is the difference between STLC (Software Testing Life Cycle) and
SDLC (Software Development Life Cycle)?
47. While testing a module tester ‘X’ finds a bug and assigns it to a developer
‘Y’. But the developer rejects the same, saying that it’s not a bug. What
‘X’ should do?
Send the detailed information of the bug encountered like steps to reproduce
the bug, version of the build to which the module belongs etc.
48. Which are the different impact ratings that can be used for classifying
defects found?
Minor: Very low impact but does not affect operations on a large scale.
Interview questions on Software Testing
49. A wholesaler sells modems. The minimum order quantity is 10. There is
a 15% discount for orders of 150 or more modems. You have been asked
to prepare test cases using various values for the number of modems
ordered. What could be the test inputs that can be generated using
Boundary Value Analysis?
50. Suppose a developer wants to test a module ‘M’ and it needs data
generated from other modules which are not yet developed. So what
should the developer do now?
Developer should write ‘driver’ and ‘stub’ modules. These are the dummy
modules which replace the missing components during testing module M.
Driver module passes the data needed by module M and Stub module accepts
the output data generated by it. This way testing is not halted due to the non-
development of modules on which module M is dependent.