Desktop Application Desktop Application Testing 2 — Questions and Answers
Question 1: What is the purpose of a test fixture in desktop application unit testing?
- A hardware test bench
- A consistent, known state set up before each test to ensure tests are independent and repeatable (Correct answer)
- A UI template used during testing
- A mock server for API calls
Correct answer: A consistent, known state set up before each test to ensure tests are independent and repeatable
A test fixture sets up prerequisite objects, database state, or file system conditions before each test runs and tears them down afterward, ensuring test isolation.
Question 2: What does mocking mean in the context of desktop application testing?
- Making fun of the application's design
- Replacing real dependencies with controlled fake objects to test a component in isolation (Correct answer)
- Replaying recorded user sessions
- Generating fake test data from a schema
Correct answer: Replacing real dependencies with controlled fake objects to test a component in isolation
Mocks replace real dependencies (databases, APIs, file systems) with fake objects whose behavior is controlled by the test, allowing isolated unit testing.
Question 3: What is code coverage and why is it measured in desktop application testing?
- The percentage of source code files that compile without errors
- The percentage of code lines/branches executed by tests, indicating test thoroughness (Correct answer)
- The ratio of tested to untested developers
- The number of bugs fixed per release
Correct answer: The percentage of code lines/branches executed by tests, indicating test thoroughness
Code coverage metrics show which portions of code are exercised by tests, helping teams identify untested areas that may harbor hidden bugs.
Question 4: What is the purpose of stress testing a desktop application?
- Verify the app works under normal conditions
- Determine the application's behavior and limits when subjected to extreme load or resource constraints (Correct answer)
- Test the application's UI on small screens
- Check that the installer completes in under 30 seconds
Correct answer: Determine the application's behavior and limits when subjected to extreme load or resource constraints
Stress testing pushes the application beyond normal operating limits to identify failure points, resource exhaustion, and recovery behavior under extreme conditions.
Question 5: What is a 'test plan' in desktop application quality assurance?
- A list of bugs found during the last release
- A document describing the testing scope, strategy, resources, schedule, and acceptance criteria (Correct answer)
- An automated test script
- A performance benchmark report
Correct answer: A document describing the testing scope, strategy, resources, schedule, and acceptance criteria
A test plan formalizes what will be tested, how it will be tested, who will test it, and what criteria define a passing release, guiding the entire QA effort.
Question 6: What does accessibility testing verify in a desktop application?
- That the application loads within 2 seconds
- That the application is usable by people with disabilities, including screen reader support and keyboard navigation (Correct answer)
- That the app works on all supported resolutions
- That help documentation is complete
Correct answer: That the application is usable by people with disabilities, including screen reader support and keyboard navigation
Accessibility testing ensures compliance with standards like WCAG and platform accessibility APIs, verifying screen readers, keyboard navigation, and sufficient contrast work correctly.
What is the purpose of a test fixture in desktop application unit testing?