Graph Theory Techniques in Model-Based Testing

Harry Robinson Semantic Platform Test Group Microsoft

Graphs and testing go well together Hmm … if I am here and I do this I should end up there

here

this

there

Executing a test can be viewed as traversing a state graph ...

1

Königsberg, 1736 ?

Is it possible to cross each bridge exactly once?

The Birth of Graph Theory node

link

Königsberg’s problem: too many odd vertices!

2

So … what does this have to do with the cost of mail delivery in China ?

China, 1962 3

a

?

b

c g

3

5 f

e

d 3

How to visit all the mailboxes in the fewest steps?

3

Chinese Postman algorithm 4

a

!

b b

c g

4

After “Eulerizing”

6 f

e

d 4

d

A solution: a b c b e f g d d

New York, 1977 +1

a

?

c g

-1

b

-1 f

e

d +1

How to visit all the garbage cans with the least driving?

4

New York Street Sweeper algorithm 0

a

!

c g

0

b

b

e

e

0

g f d 0

A solution: a b c b f e g d e g

So … what does this have to do with the cost of software delivery in Redmond?

5

A Testing Problem B

a

?

c g

A

b

C f

e

d D

How can I test all these actions in the fewest steps?

The Street Sweeper strikes again B

a

!

c g

A

b

b

e

e

C

g f d D

A solution: a b c b f e g d e g

6

A ‘Safecracking’ Problem B

a

??

c g

A

b

C f

e

d D

How can I test all the pairs of actions in the fewest steps?

De Bruijn sequences a

b

a c g d

b g

f

c

f

e d

e

A solution: a b c b f e c b g d e f e g

7

Testing the Most Likely Paths P(a)=.9 a

???

B b

P(c)=.02 c

A

g P(g)=.9 P(f)=.08

C e

f

d

P(d)=.1

D

How can I test the likeliest sequences first?

Markov Chains + Depth First Traversal g b a

d

e

0.81

f

e

g

c

b

g

g f

0.0648 0.0162 0.09

e

g

0.0072

abg deg abfeg abcbg defeg

8

Capacitated Vehicle problem c d

????

e a

b

i

f g h

How can I test all these actions in the shortest time?

The Street Sweeper solution c d e a

b

i

f

abcbdbebfbgbhbi

g h

The street sweeper approach takes 15 time intervals.

9

But distributing the work ... a

b

c

b

i

a

b

d

b

i

a

b

e

b

i

a

b

f

b

i

a

b

g

b

i

a

b

h

b

i

… gets the job done in 1/3 the time!

Future Directions ?

Random walks

10

Levy Flights

Probability of step’s length is in inverse proportion to the square of that length.

Anti-Random Walks

Rather than taking choosing each step independently of what went before, choose each next step that is most unlike its predecessors.

11

Models + Algorithms = Testing • Models are good at representing systems • Graph theory can use models to generate tests • Different algorithms can provide tests to suit your needs: – – – – – – –

Street sweepers Safecracking Markov chains Capacitated vehicles Random walks Levy flights Anti-random walks

Thank you!

12

No Slide Title

12. Models + Algorithms = Testing. • Models are good at representing systems. • Graph theory can use models to generate tests. • Different algorithms can provide tests to suit your needs: – Street sweepers. – Safecracking. – Markov chains. – Capacitated vehicles. – Random walks. – Levy flights. – Anti-random walks.

341KB Sizes 1 Downloads 285 Views

Recommend Documents

No Slide Title
I will argue that this lack of proper definitions is the main reason why the field of research in Artificial Intelligence (and some of its subfields like Cognitive Robotics, e.g.) has been derailed for the last 60 years. The definitions that are in u

No Slide Title
specific to their learning issues. ▫ 28-year old male. ▫ Cough productive of clear sputum with flecks of blood, worsens to frank blood. ▫ Smokes 1.5 packs a day, ...

No Slide Title
Figure 1. A factorial design manipulated the probability of aversive events encountered by the target, p(Event), and the conditional prob- ability of the target's aggressive reactions to those events, p(Reaction |. Event). The Event-/Reaction+ and Ev

No Slide Title
Hand-held computers (Palm© Z22s) were used to code children's behaviors, their social experiences, and their reactions to them. Using methods based on past research (Zakriski et al., 2005), each child was coded 3-6 times/day. 15,773 observation sess

Title slide with a blue background
Using the average hazard ratio to evaluate treatment effects with non-proportional hazards. Georg Heinze. CeMSIIS – Section for Clinical Biometrics. Page 2. Contents. •. •. •. •. Page 3. •. •. Non-proportional hazards: CABG vs. PCI in E

