SlideShare a Scribd company logo
1 of 41
Download to read offline
Specification-based
regression test selection
   with risk analysis
       Zheng-Wen Shen
         2005/03/14
Reference
   Specification-based regression test selection with
    risk analysis
     Yanping Chen, Robert L. Probert, D. Paul Sims
     Source IBM Centre for Advanced Studies
      Conference archive
     Proceedings of the 2002 conference of the Centre
      for Advanced Studies on Collaborative research
      table of contents
Outline
1.   Introduction
2.   Background
3.   Specification-based test case selection
4.   Risk-based test case selection
5.   Evaluation
6.   Conclusions
1. Introduction
   Regression testing is essential to ensure software
    quality.
   Regression test selection attempts to select a
    cost-minimized subset of test cases.
White-box (code-based) V.S. Black-
    box (specification-based)
   Code-based regression test selection is good for
    unit testing, but it has a scalability problem.
   Code-based regression techniques are not
    suitable for testing larger components at more
    abstract level.
   Code-based regression techniques require testers
    to access and understand the code.
   Code-based regression techniques are language-
    dependent.
Two kinds of regression tests
   Targeted Tests, which ensure that important
    current customer features are still supported
    adequately in the new release.
   Safety Tests, which are risk-directed, and ensure
    the potential problem areas are properly handled.
2. Background
   2.1 Regression testing
   2.2 Controlled Regression Testing Assumption
    (CRTA)
   2.3 Risk Analysis
   2.4 Requirement traceability
2.1 Regression testing
   Given a program P, a modified version P’, and a
    set T of test cases used previously to test P,
    regression analysis and testing techniques
    attempt to make use of a subset of T to gain
    sufficient confidence in the correctness of P’
    with respect to behaviors from P retained in P’.
   With selective re-test techniques, we only return
    those test cases that test the affected entities of
    the modified program.
2.2 Controlled Regression Testing
          Assumption (CRTA)
   When P’ is tested with T, we hold all factors that
    might influence the output of P’, except for the
    code in P’, constant with respect to their states
    when we tested P with T.
   Ideally, regression tests should be run while
    CRTA holds.
   Testers must identify and document
    uncontrollable factors and the test cases that are
    potentially affected by them.
2.3 Risk Analysis
   Risk is anything that threatens the successful
    achievement of a project’s goals.
   Using risk metrics to quantitatively measure the
    quality of a test suite.
   Risk Exposure model by Stale Amland.
       RE(f) = P(f) * C(f)
1.   P(f), the probability of a fault being present.
2.   C(f), the cost (consequence or impact) of a
     fault in the corresponding function if it occurs
     in operation.
2.4 Requirement traceability
   Traceability is a simple, common-sense book-
    keeping property that can prevent a wide range
    of problem.
       Know which test case verifies a given requirements
        attribute.
   We use the activity diagram to represent the
    desired system behavior.
The activity diagram and Test suite for the Get_Quote feature
Traceability matrix between the activity diagram and test suite
3. Specification-based test case
                  selection
   3.1 Changes in code
   3.2 Changes in specification
3.1 Changes in code
   Changes only happen in the implementation
    without affecting the specification.
   For a developer, any changes in code should be
    documented in a code change history.
   For a tester, traceability needs to be established
    between the test case and the log of defects.
       Test profile
   The tester can choose test cases using the
    traceability matrix.
3.2 Changes in specification
   Changes happen in requirements or design, the
    activity diagram need to be modified accordingly.
   In a control flow graph (CFG), nodes are used
    to represent statements, and edges represent the
    control flow between the statement within a
    procedure.
   We find that the activity diagram is quite similar
    to the CFG except that the nodes of activity
    diagram describe activities instead of statements.
A CFG-based regression test selection technique
Edge-coverage matrix for test suite T on CFG C
Regression analysis with the activity
              diagram
1.   We traverse the activity diagram to identify
     affected edges.
2.   Then we select test cases that execute the
     affected edges based on the traceability matrix
     to create our Targeted Tests.
4. Risk-based test case selection
   4.1 Motivation for risk-based selection.
   4.2 Model-based selection of Safety Tests.
   4.3 Risk-based end-to-end test scenario selection.
