Docsity

SOFTWARE DEVELOPMENT TESTING Practice Exam, Exams of Technology

Toggle sidebar
bg1
SOFTWARE DEVELOPMENT TESTING Practice Exam
**Question 1.** Which of the following best defines software testing?
A) The process of writing code to meet requirements
B) The activity of executing a program to find defects
C) The documentation of user requirements
D) The deployment of software to production
Answer: B
Explanation: Software testing is the execution of software with the intent of finding defects, not
writing or deploying code.
**Question 2.** What is the primary purpose of testing in a software project?
A) To guarantee zero defects in the final product
B) To provide information for decision‑making and confidence building
C) To replace the need for quality assurance activities
D) To increase the size of the codebase
Answer: B
Explanation: Testing supplies data about product quality, helping stakeholders decide when the
software is ready for release.
**Question 3.** In the context of testing terminology, which term describes a flaw in the code
that may cause a failure?
A) Error
B) Defect (or Fault)
C) Failure
D) Bugfix
Answer: B
Explanation: A defect (or fault) is an implementation error that can lead to a failure when
executed.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55

Partial preview of the text

Download SOFTWARE DEVELOPMENT TESTING Practice Exam and more Exams Technology in PDF only on Docsity!

Question 1. Which of the following best defines software testing? A) The process of writing code to meet requirements B) The activity of executing a program to find defects C) The documentation of user requirements D) The deployment of software to production Answer: B Explanation: Software testing is the execution of software with the intent of finding defects, not writing or deploying code. Question 2. What is the primary purpose of testing in a software project? A) To guarantee zero defects in the final product B) To provide information for decision‑making and confidence building C) To replace the need for quality assurance activities D) To increase the size of the codebase Answer: B Explanation: Testing supplies data about product quality, helping stakeholders decide when the software is ready for release. Question 3. In the context of testing terminology, which term describes a flaw in the code that may cause a failure? A) Error B) Defect (or Fault) C) Failure D) Bugfix Answer: B Explanation: A defect (or fault) is an implementation error that can lead to a failure when executed.

Question 4. According to the seven fundamental principles of testing, which statement is true? A) Exhaustive testing is feasible for small applications. B) Testing can prove the absence of all defects. C) Defect clustering means most defects are found in a few modules. D) Early testing reduces overall cost only marginally. Answer: C Explanation: Defect clustering observes that a small number of modules typically contain most defects. Question 5. The “pesticide paradox” in testing refers to: A) The need to continuously add new test cases because old ones become ineffective. B) The inability to test security features without a real virus. C) The phenomenon where testing slows down as the project approaches release. D) The requirement to test both functional and non‑functional aspects. Answer: A Explanation: Over‑using the same tests makes them less likely to find new defects, so tests must be refreshed. Question 6. In a V‑Model, which test level is directly associated with the detailed design phase? A) Unit Testing B) Integration Testing C) System Testing D) Acceptance Testing Answer: B

Explanation: Test execution can start only after the environment and data are ready. Question 10. Which test level focuses on verifying individual functions or methods in isolation? A) Component (Unit) Testing B) Integration Testing C) System Testing D) Acceptance Testing Answer: A Explanation: Unit testing validates the smallest testable parts of the software, such as functions or classes. Question 11. In integration testing, the “big‑bang” approach is characterized by: A) Testing each component as soon as it is developed. B) Integrating and testing all components at once. C) Testing top‑most modules first and moving downwards. D) Using stubs for lower‑level modules. Answer: B Explanation: Big‑bang integrates all modules simultaneously, which can make defect isolation difficult. Question 12. Which of the following is NOT a typical objective of system testing? A) Validate end‑to‑end business flows. B) Verify compliance with non‑functional requirements. C) Test individual code statements for coverage. D) Identify defects in the integrated system. Answer: C

Explanation: Statement coverage is a white‑box unit‑testing metric, not a system‑testing goal. Question 13. User Acceptance Testing (UAT) is primarily performed by: A) Developers B) Test managers C) End users or customers D) Project sponsors Answer: C Explanation: UAT validates that the system meets user expectations and is usually conducted by the business users. Question 14. Which type of testing assesses how a system behaves under peak load conditions? A) Load Testing B) Stress Testing C) Endurance Testing D) Spike Testing Answer: B Explanation: Stress testing pushes the system beyond its normal capacity to see how it handles extreme loads. Question 15. Portability testing includes which of the following activities? A) Verifying response times under load. B) Checking compatibility with different browsers. C) Measuring memory usage over time. D) Validating user authentication mechanisms. Answer: B

