Interview Questions On Software Testing

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Interview questions on Software Testing

1. What is PDCA cycle and where testing fits in?

Software testing is an important part of the software development process. In


normal software development, there are four important steps, in short, the
PDCA (Plan, Do, Check, Act) cycle.

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.

Developers and other stakeholders of the project do the "planning and


building," while testers do the check part of the cycle. Therefore, software
testing is done in check part of the PDCA cycle.

2. What is usability testing?

Usability testing is a testing methodology where the end customer is asked to


use the software to see if the product is easy to use, to see the customer's
perception and the amount of time taken to use the software for a task. The best
way to finalize the customer point of view for usability is by using prototype
software during the initial stages. This way we can confirm that we are not
missing anything from the user point of view.

3. Which is the best testing model?

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

4. What is the difference between a defect and a failure?

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

7. What are different types of verifications?

Verification is static type of software testing. Code will not be executed. The
product is evaluated by going through the code.

Types of verification are:

Walkthrough: Walkthroughs are informal, initiated by the author of the software


product to colleagues for assistance in locating defects or suggestions for
improvements. They are usually unplanned. Author explains the product;
colleague comes out with observations and author notes down relevant points
and takes corrective actions.
Inspection: Inspection is a thorough word-by-word checking of a software
product with the intention of locating defects, confirming traceability of
relevant requirements etc.

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.

9. What do entry and exit criteria mean in a project?

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

10. What is the difference between verification and validation?

Verification is a review without actually executing the process while validation


is checking the product by executing the source code.

For instance, code review and syntax checking is verification while actually
running the product and cross-checking the results is validation.

11. What is the difference between latent and masked defects?

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.

12. What's the difference between alpha and beta testing?

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?

Coverage is a measurement used in software testing to describe the degree to


which the source code is tested. There are three basic 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.

14. Can you explain the concept of defect cascading?

Defect cascading is a defect which is caused by another defect. One defect


triggers the other defect. For instance, in the accounting application shown here
there is a defect which leads to negative taxation. So the negative taxation defect
affects the ledger which in turn affects four other modules.
Interview questions on Software Testing

15. Does automation replace manual testing?

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.

As a rule of thumb do not try to automate:

Unstable software: If the software is still under development and undergoing


many changes automation testing will not be that effective.
Infrequent test scripts: Do not automate test scripts which will be run once in a
while.

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

16. Can you explain data-driven testing?

Normally an application has to be tested with multiple sets of data. For


instance, a simple login screen, depending on the user type, will give different
rights.

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.

17. What is the main difference between preventative and reactive


approaches to 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.

19. What is an equivalence partition or an equivalence class?

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

22. What are the benefits of Independent 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.

23. What are the different Methodologies in Agile Development Model?

There are currently seven different agile methodologies:


 Extreme Programming (XP)
 Scrum
 Lean Software Development
 Feature Driven Development (FDD)
 Adaptive Software Development (ASD)
 Crystal
 Dynamic Systems Development Model (DSDM)

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

26. What are the phases of a formal review?

In contrast to informal reviews, formal reviews follow a formal process. A


typical formal review process consists of:
i. Planning
ii. Preparation
iii. Review meeting
iv. Rework
v. Follow-up

27. What is negative and positive 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.

28. What is the purpose of a test completion criterion?

To determine when to stop testing.

29. What is the difference between re-testing and regression testing?

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

31. When should configuration management procedures be implemented?

During test planning.

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

36. What makes an inspection different from other review types?

It is led by a trained leader, uses formal entry and exit criteria and checklists.

37. What is the purpose of requirement acquisition phase?

To freeze requirements, to understand user needs, to define the scope of testing

38. Why is testing process split into distinct stages?

Testing is split into distinct stages because of following reasons

 Each test stage has a different purpose.


 It is easier to manage testing in stages.
 We can run different test into different environments.
 Performance and quality of the testing is improved using phased testing.

39. What is Alpha testing?

Pre-release testing by end user representatives at the developer’s site.

40. What is the purpose of test design technique?

Identifying test conditions and test cases.

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

42. What is Fault Masking?

One error condition hiding another error condition.

43. What is the difference between static and dynamic testing?

Static testing: In this type of testing method, the code is not executed and it is
performed using the software documentation.

Dynamic testing: To perform this testing, the code has to to be in an executable


form.

44. What is COTS?

COTS stands for Commercial Off The Shelf. It is used to refer the software
products which are available to general public for sale.

e.g. Microsoft Windows Operating System, Anti-virus Softwares etc.

45. What is the difference between STLC (Software Testing Life Cycle) and
SDLC (Software Development Life Cycle)?

SDLC comprises of verification and validation of a software, whereas STLC


focuses only on validation. STLC is an integral part of SDLC.

46. Which are the different levels of testing?


 Unit Testing
 Component Testing
 Integration Testing
 System Testing
 Acceptance Testing

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

 Major: Affects operations on a very large scale.


 Critical: Brings the system to a halt. It’s a show-stopper.

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?

9, 10, 149, 150

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.

You might also like