Software Testing Software Testing Automation & Tools 2 — Questions and Answers
Question 1: Which type of testing tool is Selenium primarily used for?
- Performance testing
- Web UI automated functional testing (Correct answer)
- Security vulnerability scanning
- Database testing
Correct answer: Web UI automated functional testing
Selenium is an open-source framework that automates web browser interactions for functional and regression testing of web applications.
Question 2: What is a test driver used for in integration testing?
- Control the test environment hardware
- Simulate a calling module to test a lower-level component (Correct answer)
- Generate test reports automatically
- Manage test case prioritization
Correct answer: Simulate a calling module to test a lower-level component
A test driver calls the component under test, supplying inputs and receiving outputs, enabling bottom-up integration testing.
Question 3: Keyword-driven testing stores test logic as:
- Compiled code files
- Human-readable action keywords in tables (Correct answer)
- Binary scripts
- Database stored procedures
Correct answer: Human-readable action keywords in tables
Keyword-driven testing uses readable action words (like 'Click', 'Enter', 'Verify') stored in tables, making tests accessible to non-programmers.
Question 4: Which metric best measures the completeness of automated test coverage?
- Number of test scripts
- Code coverage percentage (Correct answer)
- Test execution speed
- Number of testers on the team
Correct answer: Code coverage percentage
Code coverage percentage indicates how much of the source code is exercised by the automated test suite, highlighting untested areas.
Question 5: What is the main challenge of record-and-playback test automation?
- It requires advanced programming skills
- Scripts are brittle and break when the UI changes (Correct answer)
- It cannot test web applications
- It only works on mobile devices
Correct answer: Scripts are brittle and break when the UI changes
Recorded scripts are tightly coupled to UI element positions and properties, so minor UI changes frequently break them.
Question 6: In a CI/CD pipeline, where should automated unit tests typically run?
- Only before a production release
- At every code commit as the first quality gate (Correct answer)
- Once a week during scheduled maintenance
- Only when a developer requests it
Correct answer: At every code commit as the first quality gate
Unit tests run at every commit as the fastest, lowest-cost quality gate, providing immediate feedback to developers before code is merged.
Which type of testing tool is Selenium primarily used for?