4.1 Motivation for risk-based
                 selection
   If the developer changes code that cannot be
    identified by a test profile, and he does not
    update the code change history, the tester might
    miss some defects.
   To achieve enough confidence, we would like to
    include some test cases in addition to the
    Targeted Tests for our regression test suite.
Useful in two situations
1.   After running the Targeted Tests, if time and
     resources are available, testers may want to
     return some test cases to gain more confidence
     in the modified system.
2.   The time to delivery may be extremely short,
     Safety Tests provide some assurance that the
     remaining defects in the release will not bring
     about serious failures.
4.2 Model-based selection of Safety
                  Tests
    Uses Risk Exposure model for risk analysis.
    There are four main steps in our approach.
    1.   Assess the cost of each test case.
    2.   Derive severity probability for each test case.
    3.   Calculate Risk Exposure for each test case.
    4.   Select Safety Tests.
Step 1. Assess the cost of each test case.

    Cost means the cost of the requirements
     attributes that this test case covers.
    Two kinds of costs will be taken into
     consideration.
    1.   The consequences of a fault as seen by the
         customer, that is, losing market share because of
         faults.
    2.   The consequences of a fault as seen by the
         vendor, that is, high software maintenance cost
         because of faults.
Cost of test cases
Step 2. Derive severity probability for each
                      test case
   How important or serious the defect is.
Step 3. Calculate Risk Exposure for each test
                     case
Step 4. Select Safety Tests

   We choose test cases that have the highest value
    of RE(t) from the non-targeted tests to reach
    our coverage target.
4.3 Risk-based end-to-end test
               scenario selection
   End-to-end scenarios simulate common user
    profiles of system uses. Some are equivalent to
    use cases.
     More customer-directed.
     Highly effective at finding regression faults.
    One end-to-end consists of several test cases.
     Every test case tests one or more requirements
     attributes.
     Selection strategy obeys two rules
    1.   Select scenarios that cover the most critical test
         cases.
    2.   Have the suite of scenarios cover as many test
         case as possible.
Traceability between test cases and scenarios
   Step 1. Calculate Risk Exposure for each
    scenario
   Step 2. Select scenario that has the highest RE(s)
   Step 3. Update table and rebuild table.
   Step 4. Repeat Step 2 and Step 3 until we run
    out of time and resources.
Step 1. Calculate Risk Exposure for
               each scenario
   RE (s) = ΣRE (t)i , {1 ≤ i ≤ n | test case i is
    covered by this scenario}
Step 2. Select scenario that has the
               highest RE(s)
   The scenario with the highest RE(s) covers the
    most critical test cases, that is, has the highest
    coverage of test cases.
   According to our selection rules, it should be
    included in the regression test suite.
   For example: s001 is put first into the regression
    test suite.
Step 3. Update table and rebuild
             table.
Rebuilt table of Risk Exposure for
             scenarios
Step 4. Repeat Step 2 and Step 3 until
  we run out of time and resources
   The size of our test suite of scenarios is
    dependent on the time and resources available.
   Regression testing is terminated whenever we
    run out of time and resources.
   The final selected regression test suite is the
    union of the Targeted Tests and the Safety Tests.
5. Evaluation
   We applied our approach to three components
    of IBM WebSphere Commerce 5.4. Each
    component was owned by one experienced
    tester. (306 test cases)
   65 defects were opened in the first pass.
   There were 9 defects found, which failed 28
    test cases in the second pass.
Three assessment factors
1.   Effectiveness
2.   Cost-efficiency
3.   Sensitivity to Risk
6. Conclusions
   This technique is Customer-oriented and also Risk-
    based.
   It provides methods to obtain both Targted Tests
    and Safety Tests.
   Future work
     To decide when to stop regression testing.
     Implementing our approach in a production test
      environment.

More Related Content

What's hot

SOFTWARE QUALITY ASSURANCE AND TESTING - SHORT NOTES
SOFTWARE QUALITY ASSURANCE AND TESTING - SHORT NOTESSOFTWARE QUALITY ASSURANCE AND TESTING - SHORT NOTES
SOFTWARE QUALITY ASSURANCE AND TESTING - SHORT NOTESsuthi
 
