Intro to Software Testing

Embed Size (px)

Citation preview

  • 8/2/2019 Intro to Software Testing

    1/19

    Software Testing

    Presenter :

    Ambili P K

  • 8/2/2019 Intro to Software Testing

    2/19

    Sources of Problems Requirements Definition: Erroneous, incomplete,

    inconsistent requirements.

    Design: Fundamental design flaws in the software. Implementation: Mistakes in chip fabrication, wiring,

    programming faults, malicious code.

    Support Systems: Poor programming languages, faulty

    compilers and debuggers, misleading development tools.

  • 8/2/2019 Intro to Software Testing

    3/19

    Sources of Problems (Contd) Inadequate Testing of Software: Incomplete testing,

    poor verification, mistakes in debugging.

    Evolution: Sloppy redevelopment or maintenance,introduction of new flaws in attempts to fix old flaws,

    incremental escalation to inordinate complexity.

  • 8/2/2019 Intro to Software Testing

    4/19

    How to define Software

    Testing Principles Testing

    The execution of a program to find its faults

    VerificationThe process of proving the programs correctness.

    Validation

    The process of finding errors by executing the programin a real environment

    Debugging

    Diagnosing the error and correct it

  • 8/2/2019 Intro to Software Testing

    5/19

    Principles of Testing Testing must be traceable to the requirements.

    Testing should be planned for early in a software process.

    Testing efforts should be based on data about the errorsdetected.

    Testing should be incremental.

    Testing should focus on exceptions.

    Debugging should be planned for separately so that there isenough time and budget to understand and resolve bugs.

  • 8/2/2019 Intro to Software Testing

    6/19

    What are the Types of

    Software Tests Unit Testing (White Box)

    Integration Testing

    Function Testing (Black Box)

    Regression Testing

    System Test

    Acceptance and Installation Tests

  • 8/2/2019 Intro to Software Testing

    7/19

    Unit Testing (White Box) Individual components are tested.

    It is a path test.

    To focus on a relatively small segment of codeand aim to exercise a high percentage of the

    internal path

    Disadvantage: the tester may be biased byprevious experience. And the test value may not

    cover all possible values.

  • 8/2/2019 Intro to Software Testing

    8/19

    White-box techniques: These are based onknowledge of the program structure and are used

    to check for logical mistakes. Black-box techniques: These are used to test

    software as a whole and do not depend on the

    internal design and structure of the software.

  • 8/2/2019 Intro to Software Testing

    9/19

    Integration Testing Top-down Integration Test

    Bottom-up Integration Test

  • 8/2/2019 Intro to Software Testing

    10/19

    Top-down Integration Test The control program is tested first. Modules are

    integrated one at a time. Emphasize on interface

    testing

    Advantages: No test drivers needed

    Interface errors are discovered early

    Modular features aid debugging

    Disadvantages:

    Errors in critical modules at low levels are found late.

  • 8/2/2019 Intro to Software Testing

    11/19

    A

    B

    T1

    T2

    T3

    A

    B

    C

    T4

    T3

    T2

    T1

    Top-down Testing

  • 8/2/2019 Intro to Software Testing

    12/19

    Bottom-up Integration Test Allow early testing aimed at proving feasibility

    Emphasize on module functionality and performance

    Advantages:Errors in critical modules are found early

    Disadvantages: Test drivers are needed

    Interface errors are discovered late

  • 8/2/2019 Intro to Software Testing

    13/19

    TestDrivers

    Level N

    Level N-1 Level N-1

    Level NLevel N

    TestDriversTestDrivers

    TestDrivers

    TestDrivers

    Bottom-up testing

  • 8/2/2019 Intro to Software Testing

    14/19

    Function Testing (Black Box) Designed to exercise its external specifications

    Testers not biased by knowledge of the programs

    design. Disadvantages:

    1. The need for explicitly stated requirements

    2. Only cover a small portion of the possible test

    conditions.

  • 8/2/2019 Intro to Software Testing

    15/19

    Regression Testing Test the effects of the newly introduced changes on

    all the previously integrated code.

    The common strategy is to accumulate acomprehensive regression bucket but also to definea subset.

    The full bucket is run only occasionally, but the

    subset is run against every spin. Disadvantages:

    1. To decide how much of a subset to use and whichtests to select.

  • 8/2/2019 Intro to Software Testing

    16/19

    What is Test Planning Define the functions, roles and methods for all test

    phases.

    Test planning usually start during the requirementsphase.

    Major test plan elements are:

    1. Objectives for each test phase

    2. Schedules and responsibilities for each test activity3. Availability of tools, facilities and test libraries.

    4. Set the criteria for test completion

  • 8/2/2019 Intro to Software Testing

    17/19

    Test Execution & Reporting Testing should be treated like an experiment.

    Testing require that all anomalous behavior be noted

    and investigated. Big companies keep a special library with all copies of

    test reports, incident forms, and test plans

  • 8/2/2019 Intro to Software Testing

    18/19

    Real-Time Testing Real-Time testing is necessary because the deployment

    system is usually more complicate than developmentsystem

    Rules apply for testing real time system1. Evaluate possible deadlocks, thrashing to special timing

    conditions

    2. Use tests to simulate hardware faults.

    3. Use hardware simulation to stress the software design.4. Design ways to simulate modules missing in the

    development system.

  • 8/2/2019 Intro to Software Testing

    19/19

    Limitations of Software Testing Testing cannot be exhaustive.

    Selective testing cannot detect all errors.

    Testing itself may have bugs.

    Testing cannot prevent errors; it only detects them.

    Testing is not as cost-effective as other quality filters

    such as formal technical reviews because it comeslate in the cycle when errors are more in number

    and costlier to rectify.