CAS Testing and Quality Assurance 1 — Questions and Answers
Question 1: What is the primary goal of unit testing in software development?
- To test the entire application as a whole
- To test individual components or functions in isolation (Correct answer)
- To test the integration between multiple systems
- To test the user interface and experience
Correct answer: To test individual components or functions in isolation
Unit testing focuses on testing individual components or functions in isolation to verify each piece works correctly on its own.
Question 2: Which testing approach evaluates software functionality without any knowledge of its internal code structure?
- White-box testing
- Gray-box testing
- Black-box testing (Correct answer)
- Structural testing
Correct answer: Black-box testing
Black-box testing evaluates software functionality purely based on inputs and expected outputs, with no visibility into internal code.
Question 3: What does regression testing primarily aim to verify?
- That new features work as expected when first introduced
- That previously working functionality still works after code changes (Correct answer)
- That the application meets performance benchmarks under load
- That user requirements have been properly documented
Correct answer: That previously working functionality still works after code changes
Regression testing ensures that recent code changes or additions have not broken previously working functionality.
Question 4: Which type of testing simulates real-world user traffic to evaluate system behavior under expected and peak conditions?
- Unit testing
- Integration testing
- Load testing (Correct answer)
- Sanity testing
Correct answer: Load testing
Load testing simulates realistic user volumes to measure how a system performs under expected and peak traffic scenarios.
Question 5: What is a test case?
- A bug report submitted by an end user
- A set of conditions under which a tester determines whether a system satisfies requirements (Correct answer)
- A collection of automated test scripts bundled together
- A document outlining the project testing schedule
Correct answer: A set of conditions under which a tester determines whether a system satisfies requirements
A test case defines specific conditions, inputs, execution steps, and expected outputs used to verify that a system meets its requirements.
Question 6: What is the primary purpose of smoke testing?
- To exhaustively test all application features before release
- To perform preliminary testing that reveals critical failures in a new build (Correct answer)
- To test security vulnerabilities in the application layer
- To verify database query performance under concurrent access
Correct answer: To perform preliminary testing that reveals critical failures in a new build
Smoke testing is a preliminary pass that checks whether a build is stable enough to proceed with more thorough testing by catching critical failures early.
Question 7: Which software development methodology requires writing tests before writing the application code?
- Exploratory testing
- Ad hoc testing
- Test-Driven Development (TDD) (Correct answer)
- Behavior-Driven Development (BDD)
Correct answer: Test-Driven Development (TDD)
Test-Driven Development (TDD) requires developers to write a failing test first, then write the minimum code needed to make it pass.
What is the primary goal of unit testing in software development?