Configuration Navigation Analysis Model for Regression Test Case Prioritization
Configuration Navigation Analysis Model for Regression Test Case PrioritizationConfiguration Navigation Analysis Model for Regression Test Case Prioritization
Configuration Navigation Analysis Model for Regression Test Case Prioritizationijsrd.com
 
A survey of fault prediction using machine learning algorithms
A survey of fault prediction using machine learning algorithmsA survey of fault prediction using machine learning algorithms
A survey of fault prediction using machine learning algorithmsAhmed Magdy Ezzeldin, MSc.
 
52 - The Impact of Test Ownership and Team Structure on the Reliability and E...
52 - The Impact of Test Ownership and Team Structure on the Reliability and E...52 - The Impact of Test Ownership and Team Structure on the Reliability and E...
52 - The Impact of Test Ownership and Team Structure on the Reliability and E...ESEM 2014
 
ISTQB Advanced Study Guide - 7
ISTQB Advanced Study Guide - 7ISTQB Advanced Study Guide - 7
ISTQB Advanced Study Guide - 7Yogindernath Gupta
 
H047054064
H047054064H047054064
H047054064inventy
 
Parameter Estimation of Software Reliability Growth Models Using Simulated An...
Parameter Estimation of Software Reliability Growth Models Using Simulated An...Parameter Estimation of Software Reliability Growth Models Using Simulated An...
Parameter Estimation of Software Reliability Growth Models Using Simulated An...Editor IJCATR
 
Combining genetic algoriths and constraint programming to support stress test...
Combining genetic algoriths and constraint programming to support stress test...Combining genetic algoriths and constraint programming to support stress test...
Combining genetic algoriths and constraint programming to support stress test...Lionel Briand
 
Model based test case prioritization using neural network classification
Model based test case prioritization using neural network classificationModel based test case prioritization using neural network classification
Model based test case prioritization using neural network classificationcseij
 
Test Planning and Test Estimation Techniques
Test Planning and Test Estimation TechniquesTest Planning and Test Estimation Techniques
Test Planning and Test Estimation TechniquesMurageppa-QA
 
Finding latent code errors via machine learning over program ...
Finding latent code errors via machine learning over program ...Finding latent code errors via machine learning over program ...
Finding latent code errors via machine learning over program ...butest
 

What's hot (18)

SOFTWARE QUALITY ASSURANCE AND TESTING - SHORT NOTES
SOFTWARE QUALITY ASSURANCE AND TESTING - SHORT NOTESSOFTWARE QUALITY ASSURANCE AND TESTING - SHORT NOTES
SOFTWARE QUALITY ASSURANCE AND TESTING - SHORT NOTES
 
Configuration Navigation Analysis Model for Regression Test Case Prioritization
Configuration Navigation Analysis Model for Regression Test Case PrioritizationConfiguration Navigation Analysis Model for Regression Test Case Prioritization
Configuration Navigation Analysis Model for Regression Test Case Prioritization
 
CTFL Module 04
CTFL Module 04CTFL Module 04
CTFL Module 04
 
A survey of fault prediction using machine learning algorithms
A survey of fault prediction using machine learning algorithmsA survey of fault prediction using machine learning algorithms
A survey of fault prediction using machine learning algorithms
 
CTFL Module 02
CTFL Module 02CTFL Module 02
CTFL Module 02
 
CTFL Module 03
CTFL Module 03CTFL Module 03
CTFL Module 03
 
52 - The Impact of Test Ownership and Team Structure on the Reliability and E...
52 - The Impact of Test Ownership and Team Structure on the Reliability and E...52 - The Impact of Test Ownership and Team Structure on the Reliability and E...
52 - The Impact of Test Ownership and Team Structure on the Reliability and E...
 
ISTQB Advanced Study Guide - 7
ISTQB Advanced Study Guide - 7ISTQB Advanced Study Guide - 7
ISTQB Advanced Study Guide - 7
 
CTFL Module 01
CTFL Module 01CTFL Module 01
CTFL Module 01
 
