Software Testing Important Questions
Software Testing Important Questions
1. Explain SDLC (Software Development Life Cycle) in detail & also the needs of
software engineering.
2. Explain the role of process in software quality & discuss how to design an efficient
software.
3. Explain the concept of defect classes with suitable examples (defect repository).
4. Explain the process of test case design using the black box approach.
5. Explain the process of test case design using the white box approach.
6. Explain the concept of boundary value analysis with equivalence class partitioning
technique.
7. Explain all types of testing (unit, integration, validation, system, black box, white box,
alpha, beta, performance, stress, regression & random).
8. Explain the no. of independent paths & also discuss how we design the control flow
graph for a specific software.
9. Random testing: Explain the concept of test harness in software testing.
10. Discuss 7 principles of software testing.
1. Explain SDLC (Software Development Life Cycle) in detail & also the needs of
software engineering.
Answer:
The Software Development Life Cycle (SDLC) is a structured process used for developing
software applications, ensuring high quality and efficiency. The stages of SDLC include:
Answer:
Answer:
Defect classes refer to different categories of defects that can occur in software. They help
in identifying, tracking, and resolving defects efficiently. Some common defect classes are:
A defect repository is a database that tracks and categorizes all defects, providing
information like defect description, severity, status, and resolution steps.
4.Explain the process of test case design using the black box approach.
Answer:
The Black Box Testing Approach involves designing test cases without knowledge of the
internal code or structure. The focus is on testing the software’s functionality against the
specified requirements.
1. Identify Test Scenarios: Based on the software's requirements, identify different test
scenarios.
2. Define Input Data: Create a variety of input conditions to test different functionalities.
3. Determine Expected Outputs: Define the expected results for each test case based
on the requirements.
4. Execute Test Cases: Run the test cases using the input data and compare the
actual output with the expected output.
5. Document Results: Record the outcomes, including any discrepancies or defects
found.
5. Explain the process of test case design using the white box approach.
Answer:
The White Box Testing Approach involves designing test cases with knowledge of the
software's internal structure, code, and logic.
1. Identify all paths in the code: Understand the program logic, flow, and structure.
2. Develop Test Cases for Coverage: Create test cases to cover all statements,
branches, conditions, and paths.
3. Execute Test Cases: Execute the designed test cases, ensuring all internal code
paths are validated.
4. Check for Logic Errors: Identify any logical errors or issues with loops, conditions,
or data flow.
5. Document and Analyze Results: Record the test outcomes and analyze any
defects found.
Answer:
Boundary Value Analysis (BVA) and Equivalence Class Partitioning (ECP) are two
widely used techniques in test case design
.
● Equivalence Class Partitioning (ECP): Divides the input data into different classes
(equivalence partitions) where the system is expected to behave similarly. Test cases
are created for each partition.
○ For example, if a system accepts input from 1 to 100, ECP might have three
partitions: valid (1-100), below valid range (<1), and above valid range (>100).
● Boundary Value Analysis (BVA): Focuses on testing at the boundaries of the
equivalence partitions since errors often occur at boundary values.
○ In the example above, BVA would test values like 0, 1, 2 (just below and at
the lower boundary), and 99, 100, 101 (just below and at the upper
boundary).
Answer:
Answer:
Independent paths in a software program represent unique execution routes through the
code, ensuring that all possible scenarios are tested. These are determined using
Cyclomatic Complexity, calculated as:
Testing all independent paths ensures thorough coverage of the software logic.
Answer:
Random Testing: A technique where random inputs are used to test the software, aiming to
discover unexpected defects.
Test Harness: A collection of test scripts, software tools, and data that allows the
automation of testing by providing inputs, executing tests, and capturing results. It simulates
the environment and controls the execution of tests, making it easier to conduct repetitive
and thorough testing.
Answer:
1. Testing shows the presence of defects: Testing can prove defects exist but cannot
confirm their absence.
2. Exhaustive testing is impossible: Testing all possible inputs and scenarios is
impractical.
3. Early testing: Testing should begin as early as possible in the SDLC.
4. Defect clustering: A small number of modules typically contain most defects.
5. Pesticide paradox: Repeating the same tests will no longer find new defects; tests
need to be updated regularly.
6. Testing is context-dependent: Different applications require different testing
approaches.
7. Absence-of-errors fallacy: Even a defect-free system might fail if it doesn't meet
user requirements.