Software Testing Fundamentals

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

When testing an input file that can contain 1-255 records, how many test cases should be written?

  • 4 test cases for 0, 1, 255, and 256 records (correct)
  • 3 test cases for 1, 255, and 500 records
  • Only 2 test cases for 1 and 255 records
  • Only 1 test case for 128 records

What is the main advantage of using both EP and BVA techniques?

  • It reduces the number of test cases
  • It is a cheaper testing approach
  • It provides more confidence in typical use scenarios (correct)
  • It eliminates the need for testing mid-partition values

What is the purpose of a decision table in testing?

  • To determine the expected output for each test case
  • To identify the most common input combinations
  • To reduce the number of test cases
  • To explore combinations of inputs, situations, or events (correct)

When rationalizing input combinations, what does a hyphen denote?

<p>A don't care input condition (A)</p> Signup and view all the answers

What is the result of each column in a decision table?

<p>At least one test case (C)</p> Signup and view all the answers

What is the purpose of determining test case groups?

<p>To determine the expected output for each test case (B)</p> Signup and view all the answers

What is Statement testing in White Box testing?

<p>A testing technique that focuses on statement execution (C)</p> Signup and view all the answers

What is the main benefit of using decision tables in testing?

<p>It provides a clear and structured approach to testing (D)</p> Signup and view all the answers

What is statement coverage measuring?

<p>The percentage of executable statements exercised by a test suite (C)</p> Signup and view all the answers

What is the statement coverage of a program with 100 statements, if 87 statements are exercised by a test suite?

<p>87% (C)</p> Signup and view all the answers

What is the purpose of decision coverage?

<p>To measure the percentage of decision outcomes exercised by a test suite (C)</p> Signup and view all the answers

What is the decision coverage of a program with 120 decision outcomes, if 60 decision outcomes are exercised by a test suite?

<p>50% (D)</p> Signup and view all the answers

How is statement coverage typically measured?

<p>By using a software tool (C)</p> Signup and view all the answers

What is the term for the percentage of decision outcomes exercised by a test suite?

<p>Decision coverage (B), Branch coverage (D)</p> Signup and view all the answers

What is the primary intention of testing a program?

<p>To show that a program does what it is intended to do and to discover program defects (D)</p> Signup and view all the answers

What type of testing involves the examination of documentation, source code listings, etc.?

<p>Static Testing (B)</p> Signup and view all the answers

What is the assumption behind equivalence partitioning?

<p>If one value works, all will work (B)</p> Signup and view all the answers

What is the purpose of boundary value analysis?

<p>To identify the boundaries of the input and output values (B)</p> Signup and view all the answers

What is the main difference between functional testing and structural testing?

<p>Functional testing is based on behavior, while structural testing is based on structure (C)</p> Signup and view all the answers

What is validation in software testing?

<p>Testing and inspection (D)</p> Signup and view all the answers

What is the purpose of reviews in software testing?

<p>To examine the documentation and source code listings (D)</p> Signup and view all the answers

What is the benefit of equivalence partitioning?

<p>It reduces the number of test cases (C)</p> Signup and view all the answers

Flashcards are hidden until you start studying

Study Notes

Program Testing

  • Testing is intended to show that a program does what it is intended to do (conform to requirements) and to discover program defects before it is put into use.

Validation Techniques

  • There are three types of systematic validation techniques:
    • Static (non-execution): Inspection & Reviews, Examination of documentation, source code listings, etc.
    • Functional (Black Box Testing): Based on behavior/functionality of software, Class → Component → System
    • Structural (White Box Testing): Based on structure of software (code)

Black Box Testing Techniques

  • Equivalence partitioning (EP): Divide inputs, outputs, etc. into areas that are equivalent, assuming that if one value works, all will work.
  • Boundary value analysis (BVA): Write test cases for the ends of the range, and invalid-input test cases for situations just beyond the ends.

Boundary Value Analysis Guidelines

  • For each input/output condition, specify a range of values, write test cases for the ends of the range, and invalid-input test cases for situations just beyond the ends.
  • If an input/output condition specifies a number of values, write test cases for the minimum and maximum number of values and one beneath and beyond these values.

Why Do Both EP and BVA?

  • If you do boundaries only, you have covered all the partitions.
  • Testing only extremes may not give confidence for typical use scenarios.
  • Boundaries may be harder (more costly) to set up.

Decision Tables

  • Explore combinations of inputs, situations, or events.
  • Add columns to the table for each unique combination of input conditions.
  • Each entry in the table may be either 'T' for true, 'F' for false.

Rationalizing Input Combinations

  • Some combinations may be impossible or not of interest.
  • Some combinations may be 'equivalent'.
  • Use a hyphen to denote "don't care".

Design Test Cases

  • Determine test case groups.
  • Determine the expected output conditions for each combination of input conditions.
  • Each column is at least one test case.

White Box Testing Techniques

  • Statement testing: Measure the percentage of executable statements exercised by a test suite.
  • Branch/decision testing: Measure the percentage of decision outcomes exercised by a test suite.
  • There are many other techniques….

Statement Coverage

  • Measure the percentage of executable statements exercised by a test suite.
  • Example: If a program has 100 statements, and tests exercise 87 statements, statement coverage is 87%.

Decision Coverage (Branch Coverage)

  • Measure the percentage of decision outcomes exercised by a test suite.
  • Example: If a program has 120 decision outcomes, and tests exercise 60 decision outcomes, decision coverage is 50%.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

Module8-Software Testing.pdf

More Like This

Use Quizgecko on...
Browser
Browser