H047054064
H047054064H047054064
H047054064
 
Parameter Estimation of Software Reliability Growth Models Using Simulated An...
Parameter Estimation of Software Reliability Growth Models Using Simulated An...Parameter Estimation of Software Reliability Growth Models Using Simulated An...
Parameter Estimation of Software Reliability Growth Models Using Simulated An...
 
Audit
AuditAudit
Audit
 
Combining genetic algoriths and constraint programming to support stress test...
Combining genetic algoriths and constraint programming to support stress test...Combining genetic algoriths and constraint programming to support stress test...
Combining genetic algoriths and constraint programming to support stress test...
 
Model based test case prioritization using neural network classification
Model based test case prioritization using neural network classificationModel based test case prioritization using neural network classification
Model based test case prioritization using neural network classification
 
Test Planning and Test Estimation Techniques
Test Planning and Test Estimation TechniquesTest Planning and Test Estimation Techniques
Test Planning and Test Estimation Techniques
 
Istqb ctfl syll 2011
Istqb ctfl syll 2011Istqb ctfl syll 2011
Istqb ctfl syll 2011
 
Finding latent code errors via machine learning over program ...
Finding latent code errors via machine learning over program ...Finding latent code errors via machine learning over program ...
Finding latent code errors via machine learning over program ...
 
Debug me
Debug meDebug me
Debug me
 

Similar to 20050314 specification based regression test selection with risk analysis

TEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TEST
TEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TESTTEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TEST
TEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TESTijfcstjournal
 
TEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TEST
TEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TESTTEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TEST
TEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TESTijfcstjournal
 
TEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TEST
TEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TESTTEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TEST
TEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TESTijfcstjournal
 
Test design techniques: Structured and Experienced-based techniques
Test design techniques: Structured and Experienced-based techniquesTest design techniques: Structured and Experienced-based techniques
Test design techniques: Structured and Experienced-based techniquesKhuong Nguyen
 
Orthogonal array approach a case study
Orthogonal array approach   a case studyOrthogonal array approach   a case study
Orthogonal array approach a case studyKarthikeyan Rajendran
 
Software testing for biginners
Software testing for biginnersSoftware testing for biginners
Software testing for biginnersSriman Eshwar
 
Test case prioritization usinf regression testing.pptx
Test case prioritization usinf regression testing.pptxTest case prioritization usinf regression testing.pptx
Test case prioritization usinf regression testing.pptxmaheshwari581940
 
Software testing introduction
Software testing introductionSoftware testing introduction
Software testing introductionSriman Eshwar
 
Product Quality: Metrics, Verification, Validation, Testing
Product Quality: Metrics, Verification, Validation, TestingProduct Quality: Metrics, Verification, Validation, Testing
Product Quality: Metrics, Verification, Validation, TestingReem Alattas
 
R!!! ria-gui-test plan 1.0
R!!! ria-gui-test plan 1.0R!!! ria-gui-test plan 1.0
R!!! ria-gui-test plan 1.0hanumanthunembi
 
Role+Of+Testing+In+Sdlc
Role+Of+Testing+In+SdlcRole+Of+Testing+In+Sdlc
Role+Of+Testing+In+Sdlcmahendra singh
 
ScioTalks | Coverage Based Testing
ScioTalks | Coverage Based TestingScioTalks | Coverage Based Testing
ScioTalks | Coverage Based TestingScio Consulting
 
types of testing with descriptions and examples
types of testing with descriptions and examplestypes of testing with descriptions and examples
types of testing with descriptions and examplesMani Deepak Choudhry
 
ISTQB, ISEB Lecture Notes
ISTQB, ISEB Lecture NotesISTQB, ISEB Lecture Notes
ISTQB, ISEB Lecture Notesonsoftwaretest
 

Similar to 20050314 specification based regression test selection with risk analysis (20)

Testing
TestingTesting
Testing
 
TEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TEST
TEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TESTTEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TEST
TEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TEST
 
TEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TEST
TEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TESTTEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TEST
TEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TEST
 
TEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TEST
TEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TESTTEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TEST
TEST CASE PRIORITIZATION FOR OPTIMIZING A REGRESSION TEST
 
