Computer Knowledge

Software Testing and Quality Control

2,292 Questions

Software testing and quality control questions cover testing methodologies, unit testing, and defect management. These concepts are crucial for the computer knowledge sections of competitive exams. Practice these questions to understand verification and validation processes thoroughly.

Quality control typesUnit testing purposeSoftware vulnerability testingTest planning tasksLoop testing criteriaTest harness functions

Software Testing and Quality Control Questions

Multiple choice technology testing
  1. Error condition hiding another error condition

  2. Creating a test case which does not reveal a fault

  3. Masking a fault by developer

  4. Masking a fault by a tester

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

To understand this question, the user needs to know the basic concept of software testing. Fault masking is a technique used in software testing to hide one fault by another one, which makes it difficult to identify the original fault.

Now, let's go through each option:

A. Error condition hiding another error condition: This option correctly defines fault masking. It means that one error condition is hiding another one.

B. Creating a test case which does not reveal a fault: This option is incorrect. It defines a technique called "passive testing," where the tester creates a test case that does not reveal any faults. It is not related to fault masking.

C. Masking a fault by developer: This option is incorrect. Developers write code to fix faults, not mask them.

D. Masking a fault by a tester: This option is incorrect. Testers are responsible for identifying faults, not masking them.

Therefore, the correct answer is: A. Error condition hiding another error condition.

Multiple choice technology testing
  1. Lack of technical documentation

  2. Lack of test tools on the market for developers

  3. Lack of training

  4. Lack of Objectivity

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Developers struggle to test their own work primarily because of lack of objectivity - they are biased by their knowledge of how the code 'should' work and may unconsciously avoid test cases that would reveal their own mistakes. This psychological phenomenon makes it difficult to mentally step back and approach the testing process critically. While documentation, tools, and training can help, the fundamental barrier is the developer's emotional and cognitive investment in their own code being correct.

Multiple choice technology testing
  1. When the code is complete

  2. When the design is complete

  3. When the software requirements have been approved

  4. When the first code module is ready for unit testing

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The test process can begin as soon as the software requirements have been approved, before any code is written. Test planning and test case design activities can start during requirements analysis to ensure testability of requirements and early identification of test scenarios. This early testing approach helps detect defects at the requirements stage itself, when they are cheapest to fix. Waiting until code completion or design completion delays these critical testing activities and violates the principle of early testing.

Multiple choice technology
  1. Testers

  2. Developers

  3. Business users

  4. All the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Staging instances in application deployment are typically used by business users for user acceptance testing (UAT) before production deployment. Developers use development environments, while testers use dedicated QA environments. The staging environment closely mirrors production to validate business requirements.

Multiple choice technology
  1. Production

  2. Testing

  3. Staging

  4. Development

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In application deployment lifecycles, Production is always the final instance where the live application runs. The progression is typically Development → Testing → Staging → Production, with Production being the last and most critical environment.

Multiple choice technology testing
  1. A. Specify Releases, Specify Requirements, Plan Tests, Execute Tests, Run Tests

  2. B. Specify Releases, Specify Requirements, Plan Tests, Execute Tests, Track Defects.

  3. C. Specify Releases, Specify Requirements, Plan Tests, Execute Tests, Analyze Tests

  4. D: Specify Releases, Specify Requirements, Plan Tests, Analyze Tests, Track Defects.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The five phases of test management in HP Quality Center are: (1) Specify Releases - define release cycles, (2) Specify Requirements - document what needs to be tested, (3) Plan Tests - design test cases, (4) Execute Tests - run the tests, and (5) Track Defects - log and manage bugs. 'Run Tests' is redundant with 'Execute Tests', and 'Analyze Tests' is not one of the core five phases.

Multiple choice technology testing
  1. Control Flow analysis

  2. Data flow analysis

  3. Coding standards analysis

  4. Cyclomatic complexity analysis

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Set-Use pairs are fundamental to data flow analysis, which tracks how variables are assigned (set) and subsequently used (referenced) through a program. This analysis identifies potential defects like using uninitialized variables, variables used after being freed, or redundant computations. Control flow analysis examines execution paths, coding standards check style, and cyclomatic complexity measures structural complexity.

