Acceptance Test Optimization Optimization Mohamed Mussa, Ferhat - - PowerPoint PPT Presentation

acceptance test optimization optimization
SMART_READER_LITE
LIVE PREVIEW

Acceptance Test Optimization Optimization Mohamed Mussa, Ferhat - - PowerPoint PPT Presentation

Acceptance Test Optimization Optimization Mohamed Mussa, Ferhat Khendek SAM2014 Outline Outline Background Problem Statement Overall Approach Integration test cases selection Integration test cases selection


slide-1
SLIDE 1

Acceptance Test Optimization Optimization

Mohamed Mussa, Ferhat Khendek

SAM’2014

slide-2
SLIDE 2

Outline Outline

  • Background
  • Problem Statement
  • Overall Approach

– Integration test cases selection – Integration test cases selection – Comparing test models

  • Conclusion

2

slide-3
SLIDE 3

Background

Test process consists of several phases

Unit Integration Acceptance

  • Unit

Testing Integration Testing Acceptance Testing Test Test Model Model Test Test Model Model Test Test Models Models Test Test Model Model Test Test Model Model Test Test Models Models Test Test Model Model

slide-4
SLIDE 4

Background - Model Based Testing

Model CODE

Development Process Development Process

  • Test Model

CODE

Testing Process Testing Process

Test Test Execution Execution

slide-5
SLIDE 5

Background - Model Based Testing

  • Different approaches for different test phases

– Unit, integration, acceptance

  • Different notations/languages

– Different subsets of the same language – Different subsets of the same language

  • Many test models are produced during different phases

– Redundancy – Test generation/planning: no reusability – Test Execution: no optimization

5

slide-6
SLIDE 6
  • Goals

– Provide a systematic transition between the test phases

  • Framework

Background - Model Based Test Framework

Framework

– Strengthen the collaboration between the development and the testing teams – Well know standards & reuse – Improve the test process

  • Enable reusability & optimization
slide-7
SLIDE 7

Background - Model Based Test Framework

Unit Unit Integration Integration Acceptance Acceptance

Unit test modelcn Integration test modelint(n-1)

  • Unit test

modelc1 Integration test modelint1

Optimized acceptance test model Acceptance test model

slide-8
SLIDE 8
  • Test cases may be exercised several times across the

testing phases

– Integration vs. Acceptance

  • Goal: remove redundant acceptance test cases

Reduce test execution time

Problem Statement

– Reduce test execution time

slide-9
SLIDE 9
  • Obvious solution

– Compare integration test cases and acceptance test cases

  • Problem

– Some integration test cases may include stubs for subsequent system components

Problem Statement

system components – Cannot be substituted to acceptance test cases

  • Comp1

Comp2 SbSys1 Comp3 Test Test Model Model1

1

SbSys2 Comp4 Test Test Model Model2

2

SbSysn-1 Compn Test Test Model Modeln

n-

  • 1

1

System Test Test Model Modeln

n

slide-10
SLIDE 10
  • Integration test cases selection
  • Compare integration test cases to

Overall Approach

  • Compare integration test cases to

acceptance test cases

10

slide-11
SLIDE 11
  • Test cases of last integration round are applied on complete

system

  • Compare the behavior of test stubs of each test case to the

behavior of CUTs of test cases of subsequent integration rounds

  • No additional information beside the test models

Integration test cases selection

  • No additional information beside the test models
  • Comp1

Comp2 SbSys1 Comp3 Test Test Model Model1

1

SbSys2 Comp4 Test Test Model Model2

2

SbSysn-1 Compn Test Test Model Modeln

n-

  • 1

1

System Test Test Model Modeln

n

slide-12
SLIDE 12

Test stubs can be specified explicitly, or

Integration test cases selection

«TestContext» TCk «SUT» SbSysk «SUT» CUTk+1 m1 m2 m3 m4 m5 m6 «TestComponent» stubk

12

specified implicitly

«TestContext» TCk «SUT» SbSysk «SUT» CUTk+1 m1 m2 m3 m4 m5 m6 m5 m6

slide-13
SLIDE 13
  • Event based comparison
  • Not instance based comparison

– Instances are different

Integration test cases selection

  • Not event name based

– but message – event types: message, time, miscellaneous

13

slide-14
SLIDE 14

Selection condition

– Let

  • Tk = {Ik, Ek, Rk} be an integration test case at integration round k,
  • Ti = {Ii, Ei, Ri} be an integration test case at integration round i,

Integration test cases selection

i i i i

  • i > k

– Tk does not use a test stub for the CUT of Ti if and only if

14

( ) ( ) ( ) ( ) ( ).

. . | , , SUT st

  • wner

e e e e e E e E e e e

i k i k i k k i i k i

≠ ∧ = ∨ ≠ ∈ ∈ ⋅ ∀

slide-15
SLIDE 15

Comparing integration test cases

Integration test cases selection

«TestContext» TCm «SUT» SbSysm «SUT» CUTm+1

Round k+1 Subsequent rounds

  • «TestContext»

TCk «SUT» SbSysk «SUT» CUTk+1 m1 m2 m3 m4 m5 m6 TCm SbSysm CUTm+1 s1 s2 s3 s4 «TestContext» TCn «SUT» SbSysn «SUT» CUTn+1 m1 m3 m4 m6

slide-16
SLIDE 16

Test cases, which their stubs do not match with subsequent CUTs, are

Integration test cases selection

match with subsequent CUTs, are compared to acceptance test cases

16

slide-17
SLIDE 17

Comparing Test Models Comparing Test Models

  • A lot of work has been done

– Compared models are evolved from the same source – Two-Way vs. Three-Way – Look up for differences (Add/Delete/Modify) – Look up for differences (Add/Delete/Modify) – Structure vs. Behavior

  • Our case

– Models did not necessary evolve from the same source

17

slide-18
SLIDE 18

Comparing Test Models Comparing Test Models

  • Comparing MSCs or Sequence Diagrams is not

straightforward

– Several researchers have tackled this issue

  • But this is not difficult for test cases

– Finite behaviors – Finite behaviors

18

slide-19
SLIDE 19

Comparing Test Models Comparing Test Models

  • A test case T is a tuple (I, E, R), where

– I : a set of instances – E : a set of events – R ⊆ (E x E): a partial order reflecting the transitive closure

  • f the order relation between events on the same axis and

the sending and reception events of the same message the sending and reception events of the same message

  • Test case inclusion

– Tacc = {Ia, Ea, Ra} and Tint = {Ii, Ei, Ri} – Tacc is included in Tint iff

  • Ea ⊆ Ei
  • Ra ⊆ Ri

19

slide-20
SLIDE 20

Comparing Test Models Comparing Test Models

Comparing test cases

«TestContext» TCm «SUT» SbSysm «SUT» CUTm+1

Acceptance test case Integration test cases

  • «TestContext»

TCa «SUT» Sys m1 m6 TCm SbSysm CUTm+1 s1 s2 s3 s4 «TestContext» TCn «SUT» SbSysn «SUT» CUTn+1 m1 m3 m4 m6

slide-21
SLIDE 21

Conclusion

  • We proposed an optimization approach that

reduces the acceptance test suite length

– already done at integration phase

  • Implemented and completed the framework
  • Implemented and completed the framework
  • What kind of systems would benefit ?
  • Requires evaluation of the gain

21