Test design techniques: Structured and Experienced-based techniques
Test design techniques: Structured and Experienced-based techniquesTest design techniques: Structured and Experienced-based techniques
Test design techniques: Structured and Experienced-based techniques
 
Orthogonal array approach a case study
Orthogonal array approach   a case studyOrthogonal array approach   a case study
Orthogonal array approach a case study
 
Software testing for biginners
Software testing for biginnersSoftware testing for biginners
Software testing for biginners
 
Block 1 ms-034 unit-1
Block 1 ms-034 unit-1Block 1 ms-034 unit-1
Block 1 ms-034 unit-1
 
Testing
TestingTesting
Testing
 
Test case prioritization usinf regression testing.pptx
Test case prioritization usinf regression testing.pptxTest case prioritization usinf regression testing.pptx
Test case prioritization usinf regression testing.pptx
 
Software testing introduction
Software testing introductionSoftware testing introduction
Software testing introduction
 
Product Quality: Metrics, Verification, Validation, Testing
Product Quality: Metrics, Verification, Validation, TestingProduct Quality: Metrics, Verification, Validation, Testing
Product Quality: Metrics, Verification, Validation, Testing
 
software testing
software testingsoftware testing
software testing
 
R!!! ria-gui-test plan 1.0
R!!! ria-gui-test plan 1.0R!!! ria-gui-test plan 1.0
R!!! ria-gui-test plan 1.0
 
Role+Of+Testing+In+Sdlc
Role+Of+Testing+In+SdlcRole+Of+Testing+In+Sdlc
Role+Of+Testing+In+Sdlc
 
ScioTalks | Coverage Based Testing
ScioTalks | Coverage Based TestingScioTalks | Coverage Based Testing
ScioTalks | Coverage Based Testing
 
types of testing with descriptions and examples
types of testing with descriptions and examplestypes of testing with descriptions and examples
types of testing with descriptions and examples
 
SWE-6 TESTING.pptx
SWE-6 TESTING.pptxSWE-6 TESTING.pptx
SWE-6 TESTING.pptx
 
Testing
TestingTesting
Testing
 
ISTQB, ISEB Lecture Notes
ISTQB, ISEB Lecture NotesISTQB, ISEB Lecture Notes
ISTQB, ISEB Lecture Notes
 

More from Will Shen

20180717 Introduction of Seamless BLE Connection Migration System (SeamBlue)
20180717 Introduction of Seamless BLE Connection Migration System (SeamBlue)20180717 Introduction of Seamless BLE Connection Migration System (SeamBlue)
20180717 Introduction of Seamless BLE Connection Migration System (SeamBlue)Will Shen
 
16格筆記讀書法
16格筆記讀書法16格筆記讀書法
16格筆記讀書法Will Shen
 
Bade Smells in Code
Bade Smells in CodeBade Smells in Code
Bade Smells in CodeWill Shen
 
Intro To BOOST.Spirit
Intro To BOOST.SpiritIntro To BOOST.Spirit
Intro To BOOST.SpiritWill Shen
 
20070514 introduction to test ng and its application for test driven gui deve...
20070514 introduction to test ng and its application for test driven gui deve...20070514 introduction to test ng and its application for test driven gui deve...
20070514 introduction to test ng and its application for test driven gui deve...Will Shen
 
20060411 face recognition using face arg matching
20060411 face recognition using face arg matching20060411 face recognition using face arg matching
20060411 face recognition using face arg matchingWill Shen
 
20060411 Analytic Hierarchy Process (AHP)
20060411 Analytic Hierarchy Process (AHP)20060411 Analytic Hierarchy Process (AHP)
20060411 Analytic Hierarchy Process (AHP)Will Shen
 
20050713 critical paths for gui regression testing
20050713 critical paths for gui regression testing20050713 critical paths for gui regression testing
20050713 critical paths for gui regression testingWill Shen
 
20041113 A Test Generation Tool for Specifications in the Form of State Machine
20041113 A Test Generation Tool for Specifications in the Form of State Machine20041113 A Test Generation Tool for Specifications in the Form of State Machine
20041113 A Test Generation Tool for Specifications in the Form of State MachineWill Shen
 
