11305_lect 36(regression testing with its types)

Upload: sainimandy

Post on 08-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/7/2019 11305_Lect 36(Regression Testing With Its Types)

    1/12

  • 8/7/2019 11305_Lect 36(Regression Testing With Its Types)

    2/12

    Regression Testing

    y If a piece of Software is modified for any reason testing needs to be done to

    ensure that it works as specified and that it has not negatively impacted any

    functionality that it offered previously. This is known as Regression Testing.

    y Regression testing is the practice of running an old test suite after each change

    to the system or after each bug fix to ensure that no new bug has been

    introduced due to the change or the bug fix.

    y However, if only a few statements are changed, then the entire test suite need

    not be run - only those test cases that test the functions that are likely to be

    affected by the change need to be run.

  • 8/7/2019 11305_Lect 36(Regression Testing With Its Types)

    3/12

    Regression Testing

    y Regression Testing attempts to verify:

    y That the application works as specified even after the

    changes/additions/modification were made to it .

    y

    The original functionality continues to work as specified even afterchanges/additions/modification to the software application

    y The changes/additions/modification to the software application have not

    introduced any new bugs

  • 8/7/2019 11305_Lect 36(Regression Testing With Its Types)

    4/12

    4

    When is Regression Testing necessary?

    y Regression Testing plays an important role in any Scenario where a change has

    been made to a previously tested software code.

    y Regression Testing is hence an important aspect in various Software

    Methodologies where software changes enhancements occur frequently.

    y

    Any Software Development Project is invariably faced with requests for changingDesign, code, features or all of them.

    y Some Development Methodologies embrace change.

    For example Extreme Programming Methodology advocates applying small

    incremental changes to the system based on the end user feedback.

    Each change implies more Regression Testing needs to be done to ensure that the

    System meets the Project Goals

  • 8/7/2019 11305_Lect 36(Regression Testing With Its Types)

    5/12

    Why is Regression Testing important?

    y Any Software change can cause existing functionality to break.

    y Changes to a Software component could impact dependent Components.

    y It is commonly observed that a Software fix could cause other bugs.

    y All this affects the quality and reliability of the system. Hence Regression Testing,

    since it aims to verify all this, is very important.

  • 8/7/2019 11305_Lect 36(Regression Testing With Its Types)

    6/12

    y Every time a change occurs one or more of the following scenarios may occur:

    - More Functionality may be added to the system.

    - More complexity may be added to the system.

    - New bugs may be introduced.

    - System may tend to become more and more fragile(Weak)with each change

    y After the change the new functionality may have to be tested along with all the

    original functionality.

    y With each change Regression Testing could become more and more costly.

    y To make the Regression Testing Cost Effective and yet ensure good coverage one

    or more of the following techniques may be applied:

    Making Regression Testing Cost Effective:

  • 8/7/2019 11305_Lect 36(Regression Testing With Its Types)

    7/12

    y Test Automation: If the Test cases are automated the test cases may be executed

    using scripts after each change is introduced in the system. The execution of test

    cases in this way helps eliminate oversight, human errors,. It may also result in

    faster and cheaper execution of Test cases. However there is cost involved in

    building the scripts.

    y

    - Selective Testing: Some Teams choose execute the test cases selectively. They

    do not execute all the Test Cases during the Regression Testing. They test only

    what they decide is relevant. This helps reduce the Testing Time and Effort.

    Making Regression Testing Cost Effective:

  • 8/7/2019 11305_Lect 36(Regression Testing With Its Types)

    8/12

  • 8/7/2019 11305_Lect 36(Regression Testing With Its Types)

    9/12

    Regression Testing How to Test?y Like any other Testing Regression Testing Needs proper planning.

    y For an Effective Regression Testing to be done the following ingredients are

    necessary:1) Create a Regression Test Plan: Test Plan identified Focus Areas, Strategy, Test

    Entry and Exit Criteria. It can also outline Testing Prerequisites,

    Responsibilities, etc.

    2) Create Test Cases: Test Cases that cover all the necessary areas are important.

    They describe what to Test, Steps needed to test, Inputs and Expected Outputs.Test Cases used for Regression Testing should specifically cover the

    functionality addressed by the change and all components affected by the

    change. The Regression Test case may also include the testing of the

    performance of the components and the application after the change(s) were

    done.

    3) Defect Tracking: As in all other Testing Levels and Types It is important

    Defects are tracked systematically, otherwise it undermines the Testing Effort.

  • 8/7/2019 11305_Lect 36(Regression Testing With Its Types)

    10/12

    Types of Regressiony Types of Regression Testing:

    We have following four types of regression testing techniques.

    1)Corrective Regression Testing: Corrective regression testing applies when

    specifications are unmodified and test cases can be reused.

    2) Progressive Regression Testing: Progressive regression testing applies when

    specifications are modified and new test cases must be designed.3) The Retest-All Strategy: The retest-all strategy reuses all tests, but this

    strategy may waste time and resources due to execution of unnecessary tests.

    When the change to a system is minor, this strategy would be rather wasteful.

    4) The Selective Strategy: The selective strategy uses a subset of the existing

    test cases to reduce the retesting cost. In this strategy, a test unit must be rerun if

    and only if any of the program entities, e.g. functions, variables etc., it covers

    have been changed. The challenge is to identify the dependencies between a test

    case and the program entities it covers.

  • 8/7/2019 11305_Lect 36(Regression Testing With Its Types)

    11/12

    The Selective Strategyy Rothermel and Harrold suggested a typical selective regression testing

    process, which includes following steps.

    Step - 1: Identify affected software components after program, P, has been modified

    to P'.

    Step - 2: Select a subset of test cases, T', from an existing test suite, T that covers

    the software components that are affected by the modification.

    Step - 3: Test modified program P' with T' to establish the correctness of P' withrespect to T'.

    Step - 4: Examine test results to identify failures.

    Step - 5: Identify and correct the fault(s) that caused a failure. Step 6. Update the

    test suite and test history for P'.

  • 8/7/2019 11305_Lect 36(Regression Testing With Its Types)

    12/12

    Selective Regression Testing Techniques

    y Comparison among different Selective Regression Testing Techniques

    y Following four criterions form a framework for evaluation of various selective

    regression testing techniques.

    1) Inclusiveness: It measures the extent to which a technique chooses tests that will

    expose faults caused by program changes.

    2) Precision: It measures the ability of a technique to avoid choosing tests that will

    not reveal the faults caused by the changes.

    3) Efficiency: It measures the computational cost of a technique.

    4) Generality: It measures the ability of a technique to handle different language

    constructs and testing applications.