Docsity

Scenario-Based Regression Testing: Identifying Affected Scenarios and Artifacts - Prof. We, Study notes of Computer Science

Toggle sidebar
bg1
1
1/12/2002 1
Scenario-Based Functional Regression Testing
Wei-Tek Tsai
Department of Computer Science and
Engineering
Arizona State University
Tempe, AZ 85287
1/12/2002 2
Outline
•Motivation and Background
•Test Scenario Model
–Scenario Template Definition
–Scenario Dependency Analysis
–Scenario Traceability Analysis
•Scenario-Based Regression Testing
–Scenario Slicing
–Scenario-Based Ripple Effect Analysis
–Regression Test Selection Strategies
•Conclusion
pf3
pf4
pf5
pf8

Partial preview of the text

Download Scenario-Based Regression Testing: Identifying Affected Scenarios and Artifacts - Prof. We and more Study notes Computer Science in PDF only on Docsity!

Scenario-Based Functional Regression Testing

Wei-Tek Tsai

Department of Computer Science and

Engineering

Arizona State University

Tempe, AZ 85287

Outline

• Motivation and Background

• Test Scenario Model

– Scenario Template Definition

– Scenario Dependency Analysis

– Scenario Traceability Analysis

• Scenario-Based Regression Testing

– Scenario Slicing

– Scenario-Based Ripple Effect Analysis

– Regression Test Selection Strategies

• Conclusion

Software Regression Testing

• Regression testing is important and popular

– Changes are inevitable.

– Changes may propagate and introduce bugs.

– Regression testing is a process of revalidating and rerunning

existing test cases on the modified systems.

– Regression testing is an effective technique to ensure the integrity

and correctness of the modified systems.

• Two strategies

– Retest everything

– Conduct selected regression testing

  • Key issue: regression test selection
  • Traditional approach: code-based

E2E Testing

• Functional testing on large integrated systems

from the end users’ point of view.

• Based on the specifications of system usage

scenarios.

• E2E regression testing uses the selective approach.

– The number of test cases is huge and the change

impacts may be wide, while the resources available are

limited.

– Exhaustive testing is impossible.

• E2E regression test selection is based on the

scenario specifications.

Scenario Dependency Analysis

• Functional dependence

– Scenarios may verify the common system requirement.

• Input dependence

– Scenarios may be affected by common input data or

actions.

• Output dependence

– Scenarios may produce the common deliverables.

• Input/Output dependence

– The inputs of one scenario may depend on the outputs

of the other.

Scenario Dependency Analysis

• Persistent data dependence

– Scenarios may input, output, and/or input/output related

each other via sharing common persistent data storage.

• Execution dependence

– Scenarios may cover the common software elements.

• Condition dependence

– Pre-condition dependence: Scenarios may affected the

same situation.

– Post-condition dependence: Scenarios may result in the

same situation.

Scenario Traceability Analysis

  • A thin thread is traced to

other software artifacts

including requirements,

software design,

implementation, and test

cases.

  • A requirement can generate

multiple thin threads.

  • A thin thread can generate

multiple test cases.

  • A thin thread can cover

multiple software

components, such as

subsystems and interfaces.

Requirement

Thin Thread

Trace

Subsystem

Interface

Data

Has

Has

Trace

Trace

Trace

Trace

Test Case

m

n

m

m

m

m

n

n

m

m

Implementations

S2. Failed withdraw transaction due to invalid user password

S1. Successful Withdraw Transaction

S3. Failed withdraw transaction due to insufficient credits

S4. Failed withdraw transaction due to too-long network delay

S5. Failed withdraw transaction due to database server shut down

Test Scenario Input Dependent

ID: S

Input: {AcntNum, Pswd, Credit}

ID: S

Input: {AcntNum, Pswd, Credit}

ID: S

Input: {AcntNum, Pswd, Credit}

ID: S

Input: {AcntNum, Pswd, Credit}

ID: S

Input: {AcntNum, Pswd, Credit}

An example of input dependence

Ripple Effect Analysis

• Characterization of the generic ripple effect analysis

  • An iterative process of slicing, tracing, and validating
  • Keep the consistence among all software artifacts, including requirements,

design, and tests.

Change Request

Map changes to Thin threads

Trace to affected comps. for each thin thread

Validate the affected software components

Validate the affected thin threads and test cases

Identify affected thin threads by Slicing with perferred criteria

More thin threads?

Yes

No

Prepare for test exectuion

c

c

Change Request

Affected software component

Unaffected software component

Affected thin thread

Unaffected thin thread

Affected test cases

Unaffected test cases

Change propagation between thin thread

Trace thin thread to software component Trace thin thread to test case

tc

tc

Change Request (^) Map change request to thin thread

An example of E2E regression test selection

Other Regression Test Selection

Strategies

• Risk-based strategy

  • select a subset of high risk test cases.

• Statistical strategy

  • select a sufficient large sample set of test cases based on certain statistical

model.

• Random strategy

  • select a random set of test cases.

• Time-wise strategy

  • Use different test selection strategies for regression testing at different

stages (e.g. module or integration testing) or with different frequencies

(e.g. daily regression, monthly regression, and milestone regression).

• Goal-driven strategy

  • Use different test selection strategies for regression testing with different

purposes, such as security testing, performance testing, and load-balance

testing.

Conclusion

• A technique for functional regression testing based

on test scenario specifications.

• By dependency analysis, one can identify the

affected test scenarios as candidates for re-

exercise.

• By traceability analysis, one can identify other

affected software artifacts.

• The REA process ensures the consistence of

requirements, design, and tests.