Junit Recipes - Elementary tests (2/2)
Junit Recipes - Elementary tests (2/2)Junit Recipes - Elementary tests (2/2)
Junit Recipes - Elementary tests (2/2)Will Shen
 
Junit Recipes - Elementary tests (1/2)
Junit Recipes  - Elementary tests (1/2)Junit Recipes  - Elementary tests (1/2)
Junit Recipes - Elementary tests (1/2)Will Shen
 
Junit Recipes - Intro
Junit Recipes - IntroJunit Recipes - Intro
Junit Recipes - IntroWill Shen
 
20051019 automating regression testing for evolving gui software
20051019 automating regression testing for evolving gui software20051019 automating regression testing for evolving gui software
20051019 automating regression testing for evolving gui softwareWill Shen
 
20060712 automated model based testing of community-driven open-source gui ap...
20060712 automated model based testing of community-driven open-source gui ap...20060712 automated model based testing of community-driven open-source gui ap...
20060712 automated model based testing of community-driven open-source gui ap...Will Shen
 
20041221 gui testing survey
20041221 gui testing survey20041221 gui testing survey
20041221 gui testing surveyWill Shen
 
20060927 application facades
20060927 application facades20060927 application facades
20060927 application facadesWill Shen
 
20111018 boost and gtest
20111018 boost and gtest20111018 boost and gtest
20111018 boost and gtestWill Shen
 
Data collection for field studies
Data collection for field studiesData collection for field studies
Data collection for field studiesWill Shen
 

More from Will Shen (18)

20180717 Introduction of Seamless BLE Connection Migration System (SeamBlue)
20180717 Introduction of Seamless BLE Connection Migration System (SeamBlue)20180717 Introduction of Seamless BLE Connection Migration System (SeamBlue)
20180717 Introduction of Seamless BLE Connection Migration System (SeamBlue)
 
16格筆記讀書法
16格筆記讀書法16格筆記讀書法
16格筆記讀書法
 
Bade Smells in Code
Bade Smells in CodeBade Smells in Code
Bade Smells in Code
 
Intro To BOOST.Spirit
Intro To BOOST.SpiritIntro To BOOST.Spirit
Intro To BOOST.Spirit
 
20070514 introduction to test ng and its application for test driven gui deve...
20070514 introduction to test ng and its application for test driven gui deve...20070514 introduction to test ng and its application for test driven gui deve...
20070514 introduction to test ng and its application for test driven gui deve...
 
20060411 face recognition using face arg matching
20060411 face recognition using face arg matching20060411 face recognition using face arg matching
20060411 face recognition using face arg matching
 
20060411 Analytic Hierarchy Process (AHP)
20060411 Analytic Hierarchy Process (AHP)20060411 Analytic Hierarchy Process (AHP)
20060411 Analytic Hierarchy Process (AHP)
 
20050713 critical paths for gui regression testing
20050713 critical paths for gui regression testing20050713 critical paths for gui regression testing
20050713 critical paths for gui regression testing
 
20041113 A Test Generation Tool for Specifications in the Form of State Machine
20041113 A Test Generation Tool for Specifications in the Form of State Machine20041113 A Test Generation Tool for Specifications in the Form of State Machine
20041113 A Test Generation Tool for Specifications in the Form of State Machine
 
Junit Recipes - Elementary tests (2/2)
Junit Recipes - Elementary tests (2/2)Junit Recipes - Elementary tests (2/2)
Junit Recipes - Elementary tests (2/2)
 
Junit Recipes - Elementary tests (1/2)
Junit Recipes  - Elementary tests (1/2)Junit Recipes  - Elementary tests (1/2)
Junit Recipes - Elementary tests (1/2)
 
Junit Recipes - Intro
Junit Recipes - IntroJunit Recipes - Intro
Junit Recipes - Intro
 
20051019 automating regression testing for evolving gui software
20051019 automating regression testing for evolving gui software20051019 automating regression testing for evolving gui software
20051019 automating regression testing for evolving gui software
 