Answer: B Explanation: Inspections are formal, with specific roles, procedures, and defect tracking. Question 19. Equivalence Partitioning helps testers to: A) Identify all possible input combinations. B) Reduce the number of test cases by grouping similar inputs. C) Test only the boundary values of each input. D) Generate decision tables automatically. Answer: B Explanation: EP divides inputs into equivalent classes where any member is expected to behave the same, minimizing test count. Question 20. Boundary Value Analysis is most effective when combined with: A) State transition testing. B) Decision table testing. C) Equivalence partitioning. D) Use case testing. Answer: C Explanation: BVA focuses on the edges of partitions identified by EP, providing complementary coverage. Question 21. Decision table testing is especially useful for: A) Simple arithmetic calculations. B) Complex business rules with multiple conditions. C) Testing UI layout consistency. D) Verifying hardware compatibility. Answer: B

Explanation: Decision tables capture combinations of conditions and actions, ideal for intricate rule sets. Question 22. In state transition testing, a “state” represents: A) A specific line of code. B) A particular condition of the system at a point in time. C) An external hardware component. D) A test case priority level. Answer: B Explanation: A state denotes the system’s condition; transitions model how inputs move the system from one state to another. Question 23. Which white‑box technique guarantees that every possible path through the code is executed at least once? A) Statement coverage B) Decision (branch) coverage C) Path coverage D) Condition coverage Answer: C Explanation: Path coverage (or exhaustive path testing) aims to execute all possible execution paths. Question 24. Cyclomatic complexity is a metric that measures: A. The number of test cases required for full coverage. B. The number of independent paths through a program. C. The amount of memory used by a function. D. The percentage of requirements implemented.

Answer: C Explanation: Independence ensures that testing is objective and not influenced by the developers who built the software. Question 28. A test manager’s primary responsibility includes: A. Writing production code. B. Defining test strategy, resources, and schedule. C. Designing database schemas. D. Configuring network hardware. Answer: B Explanation: Test managers plan, monitor, and control testing activities, ensuring resources align with objectives. Question 29. Wide Band Delphi is a technique used for: A. Automated UI testing. B. Estimating test effort through expert consensus. C. Measuring code coverage. D. Prioritizing defect fixes. Answer: B Explanation: Wide Band Delphi gathers estimates from multiple experts, iteratively refining them to reach consensus. Question 30. In test monitoring, “defect density” is calculated as: A. Number of defects per test case executed. B. Number of defects per function point or KLOC. C. Number of test cases passed divided by total test cases. D. Number of requirements covered by tests.

Answer: B Explanation: Defect density measures defects relative to size (e.g., per thousand lines of code) to assess quality. Question 31. Configuration management for testware ensures that: A. All test cases are written in the same programming language. B. Test artifacts are uniquely identified, version‑controlled, and retrievable. C. Test environments are never changed. D. Test data is generated randomly each run. Answer: B Explanation: CM tracks versions of test cases, scripts, and data, preventing loss of traceability. Question 32. Product risk differs from project risk in that: A. Product risk concerns the likelihood of software failure in operation. B. Project risk refers only to financial constraints. C. Product risk is always higher than project risk. D. Project risk does not affect testing decisions. Answer: A Explanation: Product risk is about the software’s potential to fail; project risk concerns schedule, budget, resources, etc. Question 33. Risk‑based testing primarily helps to: A. Test every requirement equally. B. Prioritize test effort on high‑risk areas. C. Eliminate the need for regression testing. D. Automate all test cases. Answer: B

Explanation: Once a defect is fixed, it moves to Retest, where the tester checks whether the fix works. Question 37. Which of the following is a primary advantage of using test management tools like TestRail? A. Automatic code generation. B. Centralized tracking of test cases, execution, and defects. C. Real‑time performance monitoring of production servers. D. Compiling source code faster. Answer: B Explanation: Test management tools organize test artifacts, schedule runs, and link defects, improving traceability. Question 38. Static analysis tools such as SonarQube are used to: A. Execute UI test scripts. B. Detect code quality issues without running the program. C. Simulate user load on a web server. D. Manage test data files. Answer: B Explanation: Static analysis examines source code for bugs, security flaws, and maintainability problems without execution. Question 39. Which automation framework emphasizes reusability by separating test logic from test data? A. Linear framework B. Modular framework C. Data‑Driven framework

