Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Black box testing or behavioral testing

6,139 views

Published on

Published in: Education
  • Be the first to comment

Black box testing or behavioral testing

  1. 1. Black Box Testing or Behavioral Testing Saranya.V AP/CSE, Sri Vidya College of Engineering & Technology, Virudhunagar
  2. 2. • Only input & output functionality are visible.• Inputs are given and outputs are compared against specification.Features: Correct outputs from inputs properly. Test cases are designed from user requirements. Test planning can begin early in the software process. Looking at the program from an external point of view.
  3. 3. Black Box Testing Inputs causing Input Test Data I anomalous behavior System Outputs whichoutput Test Results O reveal the presence of defects
  4. 4. Black Box Testing is a “Expert” in Finding• Incorrect or missing functions.• Interface errors• Behavior or performance errors.• Initialization and termination errors.• Errors in data structures• External database errors.
  5. 5. Graph Based Testing Methods• First step in Black Box Testing to understand the objects• Used to connect the objects.• Next step is to define a series of tests that verify all the objects.“To accomplish these steps, the software engineer begins by creating”• Graph: collection of nodes that represent objects.• Links: Relationship between objects.• Node Weights: Properties of nodes• Link Weights: Characteristics of a link.
  6. 6. Sample Graph Notation Directed Link Object 1 Object 2 Object 3•Nodes are represented as circles.•Links between nodes are categorized as: •Directed Link (one direction) •Bidirectional or Undirected or Symmetric Link: both directions. •Parceled links: different relationships established between nodes.
  7. 7. 1. Equivalence Partitioning• One of the black box testing method that divides the input domain of a program into classes• Define a test case that uncovers classes of errors.• Equivalence class represents a set of valid or invalid states for input conditions.
  8. 8. 2. Boundary Value Analysis (BVA)• Errors tend to occur at the boundaries of the input domain rather than in center.• So we need boundary value analysis (testing technique)• BVA derived test cases from the output domain.
  9. 9. 3. Comparison Testing• If the output from the each version is same, assume all implementations are correct.• If the output is different, each of the applications is investigated to determine if a defect in one or more versions is responsible for the difference.• We have to provide same input and check the output.
  10. 10. 4. Orthogonal Array Testing• Used to finding errors associated with region faults.• number of inputs to the system is relatively small, but too large to allow for exhaustive testing of every possible input to the systems.• It provides good test coverage with test cases.
  11. 11. 5. Syntax Driven Testing• Very good methodology for compliers and parsers.• Use BNF notation.• Described by grammar.• Grammar for simple arithmetic:(exp)::=(exp)+(term)|(exp)-(term)|(term)(term)::=(term)*(factor)|(term)-(factor)|(factor)(factor)::=(identifier)|(<expression>)(id)::=|a|b|c|d|e………|z
  12. 12. 6. Decision Table-Based Testing • Ex: Toy Text Editor • Here n=4; • 1. Copy • 2. Paste • 3. Underline • 4. Boldface
  13. 13. Ex:2 Liquid Level • Sensor 1 : used to check upper level • Sensor 2: used to Sensor 1 check Lower level • Sensor 1 is active : open output valve • Sensor 2 is activeSensor 2 open input valve.
  14. 14. 7. Cause and Effect Graphs in Functional Testing• Represents relationship between input and output• Input  cause• Output  effect.Ex: ATM Banking Transaction System
  15. 15. Causes:C1: Command is creditC2: Command is DebitC3: Account Number is valid.C4: Transaction amount is Valid.Effects:E1: Print “Invalid command”E2: Print “invalid account number”E3: Print “debit amount not valid”E4: debit accountE5: credit account.
  16. 16. Types processing modes• And  effect occurs of all the inputs are true.• Or  Effect occurs if at least one input is true• Negation : effect occurs if input are false.
  17. 17. C2 and E3C3C4 Used to reduce the test case count C1 C2 C3 C4 Don’t care condition True false

×