20060712 automated model based testing of community-driven open-source gui ap...
20060712 automated model based testing of community-driven open-source gui ap...20060712 automated model based testing of community-driven open-source gui ap...
20060712 automated model based testing of community-driven open-source gui ap...
 
20041221 gui testing survey
20041221 gui testing survey20041221 gui testing survey
20041221 gui testing survey
 
20060927 application facades
20060927 application facades20060927 application facades
20060927 application facades
 
20111018 boost and gtest
20111018 boost and gtest20111018 boost and gtest
20111018 boost and gtest
 
Data collection for field studies
Data collection for field studiesData collection for field studies
Data collection for field studies
 

Recently uploaded

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 

20050314 specification based regression test selection with risk analysis

  • 1. Specification-based regression test selection with risk analysis Zheng-Wen Shen 2005/03/14
  • 2. Reference  Specification-based regression test selection with risk analysis  Yanping Chen, Robert L. Probert, D. Paul Sims  Source IBM Centre for Advanced Studies Conference archive  Proceedings of the 2002 conference of the Centre for Advanced Studies on Collaborative research table of contents
  • 3. Outline 1. Introduction 2. Background 3. Specification-based test case selection 4. Risk-based test case selection 5. Evaluation 6. Conclusions
  • 4. 1. Introduction  Regression testing is essential to ensure software quality.  Regression test selection attempts to select a cost-minimized subset of test cases.
  • 5. White-box (code-based) V.S. Black- box (specification-based)  Code-based regression test selection is good for unit testing, but it has a scalability problem.  Code-based regression techniques are not suitable for testing larger components at more abstract level.  Code-based regression techniques require testers to access and understand the code.  Code-based regression techniques are language- dependent.
  • 6. Two kinds of regression tests  Targeted Tests, which ensure that important current customer features are still supported adequately in the new release.  Safety Tests, which are risk-directed, and ensure the potential problem areas are properly handled.
  • 7. 2. Background  2.1 Regression testing  2.2 Controlled Regression Testing Assumption (CRTA)  2.3 Risk Analysis  2.4 Requirement traceability
  • 8. 2.1 Regression testing  Given a program P, a modified version P’, and a set T of test cases used previously to test P, regression analysis and testing techniques attempt to make use of a subset of T to gain sufficient confidence in the correctness of P’ with respect to behaviors from P retained in P’.  With selective re-test techniques, we only return those test cases that test the affected entities of the modified program.
  • 9. 2.2 Controlled Regression Testing Assumption (CRTA)  When P’ is tested with T, we hold all factors that might influence the output of P’, except for the code in P’, constant with respect to their states when we tested P with T.  Ideally, regression tests should be run while CRTA holds.  Testers must identify and document uncontrollable factors and the test cases that are potentially affected by them.
  • 10. 2.3 Risk Analysis  Risk is anything that threatens the successful achievement of a project’s goals.  Using risk metrics to quantitatively measure the quality of a test suite.  Risk Exposure model by Stale Amland.  RE(f) = P(f) * C(f)
  • 11. 1. P(f), the probability of a fault being present. 2. C(f), the cost (consequence or impact) of a fault in the corresponding function if it occurs in operation.
  • 12. 2.4 Requirement traceability  Traceability is a simple, common-sense book- keeping property that can prevent a wide range of problem.  Know which test case verifies a given requirements attribute.  We use the activity diagram to represent the desired system behavior.
  • 13. The activity diagram and Test suite for the Get_Quote feature
  • 14. Traceability matrix between the activity diagram and test suite
  • 15. 3. Specification-based test case selection  3.1 Changes in code  3.2 Changes in specification
  • 16. 3.1 Changes in code  Changes only happen in the implementation without affecting the specification.  For a developer, any changes in code should be documented in a code change history.  For a tester, traceability needs to be established between the test case and the log of defects.  Test profile  The tester can choose test cases using the traceability matrix.
  • 17. 3.2 Changes in specification  Changes happen in requirements or design, the activity diagram need to be modified accordingly.  In a control flow graph (CFG), nodes are used to represent statements, and edges represent the control flow between the statement within a procedure.  We find that the activity diagram is quite similar to the CFG except that the nodes of activity diagram describe activities instead of statements.
  • 18. A CFG-based regression test selection technique
  • 19. Edge-coverage matrix for test suite T on CFG C
  • 20. Regression analysis with the activity diagram 1. We traverse the activity diagram to identify affected edges. 2. Then we select test cases that execute the affected edges based on the traceability matrix to create our Targeted Tests.
  • 21. 4. Risk-based test case selection  4.1 Motivation for risk-based selection.  4.2 Model-based selection of Safety Tests.  4.3 Risk-based end-to-end test scenario selection.
  • 22. 4.1 Motivation for risk-based selection  If the developer changes code that cannot be identified by a test profile, and he does not update the code change history, the tester might miss some defects.  To achieve enough confidence, we would like to include some test cases in addition to the Targeted Tests for our regression test suite.
  • 23. Useful in two situations 1. After running the Targeted Tests, if time and resources are available, testers may want to return some test cases to gain more confidence in the modified system. 2. The time to delivery may be extremely short, Safety Tests provide some assurance that the remaining defects in the release will not bring about serious failures.
  • 24. 4.2 Model-based selection of Safety Tests  Uses Risk Exposure model for risk analysis.  There are four main steps in our approach. 1. Assess the cost of each test case. 2. Derive severity probability for each test case. 3. Calculate Risk Exposure for each test case. 4. Select Safety Tests.
  • 25. Step 1. Assess the cost of each test case.  Cost means the cost of the requirements attributes that this test case covers.  Two kinds of costs will be taken into consideration. 1. The consequences of a fault as seen by the customer, that is, losing market share because of faults. 2. The consequences of a fault as seen by the vendor, that is, high software maintenance cost because of faults.
  • 26. Cost of test cases
  • 27. Step 2. Derive severity probability for each test case  How important or serious the defect is.
  • 28. Step 3. Calculate Risk Exposure for each test case
  • 29. Step 4. Select Safety Tests  We choose test cases that have the highest value of RE(t) from the non-targeted tests to reach our coverage target.
  • 30. 4.3 Risk-based end-to-end test scenario selection  End-to-end scenarios simulate common user profiles of system uses. Some are equivalent to use cases.  More customer-directed.  Highly effective at finding regression faults.
  • 31. One end-to-end consists of several test cases. Every test case tests one or more requirements attributes.  Selection strategy obeys two rules 1. Select scenarios that cover the most critical test cases. 2. Have the suite of scenarios cover as many test case as possible.
  • 32. Traceability between test cases and scenarios
  • 33. Step 1. Calculate Risk Exposure for each scenario  Step 2. Select scenario that has the highest RE(s)  Step 3. Update table and rebuild table.  Step 4. Repeat Step 2 and Step 3 until we run out of time and resources.
  • 34. Step 1. Calculate Risk Exposure for each scenario  RE (s) = ΣRE (t)i , {1 ≤ i ≤ n | test case i is covered by this scenario}
  • 35. Step 2. Select scenario that has the highest RE(s)  The scenario with the highest RE(s) covers the most critical test cases, that is, has the highest coverage of test cases.  According to our selection rules, it should be included in the regression test suite.  For example: s001 is put first into the regression test suite.
  • 36. Step 3. Update table and rebuild table.
  • 37. Rebuilt table of Risk Exposure for scenarios
  • 38. Step 4. Repeat Step 2 and Step 3 until we run out of time and resources  The size of our test suite of scenarios is dependent on the time and resources available.  Regression testing is terminated whenever we run out of time and resources.  The final selected regression test suite is the union of the Targeted Tests and the Safety Tests.
  • 39. 5. Evaluation  We applied our approach to three components of IBM WebSphere Commerce 5.4. Each component was owned by one experienced tester. (306 test cases)  65 defects were opened in the first pass.  There were 9 defects found, which failed 28 test cases in the second pass.
  • 40. Three assessment factors 1. Effectiveness 2. Cost-efficiency 3. Sensitivity to Risk
  • 41. 6. Conclusions  This technique is Customer-oriented and also Risk- based.  It provides methods to obtain both Targted Tests and Safety Tests.  Future work  To decide when to stop regression testing.  Implementing our approach in a production test environment.