CAD Testing & Debugging 2 — Questions and Answers
Question 1: What is the primary goal of integration testing?
- Testing individual functions in isolation
- Verifying that combined components or modules work correctly together (Correct answer)
- Testing the final product against end-user requirements
- Measuring application performance under load
Correct answer: Verifying that combined components or modules work correctly together
Integration testing verifies that multiple components interact and function correctly when combined, catching interface-related defects.
Question 2: Which tool category is commonly used for automated UI testing of web applications?
- Unit test frameworks such as JUnit
- Browser automation tools such as Selenium or Playwright (Correct answer)
- Static analysis tools such as SonarQube
- Profiling tools such as VisualVM
Correct answer: Browser automation tools such as Selenium or Playwright
Browser automation tools like Selenium and Playwright simulate real user interactions in a browser to automate web UI testing.
Question 3: What information does a 'stack trace' provide when debugging a runtime error?
- Current memory usage at the time of the error
- The sequence of function calls that led to the error (Correct answer)
- All variable values in the current scope
- A list of all running threads in the application
Correct answer: The sequence of function calls that led to the error
A stack trace shows the call stack at the point of failure, revealing the chain of function calls that led to the error.
Question 4: What does 'boundary value analysis' focus on when designing test cases?
- Security boundaries between application layers
- Performance at maximum capacity thresholds
- Input values at the edges of valid ranges (Correct answer)
- Memory allocation limits within the runtime
Correct answer: Input values at the edges of valid ranges
Boundary value analysis tests input at the exact minimum and maximum edges of valid ranges, where defects most frequently occur.
Question 5: Which debugging feature allows a developer to pause code execution at a specific line and inspect application state?
- Log analysis
- Stack trace review
- Breakpoint debugging (Correct answer)
- Code review
Correct answer: Breakpoint debugging
Breakpoints pause execution at a designated line, enabling developers to inspect variable values, call stacks, and program state in real time.
Question 6: What is 'equivalence partitioning' in software testing?
- Dividing the QA team into specialized testing groups
- Dividing input data into groups expected to be processed similarly (Correct answer)
- Splitting test execution across multiple CI machines
- Separating unit tests from integration tests in the pipeline
Correct answer: Dividing input data into groups expected to be processed similarly
Equivalence partitioning groups input values that should be processed identically, so testing one value from each group is sufficient to represent all values in it.
Question 7: In unit testing, what is a 'test fixture'?
- A physical environment setup for hardware testing
- A fixed, known state of data and objects used as a baseline for tests (Correct answer)
- A template used for filing bug reports
- A test case category that cannot be automated
Correct answer: A fixed, known state of data and objects used as a baseline for tests
A test fixture establishes a consistent, known starting state—data, objects, and environment—before each test executes to ensure repeatability.
What is the primary goal of integration testing?