Multiple choice technology testing
  1. Improper Handling of large and small values.

  2. Improper Handling of configuration combinations

  3. Improper Handling of classes of inputs

  4. Improper Handling of typical workflows

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Use cases focus on user interactions and typical workflows through the system. They are designed to capture how actors accomplish their goals step-by-step, making them ideal for identifying workflow-related defects. Boundary value analysis handles large/small values, configuration testing handles combinations, and equivalence partitioning handles input classes - these are different testing techniques.

Multiple choice technology testing
  1. A test environment description and test instructions.

  2. A set of inputs, execution preconditions, and expected outcomes.

  3. A test plan, test inputs, and logging instructions.

  4. Execution instructions and a function description to determine correct outcome.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

A test case is formally defined as a set of inputs, execution preconditions, and expected outcomes. This definition captures the essential elements: what you put into the system (inputs), what state the system must be in (preconditions), and what should happen (expected outcomes). Option A is incomplete, while options C and D include elements not part of the standard test case definition.

Multiple choice technology testing
  1. Non-functional testing.

  2. Structure-based testing (white box).

  3. Static testing.

  4. Functional testing (black box).

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Static testing is the practice of testing software without executing the code. This includes reviews, inspections, walkthroughs, and static analysis tools. Options A and D refer to types of dynamic testing (where code runs), while option B (white-box testing) requires code execution to examine internal structure.

Multiple choice technology testing
  1. A goal of acceptance testing is to stress-test the system.

  2. A goal of acceptance testing is to establish confidence in the system.

  3. Acceptance testing is performed by technical staff.

  4. Acceptance testing is only used to address functionality issues within the system

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Acceptance testing's primary goal is to establish confidence that the system meets business requirements and is ready for deployment. It is typically performed by users or customers, not technical staff (making C wrong). Option A is incorrect because stress testing is a separate performance testing activity. Option D is wrong because acceptance testing addresses both functional and non-functional requirements.

Multiple choice technology testing
  1. To help the developer to compare differences between files and databases.

  2. To reduce the quantity of component tests needed to be run.

  3. To make it easier for developers to peer-test each other’s code.

  4. To simplify running unit tests when related components are not available yet.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

A Test Harness is a tool that provides stubs, drivers, or mock objects to simulate missing components, allowing unit tests to run in isolation when dependent components are unavailable. Options A, B, and C describe different tools (comparison tools, coverage analyzers, peer review systems) not specific to test harnesses.

Multiple choice technology testing
  1. A test environment description and test instructions

  2. A set of inputs, execution preconditions, and expected outcomes

  3. A test plan, test inputs, and logging instructions.

  4. Execution instructions and a function description to determine correct outcome

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

To answer this question, the user needs to know what a test case is and its elements. A test case is a set of steps or conditions that are used to test a specific aspect of a software program. It includes a set of inputs, execution preconditions, and expected outcomes.

Now, let's go through each option and explain why it is right or wrong:

A. A test environment description and test instructions: This option is incorrect. While a test case may include test instructions, it is not limited to only that. A test environment description is not an essential element of a test case.

B. A set of inputs, execution preconditions, and expected outcomes: This option is correct. A test case includes a set of inputs, execution preconditions, and expected outcomes. Inputs are the data that is entered into the system as part of the test case, execution preconditions are the conditions that must be met before the test case can be run, and expected outcomes are the results that are expected from the test case.

C. A test plan, test inputs, and logging instructions: This option is incorrect. A test case is a part of a test plan, but it is not the test plan itself. The test inputs are an essential element of a test case, but logging instructions are not necessary.

D. Execution instructions and a function description to determine correct outcome: This option is incorrect. While execution instructions are a part of a test case, they are not the only element. A function description to determine the correct outcome is not a necessary part of a test case.

Therefore, the answer is: B. A set of inputs, execution preconditions, and expected outcomes.