Tag: testing

Questions Related to testing

Why are static testing and dynamic testing described as complementary?

  1. Because they share the aim of identifying defects and find the same types of defect.

  2. Because they have different aims but find the same types of defect.

  3. Because they have different aims and differ in the types of defect they find.

  4. Because they share the aim of identifying defects but differ in the types of defect they find.


Correct Option: D

AI Explanation

To answer this question, you need to understand the difference between static testing and dynamic testing and how they complement each other in the software testing process.

Static testing refers to the testing technique where the code or software is analyzed without actually executing it. It involves reviewing the code, requirements, designs, and other software artifacts to identify defects and improve the quality of the software. Static testing techniques include techniques like code reviews, inspections, walkthroughs, and static analysis.

Dynamic testing, on the other hand, refers to the testing technique where the code or software is executed and analyzed during runtime. It involves testing the functionality and behavior of the software by providing input and verifying the output. Dynamic testing techniques include techniques like unit testing, integration testing, system testing, and acceptance testing.

Now, let's go through each option to understand why it is correct or incorrect:

Option A) Because they share the aim of identifying defects and find the same types of defect. This option is incorrect because static testing and dynamic testing have different aims and may find different types of defects. Static testing focuses on identifying defects by analyzing the software artifacts, while dynamic testing focuses on identifying defects by executing the software.

Option B) Because they have different aims but find the same types of defect. This option is incorrect because static testing and dynamic testing not only have different aims but may also find different types of defects. Static testing primarily focuses on identifying defects in the software artifacts, while dynamic testing focuses on identifying defects during runtime.

Option C) Because they have different aims and differ in the types of defect they find. This option is incorrect because static testing and dynamic testing have different aims, but they may find similar types of defects. Static testing focuses on identifying defects by analyzing software artifacts, while dynamic testing focuses on identifying defects by executing the software.

Option D) Because they share the aim of identifying defects but differ in the types of defect they find. This option is correct because static testing and dynamic testing complement each other by sharing the aim of identifying defects but differing in the types of defects they find. Static testing helps in identifying defects in the early stages of the software development life cycle, while dynamic testing helps in identifying defects during runtime.

Therefore, the correct answer is D) Because they share the aim of identifying defects but differ in the types of defect they find.

What can static analysis NOT find?

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

  2. Unreachable (dead) code

  3. Memory leaks

  4. Array bound violations


Correct Option: C

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 after that is taxed at 22%. Any further amount is taxed at 40%. To the nearest whole pound, which of these groups of numbers fall into three DIFFERENT equivalence classes?

  1. $4000; $5000; $5500

  2. $32001; $34000; $36500

  3. $28000; $28001; $32001

  4. $4000; $4200; $5600


Correct Option: D

AI Explanation

To determine which groups of numbers fall into three different equivalence classes, we need to consider the tax brackets and how they affect the tax calculation for each salary amount.

Let's analyze each option:

Option A) $4000; $5000; $5500

  • The first $4000 is tax-free.
  • The next $1000 ($5000 - $4000) is taxed at 10%.
  • The next $500 ($5500 - $5000) is also taxed at 10%.

Since all three numbers fall within the same tax bracket and are subject to the same tax rate, they belong to the same equivalence class. Therefore, Option A is not the answer.

Option B) $32001; $34000; $36500

  • The first $4000 is tax-free.
  • The next $1500 is taxed at 10%.
  • The next $28000 is taxed at 22%.
  • Any further amount is taxed at 40%.

The three numbers in this option fall into different tax brackets, so they are likely to belong to different equivalence classes. However, we need to check if any two of them fall into the same tax bracket.

  • $32001: This amount falls within the 22% tax bracket.
  • $34000: This amount also falls within the 22% tax bracket.
  • $36500: This amount falls within the 40% tax bracket.

Since $32001 and $34000 fall into the same tax bracket, they belong to the same equivalence class. Therefore, Option B is not the answer.

Option C) $28000; $28001; $32001

  • The first $4000 is tax-free.
  • The next $1500 is taxed at 10%.
  • The next $28000 is taxed at 22%.
  • Any further amount is taxed at 40%.

The three numbers in this option fall into different tax brackets, so they are likely to belong to different equivalence classes. However, we need to check if any two of them fall into the same tax bracket.

  • $28000: This amount falls within the 22% tax bracket.
  • $28001: This amount also falls within the 22% tax bracket.
  • $32001: This amount falls within the 40% tax bracket.

Since $28000 and $28001 fall into the same tax bracket, they belong to the same equivalence class. Therefore, Option C is not the answer.

Option D) $4000; $4200; $5600

  • The first $4000 is tax-free.
  • The next $200 ($4200 - $4000) is taxed at 10%.
  • The next $1400 ($5600 - $4200) is taxed at 22%.

The three numbers in this option fall into different tax brackets. None of them fall into the same tax bracket, so they belong to different equivalence classes. Therefore, Option D is the correct answer.

To the nearest whole pound, the numbers in Option D fall into three different equivalence classes.

  1. 0,1900,2004,2005

  2. 1900, 2004

  3. 1899, 1900, 1901,2003,2004,2005

  4. 1899,1900,2004,2005


Correct Option: D
  1. Statement Coverage

  2. Pole Coverage

  3. Condition Coverage

  4. Path Coverage


Correct Option: B
  1. Missing Statements

  2. Unused Branches

  3. Dead Code

  4. Unused Statement


Correct Option: A

Which of the following techniques is NOT a black box technique?

  1. State transition testing

  2. LCSAJ (Linear Code Sequence and Jump)

  3. syntax testing

  4. boundary value analysis


Correct Option: B

AI Explanation

To answer this question, we need to understand what black box testing techniques are. Black box testing is a software testing method in which the internal structure, design, or implementation details of the system being tested are not known to the tester. Instead, the tester focuses on the inputs and outputs of the system to ensure that it functions correctly.

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

Option A) State transition testing - This option is a black box technique. State transition testing focuses on testing the behavior of a system as it transitions between different states. It does not rely on knowledge of the internal structure or implementation details of the system.

Option B) LCSAJ (Linear Code Sequence and Jump) - This option is NOT a black box technique. LCSAJ is a white box testing technique. It involves analyzing the code structure and execution paths to identify linear code sequences and jump statements for testing purposes. It requires knowledge of the internal structure and implementation details of the system.

Option C) Syntax testing - This option is a black box technique. Syntax testing involves testing the input and output behavior of a system based on its syntax rules. It does not require knowledge of the internal structure or implementation details of the system.

Option D) Boundary value analysis - This option is a black box technique. Boundary value analysis involves testing the behavior of a system at the boundaries of input values. It does not rely on knowledge of the internal structure or implementation details of the system.

The correct answer is Option B) LCSAJ (Linear Code Sequence and Jump). This option is not a black box technique because it requires knowledge of the internal structure and implementation details of the system.

What is NOT included in typical costs for an inspection process?

  1. setting up forms and databases

  2. analysing metrics and improving processes

  3. writing the documents to be inspected

  4. time spent on the document outside the meeting


Correct Option: C