No Title -
AUX DA. 12. 4. ΟΙ ΡΡΛ. CA. 10. AUX CL. ANA1. ANA3. SCK2. SDO2. LED2 .... OF ADI 5. SDA. 4.5V. 3.3V. C13. 10u mo. POW3/5_1. 3 wa. Gi. زي. C45. 100n.

No Title - GitHub
Feb 15, 2014 - C9. 1uF. C11. 0.1uF. C12. 1uF. 3V3. GND. D. 8. LDO OUT端. DA145807脚. C6 接连到44脚,C8连接到24脚. GND. D8. D4. D4. D11. D5. ANT.

No Title -
28. (ADC5)PC5. 27. (ADC4)PC4. 26. (ADC3)PC3. 25. (ADC2)PC2. 24. (ADC1)PC1. 23. (ADC0)PC0. 13. PD7. 12. PD6. 11. PD5. 6. PD4. 5. PD3. 4. PD2. 3. PD1.

No Title
Number. Revision. Size. A4. Date: 12/02/2010. Sheet of. File: I:\Documents and Settings\..\Air2.SchDoc Drawn By: RA0. 17. RA1. 18. RA2. 1. RA3. 2. RB0/INT. 6.

No Title - GitHub
Jul 8, 2015 - ICSP2 download. DD. DC. RESET. R9. 10k. +3.3V. P1 .0. +3.3V. +3.3V. Y2. 32M. Antenna1. C22. 104. R8 10K. C13. 18pF. C11. 18pF. L2. 2nH. C10. 1pF. C14. 1pF. L3. 2nH. C12. 2.2pF. A7. A6. C5. 12pF. C6. 12pF. Y1. 32.768K. C21. 100nF. (RESET

No Title
Dec 27, 2016 - COMMISSIONER OF FINANCIAL REGULATION. COMMISSIONER OF FINANCIAL REGULATION. 500 N. CALVERT STREET, ROOM 402.

No Title -
Jun 13, 2012 - R4. WSLP3921. BAT_OUT. 1. 2. 3 current voltage sensor output. BAT_IN. R2. C2. 100n. C1. 100n. R1. 10K. GND. C3. 100u/25V. GND. B a tte.

No Title - OpenHacks
Title. Number. Revision. Size. A3. Date: 2015-1-10. Sheet of. File: C:\Documents and Settings\..\Bluno.Sch. Drawn By: 1. 2. 3. PWRIN1. C5. 104P. C6. 104P ... C14. 47PF. GND. GND. GND. N_RESET. VCC3O. 5. 6. 7. IC1B. LM358. 4. 8. 2. 3. 1. IC1A. LM358.

No Title payments center
Dec 28, 2017 - COMMISSIONER OF FINANCIAL REGULATION. CERTIFIES THAT: LEGAL NAME: GOOGLE PAYMENT CORP. D/B/A: 1600 AMPHITHEATRE ...

NO PROJECT TITLE TECHNOLOGY STUDENT ... -
Asp.Net & SQL Server + Android. A-41 - PRATIK PARSHOTAM ... B-23 - ANAND MANSUKHBHAI TANK ... A-23 - KAJALBEN DEVASHIBHAI SUVA. KHUSHAL ...

Title title title
2 GHz Intel Core Duo as a test system. Baseline Experiment. It was important to establish a baseline before continuing with either model validation or the phage therapy experiment. In order to accomplish this we tuned the parameters outlined in Table

title title
Perhaps as a result of the greater social acceptance of homosexuals, more and more individuals have ..... This is but the first mention of what becomes a very ..... Biblical Ethics and Homosexuality: Listening to Scripture (ed. Robert L. Brawley;.

title
description

TITLE
Figure 1: Main energy flows during the plant production in agro-ecosystems. R- represents .... Environmental Policy, Environmental. Engineering ... Emergy evaluation of three cropping systems in the southwestern. Australia. Ecological.

Slide switch plug
#define second_led 13 ​//second LED is connected to 13th pin. #define first_datapin 10 ​//D1 of slide switch is connected to. 10th pin. #define second_datapin ...

Slide 1
had received bachelor or professional degrees. By 1990, this had risen 10-fold to. Inore than 30%. 3. Although technological societies are undoubt- cdly more ...

Slide 0
1Department of Electrical Engineering, Eindhoven University of Technology, The Netherlands. 2 Philips Research, Eindhoven, The Netherlands. Email: [email protected] ... patient care and monitoring, but also reveals health risks that might ...

Slide Dragan.pdf
Page 2 of 20. 2. BIOGRAPHY. Dragan Samardzija received the B.S. degree in electrical engineering and. computer science in 1996 from the University of Novi ...

Slide Biogas.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Slide Biogas.pdf.