Software Testing Methodologies (STM)

  • Published on
    06-Jan-2016

  • View
    26

  • Download
    0

DESCRIPTION

Software Testing Methodologies (STM). Unit 3 Transaction Flow. Compiled with reference from: Software Testing Techniques: Boris Beizer Craft of Software Testing: Brain Marrick. Narasimha Rao.P. U2. Transaction-Flow Testing. We will see in this part of Unit 2: - PowerPoint PPT Presentation

Transcript

  • Narasimha Rao.PCompiled with reference from: Software Testing Techniques: Boris Beizer Craft of Software Testing: Brain MarrickUnit 3 Transaction Flow

    ref boris beizer

  • Transaction-Flow Testing

    We will see in this part of Unit 2:

    Concepts of Transaction flows

    Transaction-flow testing

    U2

    ref boris beizer

  • Transaction-Flow Testing

    Contents

    Definitions of Transaction, Transaction flow, Transaction flow graphIts representation, implementation architecture in an O.S. & implementation in a systemA perspective of TFG model. View wrt DFG, CFG

    Handling cases decisions, biosis, mitosis, transactional junction, absorption & conjugationTFG is not structured - Reasons

    Transaction Flow Testing Techniques

    Building transaction flowsInspections, Reviews, and walkthroughsPath selectionPath sensitizationInstrumentationTest data bases

    Test Execution

    Transaction-flow implementation & testing related commentsTranslation based systemsHidden languagesU2

    ref boris beizer

  • Definitions of Transaction,Transaction-flow, TFG

    Transaction-flow

    Transaction-flow represents a systems processing. Functional testing methods are applied for testing T-F.

    Transaction-flow Graph

    TFG represents a behavioral (functional) model of the program (system) used for functional testing by an independent system tester.

    Transaction

    is a unit of work seen from systems user point of view.

    consists of a sequence of operations performed by a system, persons or external devices.

    is created (birth) due to an external act & up on its completion (closure), it remains in the form of historical records.U2

    ref boris beizer

  • A Simple Transaction

    Example: the sequence of steps in a transaction in an online information retrieval system

    1. accept inputs 7. Accept Inputs 2. Validate inputs (Birth of tr.) 8. Validate inputs

    3. Transmit ack. to the user 9. Process the request

    4. Process input 10. Update file

    5. Search file 11. Transmit output

    6. Request direction from user 12. Record transaction in log & cleanup (Closure)

    Users View of a transaction: Single step

    Systems view : Sequence of many operations

    U2-B

    ref boris beizer

  • Example of a Transaction flow (diagram)

    User (terminal) Terminal controller CPU

    U2

    ref boris beizer

  • Definitions

    Transaction-flow Graph : a scenario between users & computer

    Transaction-flow :an internal sequence of events in processing a transaction

    Uses of Transaction-flow

    Specifying requirements of big, online and complicated systems.

    Airline reservation systems, air-traffic control systems.

    Loops are less as compared to CFG. Loops are used for user input error processing

    U2

    ref boris beizer

  • Implementation of Transaction-Flow (in a system)

    U2

    Implicit in the design of systems control structure & associated database.

    No direct one-to-one correspondence between the processes and decisions of transaction-flow, and the corresponding program component.

    A transaction-flow is a path taken by the transaction through a succession of processing modules.

    A transaction is represented by a token.

    A transaction-flow graph is a pictorial representation of what happens to the tokens.

    ref boris beizer

  • Implementation of Transaction-Flow

    U2System Control Structure (architecture of the implementation) :

    ref boris beizer

  • Implementation of Transaction-Flow

    U2System control structure

    System is controlled by a scheduler

    A Transaction is created by filling in a Transaction Control Block (TCB) by user inputs and by placing that token on input Q of Scheduler.

    Scheduler examines and places it on appropriate process Q such as A. When A finishes with the Token, it places the TCB back on the scheduler Q.

    Scheduler routes it to the next process after examining the token :

    It contains tables or code to route a token to the next process.

    It may contain routing information only in tables.

    Scheduler contains no code / data. Processing modules contain code for routing.

    ref boris beizer

  • Implementation of Transaction-Flow

    U2Transaction Processing System (simplified):

    There are many Tr. & Tr-flows in the system.

    Scheduler invokes processes A to E as well as disk & tape read & writes.

    The order of execution depends on priority & other reasons.

    Cyclic structure like in this example is common in process control & communication systems.

    The criteria for implementation mechanism depends on performance and resource optimization.

    ref boris beizer

  • A perspective of Transaction-Flow

    U2Transaction-flow testing is a block box technique. (as we assumed nothing regarding computer, communications, environment, O.S., transaction identity or structure or state.)

    TFG is a kind of DFG.

    TFG has tokens, & DFG has data objects with history of operations applied on them.

    Many techniques of CFG apply to TFG & DFG

    Decision nodes of TFG have exception exits to the central recovery process.

    So, we ignore the effect of interrupts in a Transaction-flow.

    ref boris beizer

  • Transaction Flows splitting & merging decisions

    U2-BSplits of transactions (Births)

    A decision point in TFG

    BiosisMitosis

    ref boris beizer

  • Transaction Flows splitting & merging decisions

    U2Mergers of transactions

    Junction

    ref boris beizer

  • TFG splitting, merging Transactions

    U2

    NOTES:

    Multiple meanings now for decision and junction symbols in a TFG.

    Simple TFG model is not enough to represent multi-processor systems & associated coordination systems.

    Petrinet model uses operations for all the above. But Petrinets are applied to H/W, N/W protocol testing but not Software.

    ref boris beizer

  • Simplified TFG model

    U2

    Simplify TFG model

    Add New Tr-Flows for Biosis, Mitosis, Absorption, Conjugation

    Problems for programmer, designer & test designer.

    Need to design specific tests possibility of bugs.

    ref boris beizer

  • Transaction-flow Structure

    U2-B

    Reasons for Unstructuredness

    Processes involve Human Users

    Part of Flow from External Systems

    Errors, Failures, Malfunctions & Recovery Actions

    Transaction Count, Complexity. Customer & Environment

    ref boris beizer

  • Transaction-flow Structure

    U2-B

    Reasons for Unstructuredness

    New Transactions, & Modifications

    Approximation to Reality

    Attempt to Structure

    ref boris beizer

  • Transaction - Flow Testing - Steps

    U2-B

    First, Build / Obtain Transaction Flows

    Represent Explicitly

    Design details the Main Tr-Flows

    Create From PDL

    HIPO charts & Petrinet Representations

    Objective Trace the transaction

    ref boris beizer

  • Transaction - Flow Testing - Steps

    U2-B

    Inspections, Reviews & Walkthroughs

    Start From Preliminary Design

    Conducting Walkthroughs

    Discuss enough Transaction Types (98% Transactions)

    User needs & Functional terms (Design independent)

    Traceability to Requirements

    ref boris beizer

  • Transaction - Flow Testing - Steps

    U2-BInspections, Reviews & Walkthroughs

    Design Tests for C1 + C2 coverage

    Additional Coverage (> C1+C2)

    Paths with loops, extreme values, domain boundariesWeird cases, long & potentially troublesome Tr.

    Design Test cases for Tr. Splits & mergers

    Publish Selected Test Paths early

    Buyers Acceptance functional & acceptance tests

    ref boris beizer

  • Transaction - Flow Testing Techniques

    U2-BPath Selection

    Covering Set (C1+C2) of Functionally Sensible Tr.

    Add Difficult Paths

    Review with designers & implementers

    Exposure of interface problems & duplicated processing

    Very few Implementation bugs may remain

    Transaction-flow Path Covering Set belongs inSystem Feature Tests

    ref boris beizer

  • Transaction - Flow Testing Techniques

    U2-BSensitization

    Functionally Sensible Paths Simple

    Error, Exception, External Protocol Interface Paths - Difficult

    Testing Tr.Flows with External Interfaces

    Use patches & break points, mistune, and break the rules,

    ref boris beizer

  • Transaction - Flow Testing Techniques

    U2-BInstrumentation

    Link Counters are not Useful.

    Need

    Trace

    Queues on which Tokens resided

    Entries to & Exits from Dispatcher

    A Running Log

    Make Instrumentation as part of System Design

    ref boris beizer

  • Transaction - Flow Testing Techniques

    U2-BTest Data bases

    Design & Maintenance of a Test Data base - Effort

    Mistakes

    Unawareness about design of a centrally administered test DB

    Test DB design by Testers

    Using one DB for all tests (need 4 to 5)

    Need experienced System & Test Designers

    ref boris beizer

  • Transaction - Flow Testing Techniques

    U2-BTest Execution

    Use Test Execution Automation

    Have to do a large # of Tests for C1+C2 coverage

    ref boris beizer

  • Transaction - Flow Testing - Implementation

    U2-B

    Transaction based systemsTCB

    Centralized, Common Processing QueuesJust O(n) Queues for Links of O(n2)

    Transaction DispatcherUses tables & Finite State Machines

    Recovery & Other LogsKey events in Tr Flow

    Self-Test SupportPrivileged modes in Transaction control tables

    ref boris beizer

  • Transaction - Flow Testing - Caution

    U2-B

    Hidden Languages (flow control language)

    Transaction Flows based on control codes in TCB or DB

    Undeclared. Syntax & Semantics are not debugged.

    Possibility of bugs

    ref boris beizer

  • Software Testing Methodology

    To Unit 3 : Data flow testing

    U2

    ref boris beizer

  • Data - Flow Testing - Basics

    U2

    Data Flow Testing (DFT) uses control flow graph (CFG) to explore dataflow anomalies.

    DFT is a family of test strategies based on selecting paths through the programs control flow in order to explore the sequence of events related to the status of data objects.

    For example:Pick enough paths to assure that every data item has been initialized prior to its use, or that all objects have been used for something.

    ref boris beizer

  • Data - Flow Testing - Basics

    U2Motivation

    To feel confident about the program

    Data dominated design. Code migrates to data..

    of source code for Data Declarations

    Data flow Machines vs Von Neumanns

    Abstract M I M D Language & compiler take care of parallel computations

    DFG is a spec. for relations among the data objects. Explore all relations under some test.

    ref boris beizer

Recommended

View more >