Software Testing Fundamentals
22 Questions
0 Views

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</p> Signup and view all the answers

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

    <p>At least one test case</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</p> Signup and view all the answers

    What is Statement testing in White Box testing?

    <p>A testing technique that focuses on statement execution</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</p> Signup and view all the answers

    What is statement coverage measuring?

    <p>The percentage of executable statements exercised by a test suite</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%</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</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%</p> Signup and view all the answers

    How is statement coverage typically measured?

    <p>By using a software tool</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</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</p> Signup and view all the answers

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

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

    What is the assumption behind equivalence partitioning?

    <p>If one value works, all will work</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</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</p> Signup and view all the answers

    What is validation in software testing?

    <p>Testing and inspection</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</p> Signup and view all the answers

    What is the benefit of equivalence partitioning?

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

    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

    Description

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

    More Like This

    Use Quizgecko on...
    Browser
    Browser