Software Testing Practice Test β Questions and Answers
Question 1: Software testing should begin
- when the requirements have been formally documented
- as soon as the code is written
- as soon as possible in the development life cycle (Correct answer)
- during the design stage
Correct answer: as soon as possible in the development life cycle
Modern software development emphasizes 'shift-left' testing, meaning testing activities should commence as early as possible in the development life cycle. This includes reviewing requirements, designing test cases during the design phase, and performing static analysis on code. Early testing helps identify defects when they are cheaper and easier to fix, reducing overall project costs and improving software quality.
Question 2: Which of the following is not a component of the Test Execution and Implementation Phase?
- Designing the Tests (Correct answer)
- Comparing actual results
- Executing test cases either manually or by using test execution tools
- Creating test suites from the test cases
Correct answer: Designing the Tests
The Test Execution and Implementation Phase focuses on running the tests and managing the results. This includes creating test suites, executing test cases, and comparing actual results to expected outcomes. 'Designing the Tests' is a distinct activity that occurs earlier, typically in the Test Analysis and Design phase, where test conditions and test cases are conceptualized and specified.
Question 3: Which of the following is NOT typically included in a test plan?
- Features to be tested
- Risks
- Schedule
- Incident reports (Correct answer)
Correct answer: Incident reports
A test plan outlines the scope, objectives, resources, and schedule of testing activities. It typically includes features to be tested, risks, and the testing schedule. Incident reports, which document defects found during testing, are outputs of the test execution phase and are usually managed separately, though their reporting process might be defined within the test plan.
Question 4: All of the following can be found during inspections, with the exception of
- Variables not defined in the code
- Requirements that have been omitted from the design documents
- How much of the code has been covered (Correct answer)
- Spelling and grammar faults in the documents
Correct answer: How much of the code has been covered
Inspections are a static testing technique where code or documents are manually reviewed to find defects, such as undefined variables, missing requirements, or grammatical errors. However, 'how much of the code has been covered' (code coverage) is a dynamic testing metric, measured by executing the code with test cases, not by static inspection.
Question 5: Equivalence partitioning is defined as
- A black box testing technique used only by developers
- black box testing technique appropriate to all levels of testing (Correct answer)
- A white box testing technique appropriate for component testing
- black box testing technique than can only be used during system testing
Correct answer: black box testing technique appropriate to all levels of testing
Equivalence partitioning is a black-box testing technique where input data is divided into partitions (or classes) of equivalent data. The assumption is that if one condition in a partition works, all will work, and if one fails, all will fail. This technique is highly effective for reducing the number of test cases while maintaining test coverage and can be applied at all levels of testing.
Question 6: Which phase includes the reporting of discrepancies as incidents
- Test Analysis and Design (Correct answer)
- Evaluating exit criteria and reporting
- Test Closure Activities
- Test Implementation and execution
Correct answer: Test Analysis and Design
During the Test Analysis and Design phase, discrepancies such as unclear, incomplete, or conflicting requirements can be identified. These issues, though not found by executing code, are critical defects that need to be formally reported as incidents to ensure the quality of the test basis and prevent costly errors later. This early reporting helps refine the requirements and design before test execution begins.
Question 7: Which areas are covered by CMMI-SVC?
- Product and service development
- Service establishment, management, and delivery (Correct answer)
- Product and service acquisition
- None of the above
Correct answer: Service establishment, management, and delivery
CMMI-SVC (Capability Maturity Model Integration for Services) is a process improvement framework specifically designed for organizations that provide services. It focuses on establishing, managing, and delivering services effectively and efficiently. This model helps service providers improve their processes to meet customer needs, manage service agreements, and ensure high-quality service delivery.
Question 8: Which type of integration testing entails coupling all or most of the created modules to form a complete software system or main element of the system, which is then utilized for integration testing?
- bottom-up
- top-down
- big bang (Correct answer)
- None of the above
Correct answer: big bang
Big Bang integration testing involves combining all or most of the developed modules at once and then testing them as a complete system. This approach is often chosen for smaller projects or when time is limited, as it avoids the overhead of incremental integration. However, it can make defect localization more challenging since many interfaces are tested simultaneously.
Question 9: Which form of automation testing creates a model of the application under test before allowing the tester to create test cases by simply changing test parameters and conditions?
- Agile
- scriptless (Correct answer)
- TDD
- code driven
Correct answer: scriptless
Scriptless automation testing, often based on model-based testing or keyword-driven frameworks, allows testers to create automated test cases without writing traditional programming scripts. It achieves this by building a model of the application's UI or business processes, then enabling testers to define test steps using keywords, actions, or by simply modifying parameters and conditions within the model. This approach makes test automation more accessible to non-programmers.
Question 10: Prioritizing tests ensures that
- You do the best testing in the time available (Correct answer)
- You do more effective testing
- You find more faults
- You shorten the time required for testing
Correct answer: You do the best testing in the time available
Prioritizing tests is crucial for optimizing testing efforts, especially under time constraints. It ensures that the most critical functionalities, highest-risk areas, or most frequently used features are tested first and most thoroughly. By focusing on high-priority tests, teams maximize the likelihood of finding significant defects and delivering the most valuable testing within the given schedule and resources.
Question 11: The term "alpha testing" refers to
- pre-release testing by end user representatives at their sites.
- post-release testing by end user representatives at the developer's site.
- pre-release testing by end user representatives at the developer's site. (Correct answer)
- the first testing that is performed.
Correct answer: pre-release testing by end user representatives at the developer's site.
Alpha testing is a type of acceptance testing conducted internally by the development team or by a dedicated testing team, often with simulated or actual end-user representatives, at the developer's site. Its purpose is to identify as many defects as possible before releasing the software to external users for beta testing. It typically focuses on catching bugs and usability issues in a controlled environment.
Question 12: The oracle's concept:
- is that the tests are reviewed by experienced testers.
- is that there is some existing system against which test output may be checked.
- is that the tester can routinely identify the correct outcome of a test. (Correct answer)
- is that the tester knows everything about the software under test.
Correct answer: is that the tester can routinely identify the correct outcome of a test.
A test oracle is a mechanism or principle that determines whether a test has passed or failed by providing the expected outcome for a given input. Therefore, the concept of an oracle implies that the tester must be able to routinely identify what the correct behavior or output should be for the software under test. This allows for objective comparison against actual results.
Question 13: All of the following can be done with a commercial test execution tool with the exeption of:
- reading test values from a data file
- calculating expected outputs (Correct answer)
- recording test inputs
- comparison of expected outcomes with actual outcomes
Correct answer: calculating expected outputs
Commercial test execution tools are designed to automate the process of running tests, recording inputs, and comparing actual outcomes against *pre-defined* expected outcomes. They do not possess the intelligence to calculate what the correct output *should be* for a given input. This calculation is part of the test design phase, where the test oracle is established by human testers or other means.
Question 14: A system for logging incidents
- should be used only by the test team
- only records defects
- is of limited value
- is a valuable source of project information during testing if it contains all incidents (Correct answer)
Correct answer: is a valuable source of project information during testing if it contains all incidents
A comprehensive incident logging system is invaluable because it tracks all deviations from expected behavior, not just defects. By capturing every incident, including queries, suggestions, and environmental issues, it provides a holistic view of project status and potential risks. This rich data aids in decision-making, reporting, and continuous improvement of both the product and the testing process.
Question 15: To detect a memory leak, which of the following tools would you use?
- Dynamic analysis (Correct answer)
- State analysis
- Memory analysis
- Coverage analysis
Correct answer: Dynamic analysis
Memory leaks are runtime errors where a program fails to release memory it no longer needs, leading to gradual memory depletion. Dynamic analysis tools monitor the software's behavior *during execution*, tracking memory allocation and deallocation patterns. This real-time observation makes them effective at identifying memory leaks that manifest only when the program is running.
Question 16: A technique designing test is
- a way to measure the quality of software
- a way to measure in a test plan what has to be done
- a process for selecting test cases (Correct answer)
- a process for determining expected outputs
Correct answer: a process for selecting test cases
Test design techniques are systematic approaches used to derive and select effective test cases from various sources like requirements, design, or code. These techniques guide testers in choosing specific inputs, conditions, and expected results. Their primary purpose is to ensure comprehensive test coverage and efficient use of testing resources by systematically identifying what to test.
Question 17: Which of the following statements is correct?
- if u find a lot of bugs in testing, you should not be very confident about the quality of software (Correct answer)
- the fewer bugs you find, the better your testing was
- the more tests you run, the more bugs you will find
- Component testing should be black box, system testing should be white box.
Correct answer: if u find a lot of bugs in testing, you should not be very confident about the quality of software
Finding a large number of bugs during testing indicates that the software likely has many underlying defects and is not yet of high quality. While testing aims to uncover issues, a high bug count suggests significant problems that need addressing before the software can be considered reliable. It implies deficiencies in the development process or that the software is not ready for release.
Question 18: What is the most significant criterion to consider while choosing a testing technique?
- how appropriate the technique is for testing the application
- how well you know a particular technique
- whether there is a tool to support the technique
- the objective of the test (Correct answer)
Correct answer: the objective of the test
The most significant criterion for choosing a testing technique is the objective of the test itself. Different techniques are designed to achieve specific goals, such as verifying functionality, assessing performance, or ensuring security. Understanding what the test aims to achieve ensures that the most appropriate and effective method is selected to meet that specific goal.
Question 19: Functional testing can take the form of which of the following?
- Boundary value analysis (Correct answer)
- Performance testing
- Security testing
- Usability testing
Correct answer: Boundary value analysis
Functional testing verifies that the software performs its specified functions correctly. Boundary value analysis is a black-box test design technique that specifically targets the boundaries of input domains, which are common places for defects in functional requirements. Performance, security, and usability testing are types of non-functional testing, as they assess *how well* the system works, not just *what* it does.
Question 20: Which of the following is NOT a non-functional test type?
- Performance
- Security
- State-Transition (Correct answer)
- Usability
Correct answer: State-Transition
Non-functional testing evaluates attributes like performance, security, usability, and reliability, which describe *how well* a system works. State-Transition testing, however, is a black-box test design technique used to test the behavior of a system based on its states and transitions between them. It is primarily used to verify the *functional* correctness of state-dependent behavior, making it a functional test type.
Question 21: Testing a functional system entails:
- testing the end to end functionality of the system as a whole (Correct answer)
- testing that the system functions with other systems
- testing the system performs functions within specified response times
- testing that the components that comprise the system function together
Correct answer: testing the end to end functionality of the system as a whole
Functional system testing focuses on verifying that the entire system, as a complete entity, meets its specified functional requirements. This involves testing the integrated components and their interactions to ensure that the system performs its intended business processes from an end-user perspective. It ensures the system works correctly as a whole, rather than just individual parts or non-functional aspects.
Question 22: What does static analysis fail to uncover?
- memory leaks (Correct answer)
- the use of a variable before it has been defined
- array bound violations
- unreachable (βdeadβ) code
Correct answer: memory leaks
Static analysis examines code without executing it, identifying potential issues like syntax errors or coding standard violations. However, memory leaks are runtime errors that occur due to improper memory management *during program execution*. Since static analysis doesn't run the code, it cannot detect these dynamic memory allocation and deallocation issues that manifest over time.
Question 23: Which of the following is the most likely to use Impact Analysis?
- user acceptance testing
- component testing
- maintenance testing (Correct answer)
- non-functional system testing
Correct answer: maintenance testing
Impact analysis is the process of identifying the potential consequences of a change or estimating what needs to be modified to accomplish a change. It is most frequently used in maintenance testing to determine which parts of the system might be affected by an update, bug fix, or new feature. This helps to scope retesting efforts and prevent the introduction of new defects.
Question 24: When is it appropriate to quit testing?
- when the test completion criteria have been met (Correct answer)
- when time for testing has run out
- when no faults have been found by the tests run
- when all planned tests have been run
Correct answer: when the test completion criteria have been met
Testing should cease when the predefined test completion criteria have been satisfied. These criteria, established during test planning, typically include factors like achieving a certain level of test coverage, finding a low number of critical defects, or meeting specific quality metrics. Relying on arbitrary factors like time running out or simply running all planned tests without evaluating results is not an effective approach.
Question 25: Which of the following is NOT typically included in a test plan?
- Risks
- Features to be tested
- Schedule
- Incident reports (Correct answer)
Correct answer: Incident reports
A test plan outlines the scope, approach, resources, and schedule of intended test activities. It typically includes risks, features to be tested, and the testing schedule. Incident reports, however, are generated *during* the execution of tests to document defects or other issues found, and are usually managed in a separate incident management system, not as part of the initial test plan document.
Software testing should begin