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. 1 test for statement coverage, 3 for branch coverage

  2. 1 test for statement coverage, 2 for branch coverage

  3. 1 test for statement coverage, 1 for branch coverage

  4. 2 tests for statement coverage, 3 for branch coverage

  5. 2 tests for statement coverage, 2 for branch coverage

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

To solve this question, the user needs to know the concepts of statement coverage and branch coverage in software testing.

Statement coverage means that each statement in the code is executed at least once during testing. Branch coverage means that each possible branch or decision point in the code is executed at least once during testing.

In the given code, there are two decision points:

  1. IF P+Q > 100
  2. If P > 50

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

A. 1 test for statement coverage, 3 for branch coverage: This option is incorrect because it requires 3 tests for branch coverage. However, there are only two decision points in the code, so it is not possible to have three branches. Therefore, option A is incorrect.

B. 1 test for statement coverage, 2 for branch coverage: This option is correct. To achieve statement coverage, only one test case is required where P = 50 and Q = 51. This will execute all statements in the code. To achieve branch coverage, two test cases are required: one where P = 50 and Q = 51 (to cover the first decision point) and another where P = 51 and Q = 50 (to cover the second decision point). Therefore, option B is the correct answer.

C. 1 test for statement coverage, 1 for branch coverage: This option is incorrect because there are two decision points in the code that require two test cases for branch coverage. Therefore, option C is incorrect.

D. 2 tests for statement coverage, 3 for branch coverage: This option is incorrect because there are only two decision points in the code that require two test cases for branch coverage. Therefore, option D is incorrect.

E. 2 tests for statement coverage, 2 for branch coverage: This option is incorrect because only one test case is required for statement coverage. Therefore, option E is incorrect.

The Answer is: B. 1 test for statement coverage, 2 for branch coverage.

Multiple choice technology testing
  1. Requires knowledge on the bug fixes and how it affect the system

  2. Includes the area of frequent defects

  3. Includes the area which has undergone many/recent code changes

  4. All of the above

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

Regression testing ensures that code modifications do not introduce new defects. Selecting test cases requires understanding bug fixes and their systemic impacts, targeting areas with frequent historic defects, and focusing on components with recent or heavy code changes. Thus, all the listed strategies are valid for regression test selection.

Multiple choice technology testing
  1. That you have tested every statement in the program.

  2. That you have tested every statement and every branch in the program.

  3. That you have tested every IF statement in the program.

  4. That you have tested every combination of values of IF statements in the program

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

Statement coverage ensures every statement is executed. Branch coverage extends this to ensure both true and false branches of every decision (if, switch, loops) are tested. Complete statement AND branch coverage means both criteria are met. Testing every IF combination is path coverage (more exhaustive).

Multiple choice technology testing
  1. v-3,w-2,x-1,y-5,z-4

  2. v-2,w-5,x-1,y-4,z-3

  3. v-3,w-4,x-1,y-5,z-2

  4. v-2,w-1,x-4,y-3,z-5

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

Test estimation (x) maps to calculating required resources (1). Test monitoring (w) is reporting deviations (4). Test control (v) is re-allocating overrun resources (3). Incident management (y) is tracking anomalous results (5). Configuration control (z) is maintaining test result records (2). This unique mapping matches the correct option, making all others incorrect.

Multiple choice technology testing
  1. ii, iv and v.

  2. ii, iii and iv.i.

  3. i, ii and iv.

  4. i, iii and v.

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

Configuration Management in testing serves three main purposes: identifying software versions under test (i), controlling testware versions (ii), and tracking changes to testware items (iv). Activities like developing new testware (iii) or analyzing needs for new items (v) are test design tasks, not configuration management functions. Option A omits version identification.

Multiple choice technology testing
  1. Scheduling test analysis and design tasks.

  2. Initiating corrective actions.

  3. Monitoring progress and test coverage.

  4. Measuring and analyzing results.

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

Test planning involves establishing the scope, objectives, risks, and overall schedule of testing activities. Scheduling test analysis and design tasks is a core planning activity. Distractors like monitoring progress, initiating corrective actions, or measuring results belong to test monitoring and control or test execution and evaluation phases, not initial test planning.

Multiple choice technology testing
  1. At system and acceptance testing levels only.

  2. At all test levels.

  3. At all levels above integration testing.

  4. At the acceptance testing level only.

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

Functional testing can be performed at any test level - unit, integration, system, or acceptance testing. Each level tests functional requirements at its scope. Option A is incorrect because functional testing isn't limited to just system and acceptance levels. Option C is incorrect because functional testing also happens at unit and integration levels.

Multiple choice technology testing
  1. i, iii. and iv. are more for developers.

  2. ii. and iv. are more for developers.

  3. ii, iii. and iv. are more for developers.

  4. ii. and iii. are more for developers.

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

Coverage measurement tools and dynamic analysis tools are typically used directly by developers during coding and unit testing to analyze code structure and execution. Distractors include tools like test comparators or performance tools, which are primarily geared toward dedicated testers.

Multiple choice technology testing
  1. . ii is True; i, iii, iv & v are False

  2. i,ii,iii are true and iv is false

  3. ii & iii are True; i, iv are False

  4. ii, iii & iv are True; i is false

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

In risk-based testing, identified risks directly inform: (i) the selection of appropriate test techniques based on risk type, (ii) the depth and extent of testing allocated to high-risk areas, and (iii) prioritization to uncover critical defects early. However, (iv) project cost determination is a project management function outside the testing scope, making it the only false statement.

Multiple choice technology testing
  1. System Test uses own data and E2E Test uses Production data

  2. System Test uses Production data and E2E Test uses own data

  3. Both uses Production data

  4. Both uses own data

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

System Testing uses its own test data specifically created for testing purposes, while End-to-End (E2E) Testing uses production-like data to simulate real-world scenarios. E2E testing validates the entire system flow with realistic data volumes and patterns, whereas System testing focuses on individual components with controlled test data.

Multiple choice technology web technology
  1. Monitors

  2. View Log

  3. Show Probe

  4. View Status

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

Show Probe is the DataPower tool used to test and trace messages at each step of processing rules. It captures the message context after each rule execution, allowing detailed debugging and inspection. Monitors provide runtime statistics, View Log shows system logs, and View Status displays appliance health - none show step-by-step message state.

Multiple choice technology testing
  1. Branch testing

  2. Agile testing

  3. Beta testing

  4. Ad-hoc testing

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

Arc testing is another name for branch testing in software testing. It involves testing all branches in the code by ensuring that every decision point (branch) takes both true and false paths. This is distinct from agile testing, beta testing, or ad-hoc testing.

Multiple choice technology testing
  1. Boundary value analysis

  2. Equivalence partitioning

  3. Decision table testing

  4. State transition testing

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

Equivalence partitioning is a test design technique that divides input data into groups (equivalence classes) that are expected to be processed similarly. By testing one value from each equivalence class, you achieve coverage of both valid and invalid inputs and outputs. Boundary value analysis focuses on edge cases, decision tables on complex logic combinations, and state transition on system states.

Multiple choice technology testing
  1. Unit testing

  2. Regression testing

  3. Alpha testing

  4. Integration testing

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

Alpha testing is conducted at the developer's site by potential users or independent test team before releasing to external users. While unit and integration testing also happen at the developer's organization, alpha testing specifically involves user acceptance testing in a controlled environment at the development site.