1. What is testing? Write down the difference between blackbox and whitebox testing.
ANS-
In software engineering, testing is the process of finding errors and verifying that a software
application or system is ready for use.
It identifies issues early in the development process so they can be fixed before the product is
launched.
Black Box Testing White Box Testing
It is a way of software testing in which the It is a way of testing the software in which the
internal structure or the program or the code tester has knowledge about the internal
is hidden and nothing is known about it. structure or the code or the program of the
software.
Implementation of code is not needed for Code implementation is necessary for white
black box testing. box testing.
It is mostly done by software testers. It is mostly done by software developers.
No knowledge of implementation is needed. Knowledge of implementation is required.
No knowledge of programming is required. It is mandatory to have knowledge of
programming.
It is also called closed testing. It is also called as clear box testing.
It is least time consuming. It is most time consuming.
Can be done by trial and error ways and Data domains along with inner or internal
methods. boundaries can be better tested.
Example: Search something on google by Example: By input to check and verify loops
using keywords
2. Explain in detail test case design technique with appropriate example.
ANS- Test case design techniques are methods used to create test cases that effectively verify
the functionality, performance, and other aspects of a software system. Which are:
Equivalence Partitioning:
• Equivalence partitioning involves dividing the input space of a program into classes of
equivalent inputs and then selecting representative values from each class as test cases.
The idea is to reduce the number of test cases required while still providing effective
coverage.
• For example, consider a login page that requires a username and password. Instead of
testing every possible combination of valid and invalid inputs, equivalence partitioning
suggests testing one valid username/password pair and one invalid username/password
pair from each partition, such as:
• Valid Username: "john_doe", Valid Password: "password123"
• Invalid Username: "invalid_username", Valid Password: "password123"
Boundary Value Analysis:
• Boundary value analysis focuses on testing the boundaries between equivalence
partitions. The idea is that bugs are more likely to occur at the boundaries of input ranges.
• For example, if a system accepts integers between 1 and 1000, boundary value analysis
would suggest testing values such as 1, 2, 999, 1000, and values just above and below
these boundaries.
Decision Table Testing:
• Decision tables are used to capture complex business rules or system behaviors and
derive test cases from them. The table consists of conditions and corresponding actions,
and test cases are derived to cover all possible combinations of conditions.
• For example, consider a decision table for determining loan approval:
Condition 1 (Age) Condition 2 (Income) Action (Loan Approval)
Under 18 - Denied
18-25 < $20,000 Denied
18-25 ≥ $20,000 Approved
Over 25 < $30,000 Denied
Over 25 ≥ $30,000 Approved
State Transition Testing:
• State transition testing is used for systems that can be in different states and transition
between them based on inputs or events. Test cases are designed to ensure that the system
behaves correctly during state transitions.
• For example, consider a traffic light system with states: Red, Yellow, and Green. Test
cases would be designed to verify that the system transitions correctly from one state to
another based on predefined rules (e.g., Red to Green after Yellow for a certain duration).
Use Case Testing:
• Use case testing involves designing test cases based on the user's interactions with the
system. Test cases are derived from the steps outlined in use cases, ensuring that the
system meets user requirements.
• For example, for an e-commerce website, a use case might be "Make a Purchase." Test
cases would be derived from the steps involved in making a purchase, such as adding
items to the cart, entering shipping information, and completing payment.
3. Write the difference bw static and dynamic analysis.
ANS-
Static analysis Dynamic anslysis
In static analysis, we will check the code or In dynamic anslysis, we will check the
the application without executing the code. code/application by executing the code.
Static analysis includes activities like code Dynamic analysis includes activities like functional
Review, Walkthrough, etc. and non-functional testing such as UT (usability
testing), IT (integration testing), ST (System
testing) & UAT (user acceptance testing).
Static analysis is a Verification Process. Dynamic analysis is a Validation Process.
Static analysis is used to prevent defects. Dynamic analysis is used to find and fix the defects.
Static analysis is a more cost-effective Dynamic analysis is a less cost-effective process.
process.
This type of analysis can be performed Dynamic analysis can be done only after the
before the compilation of code. executables are prepared.
Under static analysis , we can perform the Equivalence Partitioning and Boundary Value
statement coverage testing and structural Analysis technique are performed under dynamic
testing. analysis .
It involves the checklist and process which This type of testing required the test case for the
has been followed by the test engineer. execution of the code.
4. Define reactive and proactive risk strategies. Also write down their advantages and
disadvantages.
ANS- Reactive Risk Strategy:
• Definition: Reactive risk strategy involves responding to risks after they occur. In this
approach, the focus is on managing and mitigating the impact of risks once they have
been identified.
• Advantages:
• Immediate response: Allows for quick action once a risk is realized.
• Targeted mitigation: Resources can be allocated specifically to address known
risks.
• Learning opportunity: Provides insights into the types of risks that can arise in
similar future projects.
• Disadvantages:
• Higher impact: Risks may have already materialized, leading to potentially greater
negative consequences.
• Limited foresight: Lacks proactive measures to prevent risks from occurring in the
first place.
• Resource-intensive: Dealing with risks after they occur may require significant
time, effort, and resources.
Proactive Risk Strategy:
• Definition: Proactive risk strategy involves identifying and addressing risks before they
occur. This approach focuses on preventing or minimizing the likelihood and impact of
potential risks.
• Advantages:
• Prevention of risks: Allows for the anticipation and mitigation of potential risks
before they materialize.
• Reduced impact: By addressing risks early, their negative consequences can be
minimized or avoided altogether.
• Resource optimization: Resources can be allocated more efficiently by addressing
risks in advance, reducing the need for reactive measures.
• Disadvantages:
• Resource allocation: Requires upfront investment in risk assessment and mitigation
efforts.
• Uncertainty: It may be challenging to anticipate all potential risks accurately.
• Over-preparation: There is a risk of spending too much time and resources on
mitigating low-impact risks.
5. PERT and GANTT chart?
ANS-
Project Evaluation and Review Technique (PERT) chart is a procedure through which
activities of a project are represented in its appropriate sequence and timing. It is a scheduling
technique used to schedule, organize and integrate tasks within a project. PERT is basically a
mechanism for management planning and control which provides blueprint for a particular
project. All of the primary elements or events of a project have been finally identified by the
PERT.
In this technique, a PERT Chart is made which represent a schedule for all the specified tasks in
the project. The reporting levels of the tasks or events in the PERT Charts is somewhat same as
defined in the work breakdown structure (WBS).
Characteristics of PERT:
The main characteristics of PERT are as following :
1) It serves as a base for obtaining the important facts for implementing the decision-
making.
2) It forms the basis for all the planning activities.
3) PERT helps management in deciding the best possible resource utilization method.
4) PERT take advantage by using time network analysis technique.
5) PERT presents the structure for reporting information.
6) It helps the management in identifying the essential elements for the completion of the
project within time.
Advantages of PERT:
It has the following advantages :
1) Estimation of completion time of project is given by the PERT.
2) It supports the identification of the activities with slack time.
3) The start and dates of the activities of a specific project is determined.
4) It helps project manager in identifying the critical path activities.
5) PERT makes well organized diagram for the representation of large amount of data.
Disadvantages of PERT:
It has the following disadvantages :
6) The complexity of PERT is more which leads to the problem in implementation.
7) The estimation of activity time are subjective in PERT which is a major disadvantage.
8) Maintenance of PERT is also expensive and complex.
9) The actual distribution of may be different from the PERT beta distribution which
causes wrong assumptions.
10) It under estimates the expected project completion time as there is chances that other
paths can become the critical path if their related activities are deferred.
Gantt Chart
Generalized Activity Normalization Time Table (GANTT) chart is type of chart in which
series of horizontal lines are present that show the amount of work done or production
completed in given period of time in relation to amount planned for those projects. It is
horizontal bar chart developed by Henry L. Gantt (American engineer and social scientist) in
1917 as production control tool. It is simply used for graphical representation of schedule that
helps to plan in an efficient way, coordinate, and track some particular tasks in project.
The purpose of Gantt chart is to emphasize scope of individual tasks. Hence set of tasks
is given as input to Gantt chart. Gantt chart is also known as timeline chart. It can be developed
for entire project or it can be developed for individual functions. In most of projects, after
generation of timeline chart, project tables are prepared. In project tables, all tasks are listed in
proper manner along with start date and end date and information related to it.
Gantt chart represents following things :
• All the tasks are listed at leftmost column.
• The horizontal bars indicate or represent required time by corresponding particular task.
• When occurring of multiple horizontal bars takes place at same time on calendar, then
that means concurrency can be applied for performing particular tasks.
• The diamonds indicate milestones.
Advantages :
• Simplify Project –
Gantt charts are generally used for simplifying complex projects.
• Establish Schedule –
It simply establishes initial project schedule in which it mentions who is going to do
what, when, and how much time it will take to complete it.
• Provide Efficiency –
It brings efficiency in planning and allows team to better coordinate project activities.
• Emphasize on scope –
It helps in emphasizing i.e., gives importance to scope of individual tasks.
• Ease at understanding –
It makes it easy for stakeholders to understand timeline and brings clarity of dates.
• Visualize project –
It helps in clearly visualizing project management, project tasks involved.
• Organize thoughts and Highly visible –
It organizes your thoughts and can be highly visible so that everyone in enterprises can
have basic level of understanding and have knowledge about what’s happening in project
even if they are not involved in working.
Disadvantages :
• Sometimes, using Gantt chart makes project more complex.
• The size of bar chart dost not necessarily indicate amount of work done in project.
• Gantt charts and projects are needed to be updated on regular basis.
• It is not possible or difficult to view this chart on one sheet of paper. The software
products that produce Gantt chart needed to be viewed on computer screen so that whole
project can be seen easily.
6. Define mutation testing.
ANS- Mutation testing, also known as code mutation testing, is a form of white box testing in
which testers change specific components of an application's source code to ensure a software
test suite can detect the changes.
Tools used for Mutation Testing :
• Judy
• Jester
• Jumble
7. Define test coverage analysis.
ANS- Test coverage analysis is a software testing method that measures how well a test suite
tests a program's source code. It helps identify which areas of code have been executed during
testing and which have not.
Test coverage is calculated as the percentage of application code that is tested. For example, if a
codebase has 10,000 lines of code and test cases test 5,000 lines, the coverage is 50%
Benefits of Test Coverage in Software Engineering