Tag: testing

Questions Related to testing

  1. I, II & III

  2. II, III & IV

  3. I, II & IV

  4. I, III & IV


Correct Option: C
Explanation:

The correct answer is C. I, II & IV.

Explanation: I. It strives to ensure that quality is built into software: This statement is true as software verification and validation programs aim to ensure that quality is built into the software development process. II. It provides management with insights into the state of a software project: This statement is true as a software verification and validation program provides management with insights into the progress, quality, and state of a software project. III. It ensures that alpha, beta, and system tests are performed: This statement is not necessarily true for all software verification and validation programs. While these types of tests are commonly performed, it is not a requirement for all programs. IV. It is executed in parallel with software development activities: This statement is true as a software verification and validation program typically runs concurrently with software development activities to ensure that quality is maintained throughout the development process.

Therefore, the correct answer is C. I, II & IV.

  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


Correct Option: B
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.

  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


Correct Option: D
  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


Correct Option: B

In a system designed to work out the tax to be paid: An employee has £4000 of salary tax free. The next £1500 is taxed at 10%.The next £28000 is taxed at 22%.Any further amount is taxed at 40%.To the nearest whole pound, which of these is a valid Boundary Value Analysis test case?

  1. £1500

  2. £32001

  3. £33501

  4. £28000


Correct Option: C

AI Explanation

To determine which of the options is a valid Boundary Value Analysis test case, we need to consider the boundaries that define different tax rates.

In this system, there are three tax rates based on different salary ranges:

  1. The first £4000 is tax-free.
  2. The next £1500 is taxed at 10%.
  3. The next £28000 is taxed at 22%.
  4. Any further amount is taxed at 40%.

Based on these tax rates, we can determine the test cases for Boundary Value Analysis:

A. £1500 - This is the boundary between the tax-free range and the 10% tax range. It is a valid test case because it tests the transition from no tax to a taxed amount. B. £32001 - This is beyond the highest salary range with a fixed tax rate. It is a valid test case because it tests the system's behavior when the salary exceeds the highest tax range. C. £33501 - This is beyond the highest salary range with a fixed tax rate. It is a valid test case because it tests the system's behavior when the salary exceeds the highest tax range. D. £28000 - This is the boundary between the 22% tax range and the amount taxed at 40%. It is a valid test case because it tests the transition from a lower tax rate to a higher tax rate.

To the nearest whole pound, option C (£33501) is a valid Boundary Value Analysis test case because it tests the system's behavior when the salary exceeds the highest tax range.

  1. An inspection is lead by the author, whilst a walkthrough is lead by a trained moderator

  2. An inspection has a trained leader, whilst a walkthrough has no leader

  3. Authors are not present during inspections, whilst they are during walkthroughs

  4. A walkthrough is lead by the author, whilst an inspection is lead by a trained moderator


Correct Option: D