Software Testing Fundamentals

NoiselessEpilogue avatar
NoiselessEpilogue
·
·
Download

Start Quiz

Study Flashcards

22 Questions

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

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

It provides more confidence in typical use scenarios

What is the purpose of a decision table in testing?

To explore combinations of inputs, situations, or events

When rationalizing input combinations, what does a hyphen denote?

A don't care input condition

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

At least one test case

What is the purpose of determining test case groups?

To determine the expected output for each test case

What is Statement testing in White Box testing?

A testing technique that focuses on statement execution

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

It provides a clear and structured approach to testing

What is statement coverage measuring?

The percentage of executable statements exercised by a test suite

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

87%

What is the purpose of decision coverage?

To measure the percentage of decision outcomes exercised by a test suite

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

50%

How is statement coverage typically measured?

By using a software tool

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

Decision coverage

What is the primary intention of testing a program?

To show that a program does what it is intended to do and to discover program defects

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

Static Testing

What is the assumption behind equivalence partitioning?

If one value works, all will work

What is the purpose of boundary value analysis?

To identify the boundaries of the input and output values

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

Functional testing is based on behavior, while structural testing is based on structure

What is validation in software testing?

Testing and inspection

What is the purpose of reviews in software testing?

To examine the documentation and source code listings

What is the benefit of equivalence partitioning?

It reduces the number of test cases

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%.

This quiz covers the basics of software testing, including the purpose of testing, types of validation techniques, and the differences between validation and verification.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free
Use Quizgecko on...
Browser
Browser