B.S.W.E. Bachelor of Software Engineering Software Testing & Quality Assurance 1 — Questions and Answers
Question 1: What is the difference between white-box and black-box testing?
- White-box uses color-coded results; black-box does not
- White-box tests internal code structure; black-box tests external behavior only (Correct answer)
- White-box is manual testing; black-box is automated testing
- White-box is for databases; black-box is for user interfaces
Correct answer: White-box tests internal code structure; black-box tests external behavior only
White-box testing examines internal code structure and logic paths, while black-box testing focuses on external behavior without knowledge of the implementation.
Question 2: What is unit testing?
- Testing the entire application end-to-end
- Testing individual functions or components in isolation (Correct answer)
- Testing network performance and latency
- Testing user interface layout and elements
Correct answer: Testing individual functions or components in isolation
Unit testing involves testing individual units of code (functions or methods) in isolation from the rest of the system to verify correctness.
Question 3: What does TDD stand for and what is its key practice?
- Test Driven Development — write tests before writing code (Correct answer)
- Technical Design Document — write specs before coding
- Testing Data Definition — define test data first
- Top-Down Design — design from high level to detail
Correct answer: Test Driven Development — write tests before writing code
Test Driven Development (TDD) is a methodology where you write a failing test first, then write code to make it pass, then refactor.
Question 4: What is regression testing?
- Testing only newly added features in a release
- Re-running tests to ensure existing functionality still works after changes (Correct answer)
- Testing system performance under increasing load
- Testing accessibility for users with disabilities
Correct answer: Re-running tests to ensure existing functionality still works after changes
Regression testing re-runs existing tests after code changes to verify that previously working functionality has not been unintentionally broken.
Question 5: What is the purpose of integration testing?
- Testing each module completely independently
- Testing how multiple components work together as a group (Correct answer)
- Testing complete end-user workflows in production
- Testing database query performance
Correct answer: Testing how multiple components work together as a group
Integration testing verifies that different modules or services interact correctly when combined, catching defects at component interfaces.
Question 6: What is code coverage in software testing?
- How many developers reviewed the code
- The percentage of source code executed during test runs (Correct answer)
- The total number of test cases written
- The elapsed time to run the full test suite
Correct answer: The percentage of source code executed during test runs
Code coverage measures the percentage of source code lines, branches, or paths that are actually executed when the test suite runs.
What is the difference between white-box and black-box testing?