Tag: testing

Questions Related to testing

Which of the following are disadvantages of capturing tests by recording the actions of a manual tester? i The script may be unstable when unexpected events occur. ii Data for a number of similar tests is automatically stored separately from the script. iii Expected results must be added to the captured script. iv The captured script documents the exact inputs entered by the tester. v When replaying a captured test, the tester may need to debug the script if it doesn’t play correctly.

  1. i, iii, iv, v.

  2. ii, iv and v.

  3. i, ii and iv.

  4. i and v.


Correct Option: B

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) i, iii, iv, v - This option is incorrect because it includes option iii, which is not a disadvantage of capturing tests by recording the actions of a manual tester. Option iii states that expected results must be added to the captured script, which is not a disadvantage but rather a necessary step in creating a test script.

Option B) ii, iv, and v - This option is correct because it includes the correct disadvantages of capturing tests by recording the actions of a manual tester. Option ii states that data for a number of similar tests is automatically stored separately from the script, which can be a disadvantage as it may lead to difficulties in managing and maintaining the test data. Option iv states that the captured script documents the exact inputs entered by the tester, which can be a disadvantage as it may make the script less maintainable and reusable. Option v states that when replaying a captured test, the tester may need to debug the script if it doesn't play correctly, which is a common issue with recorded tests.

Option C) i, ii, and iv - This option is incorrect because it does not include all the correct disadvantages of capturing tests by recording the actions of a manual tester. It is missing option v, which states that the tester may need to debug the script when replaying a captured test.

Option D) i and v - This option is incorrect because it only includes two of the correct disadvantages. It is missing option iv, which states that the captured script documents the exact inputs entered by the tester.

The correct answer is B. This option includes the correct disadvantages of capturing tests by recording the actions of a manual tester: ii, iv, and v.

Which of the following are characteristics of testable software ?

  1. Observability

  2. Simplicity

  3. Stability

  4. All of the above


Correct Option: D

AI Explanation

To answer this question, we need to understand the characteristics of testable software. Let's go through each option to understand why it is correct or incorrect:

Option A) Observability - This option is a characteristic of testable software. Observability refers to the ability to observe and monitor the behavior of the software during testing. It allows testers to gather information about the software's execution, outputs, and internal states.

Option B) Simplicity - This option is not a characteristic of testable software. While simplicity can make software easier to understand and maintain, it does not directly impact its testability.

Option C) Stability - This option is not a characteristic of testable software. Stability refers to the ability of software to remain in a consistent state without crashing or producing unexpected behavior. While stability is desirable in software, it does not directly impact its testability.

Option D) All of the above - This option is the correct answer. Testable software should exhibit all the characteristics mentioned in options A, B, and C. Observability, simplicity, and stability are all important factors that contribute to the testability of software.

Therefore, the correct answer is D) All of the above. This option is correct because all the characteristics mentioned (observability, simplicity, and stability) are important for testable software.

Black-box testing attempts to find errors in which of the following categories

  1. Incorrect or missing functions

  2. Interface errors

  3. Performance errors

  4. All of the above

  5. None of the above


Correct Option: D

What types of errors are missed by black-box testing and can be uncovered by white-box testing ?

  1. Behavioral errors

  2. Logic errors

  3. Performance errors

  4. Typographical errors

  5. Both b and d


Correct Option: E

AI Explanation

To answer this question, we need to understand the difference between black-box testing and white-box testing.

Black-box testing is a type of testing technique where the internal structure, design, and implementation details of the system under test are not known to the tester. In black-box testing, the tester focuses on testing the functionality of the system without any knowledge of the internal workings of the system. This type of testing is primarily based on requirements and specifications.

White-box testing, on the other hand, is a type of testing technique where the tester has full knowledge of the internal structure, design, and implementation details of the system under test. In white-box testing, the tester can examine the code, data structures, and algorithms to identify potential issues and validate the system against internal behaviors and logic.

Now, let's go through each option to understand which types of errors can be uncovered by white-box testing but missed by black-box testing:

A. Behavioral errors - Black-box testing is focused on testing the behavior of the system based on the input and expected output. It may uncover behavioral errors, so this option is incorrect.

B. Logic errors - White-box testing, with its knowledge of the internal structure and implementation details, can identify logical flaws in the code and algorithms. It can uncover logic errors that may not be detected through black-box testing. This option is correct.

C. Performance errors - Performance errors, such as issues with response time or resource utilization, are typically not related to the internal structure or implementation details. They are more related to the overall system configuration and environment. Both black-box and white-box testing can potentially uncover performance errors. This option is incorrect.

D. Typographical errors - Typographical errors, such as spelling mistakes or syntax errors, are related to the correctness of the code or documentation. White-box testing can uncover typographical errors by examining the code and documentation. Black-box testing may not specifically focus on these types of errors. This option is correct.

Based on the explanations above, we can conclude that option E ("Both b and d") is the correct answer. White-box testing can uncover logic errors (option B) and typographical errors (option D) that may be missed by black-box testing.

The cyclomatic complexity metric provides the designer with information regarding the number of

  1. Cycles in the program

  2. Errors in the program

  3. Independent logic paths in the program

  4. Statements in the program


Correct Option: C

AI Explanation

To answer this question, we need to understand the concept of cyclomatic complexity.

Cyclomatic complexity is a software metric that measures the complexity of a program by analyzing the number of independent paths through the program's source code. It provides the designer with information about the number of decision points or branches in the program.

Option A) Cycles in the program - This option is incorrect. Cyclomatic complexity is not directly related to cycles in the program. It measures the number of independent paths, not the number of cycles.

Option B) Errors in the program - This option is incorrect. Cyclomatic complexity does not provide information about errors in the program. It is a metric used to measure complexity, not to detect errors.

Option C) Independent logic paths in the program - This option is correct. Cyclomatic complexity measures the number of independent logic paths in the program. It helps the designer understand how complex the program is and identify potential areas of complexity that may require additional testing or refactoring.

Option D) Statements in the program - This option is incorrect. Cyclomatic complexity is not concerned with the number of statements in the program. It focuses on the number of decision points or branches.

Therefore, the correct answer is C) Independent logic paths in the program because cyclomatic complexity provides the designer with information about the number of independent logic paths in the program.

Condition testing is a control structure testing technique where the criteria used to design test cases is that they

  1. Rely on basis path testing

  2. Exercise the logical conditions in a program module

  3. Select test paths based on the locations and uses of variables

  4. Focus on testing the validity of loop constructs


Correct Option: B

AI Explanation

To answer this question, you need to understand the concept of condition testing.

Condition testing is a control structure testing technique where the criteria used to design test cases is that they exercise the logical conditions in a program module.

Let's go through each option to understand why it is correct or incorrect:

Option A) Rely on basis path testing - This option is incorrect because condition testing is a separate technique and not directly related to basis path testing.

Option B) Exercise the logical conditions in a program module - This option is correct. Condition testing focuses on testing the logical conditions in a program module, which involves evaluating different possible outcomes based on these conditions.

Option C) Select test paths based on the locations and uses of variables - This option is incorrect. While variable usage and locations can be considered in test case design, it is not the main criteria for condition testing.

Option D) Focus on testing the validity of loop constructs - This option is incorrect. Testing the validity of loop constructs is a separate technique called loop testing, which is not specifically related to condition testing.

The correct answer is B) Exercise the logical conditions in a program module. This option is correct because condition testing is a technique that focuses on testing the logical conditions in a program module.