Tag: testing

Questions Related to testing

How much testing is enough?

  1. Impossible to answer

  2. Easy to answer

  3. Depends on the risk, contract and requirements

  4. Depends on the maturity of your developers


Correct Option: C

Statement Coverage will not check ________

  1. Missing Statements

  2. Unused Branches

  3. Dead Code

  4. Unused Statement


Correct Option: A
  1. Defects

  2. Trends analysis

  3. Test Effectiveness

  4. Time Spent Testing


Correct Option: C

Impact Analysis helps to decide

  1. How much regression testing should be done

  2. Exit Criteria

  3. How many more test cases need to written

  4. Different Tools to perform Regression Testing


Correct Option: A

AI Explanation

To answer this question, you need to understand the concept of impact analysis. Impact analysis is the process of identifying the potential effects or consequences of a change in a system. It helps in determining the areas or components that may be affected by the change and allows for better decision making.

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

Option A) How much regression testing should be done - This option is correct because impact analysis helps in assessing the impact of a change on the system and its components. It helps in determining which parts of the system need regression testing to ensure that the changes have not introduced any unintended side effects.

Option B) Exit Criteria - This option is incorrect. Exit criteria are predefined conditions or requirements that must be met before a testing phase can be considered complete. While impact analysis may inform the exit criteria, it is not directly related to deciding exit criteria.

Option C) How many more test cases need to be written - This option is incorrect. Impact analysis helps in identifying the areas affected by a change, but it does not directly determine the number of test cases that need to be written. Test case creation is based on the requirements and functionality of the system, not just the impact of a change.

Option D) Different Tools to perform Regression Testing - This option is incorrect. Impact analysis focuses on assessing the impact of changes on the system, not on the tools used for regression testing.

The correct answer is A) How much regression testing should be done. This option is correct because impact analysis helps in determining the extent of regression testing needed to ensure that the changes have not introduced any unintended side effects.

Impact Analysis helps to decide

  1. How much regression testing should be done

  2. Exit Criteria

  3. How many more test cases need to written

  4. Different Tools to perform Regression Testing


Correct Option: A
  1. The goal / purpose of testing is to demonstrate that the program works.

  2. The purpose of testing is to demonstrate that the program is defect free

  3. The purpose of testing is to demonstrate that the program does what it is supposed to do

  4. Testing is executing Software for the purpose of finding defects


Correct Option: D

Best definition for Testing :

  1. The goal / purpose of testing is to demonstrate that the program works.

  2. The purpose of testing is to demonstrate that the program is defect free

  3. The purpose of testing is to demonstrate that the program does what it is supposed to do

  4. Testing is executing Software for the purpose of finding defects


Correct Option: D

AI Explanation

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

Option A) The goal/purpose of testing is to demonstrate that the program works. This option is incorrect because testing is not solely focused on demonstrating that the program works. Testing is also performed to find defects or issues in the software.

Option B) The purpose of testing is to demonstrate that the program is defect-free. This option is incorrect because testing does not guarantee that the program is completely defect-free. Testing helps in finding defects, but it does not guarantee that no defects exist in the program.

Option C) The purpose of testing is to demonstrate that the program does what it is supposed to do. This option is incorrect because testing is not only about demonstrating that the program performs its intended functions. It is also about finding defects and ensuring the program behaves as expected.

Option D) Testing is executing software for the purpose of finding defects. This option is correct because testing involves executing the software with the intention of identifying defects or issues. Testing helps in uncovering problems, verifying functionality, and ensuring the software meets the desired quality standards.

The correct answer is D. This option is correct because testing is primarily focused on executing software to discover defects.

A deviation from the specified or expected behavior that is visible to end-users is called ______

  1. an error

  2. a fault

  3. a failure

  4. a defect


Correct Option: C

Static analysis cannot find _____

  1. the use of a variable before it has been defined

  2. unreachable code

  3. memory leaks

  4. array bound violations


Correct Option: C

AI Explanation

To answer this question, you need to understand the concept of static analysis.

Static analysis is a method of analyzing code without actually executing it. It is used to find potential issues and errors in code by examining the code structure, syntax, and other static properties.

Let's go through each option to understand why static analysis can or cannot find it:

Option A) The use of a variable before it has been defined - Static analysis can indeed find this issue. It can analyze the code and identify any instances where a variable is being used before it is declared or assigned a value.

Option B) Unreachable code - Static analysis can find unreachable code. It can analyze the code and identify any sections of code that will never be executed due to conditional statements or other control flow structures.

Option C) Memory leaks - Static analysis cannot find memory leaks. Memory leaks occur when dynamically allocated memory is not properly released, leading to a loss of memory resources. Static analysis focuses on analyzing code structure and syntax, but it does not have the ability to track memory usage and identify memory leaks.

Option D) Array bound violations - Static analysis can find array bound violations. It can analyze the code and identify any instances where array elements are being accessed outside the valid bounds of the array.

Therefore, the correct answer is C) Memory leaks. Static analysis cannot find memory leaks as it does not have the capability to track memory usage and identify memory leaks.