Software Testing Techniques
42 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

What is the minimum character requirement for a password?

  • 3 characters
  • 6 characters
  • 4 characters (correct)
  • 5 characters
  • Which of the following is an invalid input for a login ID?

  • ghijklmno
  • ABCD (correct)
  • 1234
  • abcd1234
  • What type of analysis is used to determine pass or fail for input sizes?

  • Comparative Analysis
  • Boundary Value Analysis (correct)
  • Statistical Analysis
  • Behavioral Analysis
  • What is the maximum character limit for a login ID?

    <p>16 characters</p> Signup and view all the answers

    Which character type is NOT accepted in a password?

    <p>Upper case letters</p> Signup and view all the answers

    What is the correct format for an account number suffix?

    <p>6 digit number</p> Signup and view all the answers

    What would be considered an invalid case for a login ID based on character types?

    <p>All of the above</p> Signup and view all the answers

    What is the requirement for the account number prefix?

    <p>Must be a 3-digit number not starting with 0 or 1</p> Signup and view all the answers

    What is the minimum character requirement for a valid password?

    <p>4 chars</p> Signup and view all the answers

    Which of the following represents a valid case for an account number suffix?

    <p>123456</p> Signup and view all the answers

    What happens when the input length is one less than the minimum for the account number suffix?

    <p>It fails validation.</p> Signup and view all the answers

    Which of the following describes a 'Bug' in software?

    <p>A problem encountered by the user during usage.</p> Signup and view all the answers

    Which statement is true regarding Equivalence Class Partitions in the context of boundary value analysis?

    <p>They focus on both valid and invalid input types.</p> Signup and view all the answers

    What defines a 'Defect' in software testing?

    <p>A mismatch between expected and actual outcomes.</p> Signup and view all the answers

    What is the maximum character length for a valid password?

    <p>4 chars</p> Signup and view all the answers

    In the context of inspection within document evaluation, which of the following best describes the process?

    <p>Reviewing specific elements within the document.</p> Signup and view all the answers

    What is the main focus of black-box testing?

    <p>Testing the interface and specified functions of the software</p> Signup and view all the answers

    Which of the following describes white-box testing?

    <p>It tests the internal operations based on control structure design.</p> Signup and view all the answers

    What is the primary objective of Basis Path Testing?

    <p>To derive execution paths that ensure every statement is executed.</p> Signup and view all the answers

    In Flow Graph Notation, what does a predicate node indicate?

    <p>It contains a simple conditional expression.</p> Signup and view all the answers

    Which statement about edges in flow graphs is correct?

    <p>Each edge represents the flow of control in a specific direction.</p> Signup and view all the answers

    How does white-box testing ensure the validity of internal data structures?

    <p>By executing loops within their operational bounds.</p> Signup and view all the answers

    Which statement accurately reflects the purpose of white-box testing?

    <p>To examine logical paths through the software for errors.</p> Signup and view all the answers

    Why are regions important in flow graph analysis?

    <p>They include the area outside the graph as a separate entity.</p> Signup and view all the answers

    What is the main focus of boundary value analysis?

    <p>Testing inputs specifically at the edges of a class</p> Signup and view all the answers

    When designing test cases for an input range of 8-12 characters, which value would not be considered valid?

    <p>13 characters</p> Signup and view all the answers

    According to the guidelines for boundary value analysis, which of the following scenarios is most complete?

    <p>Testing numbers just above and just below the minimum and maximum values</p> Signup and view all the answers

    What would be an appropriate test case for an invalid input condition that specifies a password length must be between 8 and 12 characters?

    <p>Password length of 7 characters</p> Signup and view all the answers

    If the valid user ID length is between 4 and 16 characters, what should be included in test cases based on the boundary value analysis?

    <p>Testing user IDs of lengths 4, 16, 7, and 10</p> Signup and view all the answers

    Which of the following best describes internal program data structures in the context of boundary value analysis?

    <p>Test cases should be designed to exercise them at their minimum and maximum boundaries.</p> Signup and view all the answers

    What is a key component of equivalence partitioning that complements boundary value analysis?

    <p>Dividing input data into valid and invalid partitions</p> Signup and view all the answers

    In design guidelines for boundary value analysis, when should values just above and just below be tested?

    <p>For both input and output conditions to ensure thorough testing</p> Signup and view all the answers

    What is the primary purpose of cyclomatic complexity in software testing?

    <p>To provide a quantitative measure of logical complexity</p> Signup and view all the answers

    Which formula can be used to compute cyclomatic complexity based on the number of edges and nodes?

    <p>V(G) = E - N + 2</p> Signup and view all the answers

    What defines an independent program path?

    <p>A path that introduces at least one new set of processing statements</p> Signup and view all the answers

    How many independent paths are defined in the basis set shown?

    <p>4</p> Signup and view all the answers

    Which of the following formulas represents the number of independent paths based on predicate nodes?

    <p>V(G) = P + 1</p> Signup and view all the answers

    What would not be counted as a new edge in independent paths?

    <p>Traversing a previously traversed edge</p> Signup and view all the answers

    In equivalence partitioning, how many classes are created when an input condition specifies a member of a set?

    <p>One valid class and one invalid class</p> Signup and view all the answers

    What does the number of regions in a flow graph correspond to in terms of cyclomatic complexity?

    <p>The cyclomatic complexity value</p> Signup and view all the answers

    If the number of nodes in a graph is 9 and the number of edges is 11, what is the cyclomatic complexity?

    <p>4</p> Signup and view all the answers

    What does equivalence partitioning not consider when creating input classes?

    <p>The shape of the input data</p> Signup and view all the answers

    Study Notes

    Software Testing Techniques

    • White-box testing and black-box testing are two software testing techniques.

    Two Unit Testing Techniques

    • Black-box testing: Focuses on the function of a product, not its internal structure. Tests if the specified function is fully operational and error-free. Includes tests at the software interface. Also known as functional testing or behavioral testing.

    • White-box testing: Examines the internal workings of a product. Ensures that internal operations match specifications, and all internal components are exercised. Focuses on procedural details, logical paths, and specific conditions/loops. Also called structural testing or glass-box testing.

    White-box Testing

    • Uses the control structure of component-level design to create test cases.
    • Guarantees all independent paths in a module are exercised at least once.
    • Exercises every logical decision (true and false sides).
    • Executes all loops at their boundaries.
    • Tests internal data structures for validity.

    Basis Path Testing

    • A white-box testing technique by Tom McCabe.
    • Derives a logical complexity measure from a procedural design.
    • Uses this measure as a guide for defining a basis set of execution paths.
    • Test cases derived to exercise the basis set execute every statement in the program at least once.

    Flow Graph Notation

    • A circle in a graph is a node representing a sequence of one or more procedural statements.
    • A node with a conditional expression is a predicate node.
    • Each compound condition (multiple Boolean operators) is a separate predicate node.
    • A predicate node has two edges (True and False).
    • An edge (link) shows flow of control.
    • Edges do not intersect or cross other edges.
    • Areas bounded by edges/nodes are regions.

    Independent Program Paths

    • A path from the start node to the end node that introduces at least one new set of statements/conditions.
    • Must traverse at least one new edge compared to previous paths.

    Cyclomatic Complexity

    • A quantitative measure of the logical complexity of a program.
    • Defines the number of independent paths in the basis set.
    • Provides an upper bound for the required test cases.
    • Calculated in three ways:
      • Number of regions.
      • V(G) = E - N + 2 where E = edges, and N = nodes.
      • V(G) = P + 1 where P = predicate nodes.

    Deriving the Basis Set and Test Cases

    • Use the program design or code to draw a flow graph.
    • Determine the cyclomatic complexity of the resultant flow graph.
    • Create a basis set of linearly independent paths.
    • Create test cases that force each path to execute.

    Black-box Testing

    • Complements white-box testing by uncovering different classes of errors.
    • Focuses on functional requirements and the information domain of a software program.
    • Utilizes in latter testing stages, after white-box testing.
    • Identifies input conditions to fully exercise all functional requirements.

    Black-box Testing Categories

    • Incorrect or missing functions.
    • Interface errors.
    • Errors in data structures or external data access.
    • Behavior or performance errors.
    • Initialization and termination errors.

    Equivalence Partitioning

    • A black-box testing technique dividing input domain into classes.
    • Ideal for reducing total test cases.
    • Based on equivalence classes for valid and invalid input conditions.
    • Selects test cases from each equivalence class to exercise the largest number of attributes.

    Guidelines for Defining Equivalence Classes

    • Range input conditions have one valid range and two invalid ranges.
    • Specific value input conditions have one valid and two invalid values.
    • Sets of values have one valid set and one invalid set.
    • Boolean values have one valid and one invalid Boolean condition.

    Boundary Value Analysis

    • A black-box testing technique focusing on boundaries of input domain.
    • Complements equivalence partitioning.
    • Selecting test cases at the edges of classes, from both input and output domains.

    Guidelines for Boundary Value Analysis

    • Test cases for input ranges include values at the boundaries and just above/below these boundaries.
    • Test cases for input values include minimum, maximum values and just above and below the values.
    • Test output values analogous to input values.
    • Test to stress data structures, by testing at minimum and maximum boundaries.

    Walkthrough, Inspection & Peer Review

    • Walkthrough: Study of a document for completeness/correctness, from beginning to end.
    • Inspection: Focus on a specific aspect within a document.
    • Peer Review: Comparison of two similar documents for completeness/correctness.

    Error, Defect & Bug

    • Error: A coding mistake found by the developer.
    • Defect: A mismatch between expected and actual software behaviour, found by the tester (also called issue or flaw).
    • Bug: A problem in software during use, found by customers or users.

    Studying That Suits You

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

    Quiz Team

    Related Documents

    Description

    This quiz covers essential software testing techniques, focusing on white-box and black-box testing methods. It outlines their definitions, purposes, and specific characteristics. Test your understanding of these fundamental concepts in software quality assurance.

    More Like This

    Software Testing Techniques
    40 questions
    Test Tipleri: Saydam Kutu Testi
    30 questions
    Use Quizgecko on...
    Browser
    Browser