D. Keyword‑Driven framework Answer: C Explanation: Data‑Driven frameworks store input data separately (e.g., in spreadsheets) and drive the same test scripts with multiple data sets. Question 40. Behavior‑Driven Development (BDD) primarily uses which language for defining test scenarios? A. XML B. JSON C. Gherkin D. YAML Answer: C Explanation: Gherkin provides a readable “Given‑When‑Then” syntax for BDD scenarios. Question 41. In a Scrum environment, the “Definition of Done” (DoD) is: A. A list of tasks for the development team. B. A set of criteria that must be met before a product increment is considered complete. C. The sprint backlog. D. The project charter. Answer: B Explanation: DoD specifies the quality and testing requirements that a user story must satisfy to be accepted. Question 42. Which test level is most appropriate for verifying data migration between legacy and new systems? A. Unit Testing B. Integration Testing

A. Generate automated test scripts. B. Decompose testing work into manageable tasks for effort calculation. C. Prioritize defects based on severity. D. Measure code coverage percentages. Answer: B Explanation: WBS breaks down the testing effort into smaller components, facilitating more accurate estimation. Question 46. Which of the following best describes a “stub” used in integration testing? A. A fully functional component that replaces a missing module. B. A simulated component that provides predefined responses. C. A test case that checks boundary conditions. D. An automated performance script. Answer: B Explanation: Stubs mimic lower‑level modules, allowing higher‑level components to be tested before the real modules are ready. Question 47. The principle “Testing shows presence of defects” implies that: A. Testing can prove a product is defect‑free. B. Absence of detected defects does not guarantee quality. C. All defects will be found if testing is exhaustive. D. Testing is unnecessary if code reviews are performed. Answer: B Explanation: Detecting defects confirms they exist; not finding any does not prove they are absent. Question 48. Which metric indicates the proportion of test cases that have been executed?

A. Test case pass rate. B. Test execution progress. C. Defect detection percentage. D. Mean time to detect (MTTD). Answer: B Explanation: Execution progress measures how many planned test cases have been run relative to total. Question 49. In a “big‑bang” integration test, a major drawback is: A) Early detection of interface defects. B) Difficulty isolating the cause of failures. C) Reduced test execution time. D) Requirement of only a few test cases. Answer: B Explanation: Because all modules are combined at once, when a defect occurs it is hard to pinpoint which module or interface caused it. Question 50. Which of the following is a primary characteristic of a “bottom‑up” integration strategy? A) Test drivers are used to simulate higher‑level modules. B) All modules are tested together without stubs. C) Integration starts with the user interface. D) The strategy eliminates the need for test harnesses. Answer: A Explanation: Bottom‑up integration uses drivers to invoke lower‑level modules while higher‑level ones are still unavailable. Question 51. The “pesticide paradox” suggests that:

Question 54. In decision‑table testing, the number of test cases required is determined by: A) The number of rows in the table. B) The number of columns (conditions) only. C) The number of unique combinations of conditions that produce distinct actions. D) The number of requirements covered. Answer: C Explanation: Each unique combination of condition states that leads to a different action becomes a test case. Question 55. Which of the following best describes a “test harness” in integration testing? A) A set of test data used for performance testing. B) A collection of drivers and stubs that simulate missing components. C) An automated script that runs unit tests. D) A document that outlines test objectives. Answer: B Explanation: A test harness provides the necessary drivers and stubs to enable testing of components in isolation. Question 56. In the V‑Model, which test level corresponds to the “System Architecture” design artifact? A) Unit Testing B) Integration Testing C) System Testing D) Acceptance Testing Answer: C

Explanation: System testing validates the entire system against the system architecture and high‑level requirements. Question 57. Which of the following statements about “early testing” is FALSE? A) Early testing can reduce the cost of fixing defects. B) Early testing eliminates the need for later test phases. C) Early testing helps clarify ambiguous requirements. D) Early testing can be performed through static analysis. Answer: B Explanation: Even with early testing, later test phases are still needed to verify integration, system behavior, and acceptance. Question 58. A test case that verifies the system’s ability to handle 10,000 concurrent users for 8 hours is an example of: A) Load testing B) Stress testing C) Endurance (soak) testing D) Spike testing Answer: C Explanation: Endurance testing evaluates performance over an extended period under a typical load. Question 59. Which non‑functional testing type focuses on the ease with which a new user can learn to operate the system? A) Usability testing B) Security testing C) Compatibility testing