B e h a v i o r D r i v e n G U I T e s t A u - - PowerPoint PPT Presentation

b e h a v i o r d r i v e n g u i t e s t a u t o m a t i
SMART_READER_LITE
LIVE PREVIEW

B e h a v i o r D r i v e n G U I T e s t A u - - PowerPoint PPT Presentation

B e h a v i o r D r i v e n G U I T e s t A u t o m a t i o n f o r J a v a D e s k t o p , E m b e d d e d & M o b i l e A p p l i c a t i o n s A b o u t m e A m


slide-1
SLIDE 1

B e h a v i

  • r

D r i v e n G U I T e s t A u t

  • m

a t i

  • n

f

  • r

J a v a D e s k t

  • p

, E m b e d d e d & M

  • b

i l e A p p l i c a t i

  • n

s

slide-2
SLIDE 2

A b

  • u

t m e

A m a n d a B u r m a

B a c k g r

  • u

n d | A u t

  • m

a t e d Q A T e s t E n g i n e e r i n g C

  • m

p a n y

| froglogic

F

  • c

u s a r e a s | S

  • f

t w a r e q u a l i t y t

  • l

s & C r

  • s

s

  • p

l a t f

  • r

m t e s t i n g

slide-3
SLIDE 3

A g e n d a

  • W

h a t i s B D D ?

  • W

h y B D D a n d B D T ?

  • A

u t

  • m

a t i n g a B e h a v i

  • r

D r i v e n G U I T e s t

  • I

n t e g r a t i n g B D T a n d T e s t A u t

  • m

a t i

  • n
slide-4
SLIDE 4

W h a t i s B e h a v i

  • r

D r i v e n D e v e l

  • p

m e n t ( B D D ) ? W h a t i s B e h a v i

  • r

D r i v e n T e s t i n g ( B D T ) ?

“BDD is a second-generation, outside-in, pull-based, multiple-stakeholder, multiple-scale, high-automation, agile

  • methodology. It describes a cycle of interactions with well-defined outputs, resulting in the delivery of working,

tested software that matters.” - Dan North http://en.wikipedia.org/wiki/Behavior-driven_development

OR...

slide-5
SLIDE 5

W h a t i s B e h a v i

  • r

D r i v e n D e v e l

  • p

m e n t ( B D D ) ? W h a t i s B e h a v i

  • r

D r i v e n T e s t i n g ( B D T ) ?

T e s t fi r s t d e v e l

  • p

m e n t

  • n

a h i g h e r l e v e l

  • C

l e a r s e p a r a t i

  • n
  • f

t e s t l

  • g

i c a n d i m p l e m e n t a t i

  • n
  • F

e a t u r e s & t e s t s

  • d

e fi n e d i n a c

  • m

m

  • n

h u m a n r e a d a b l e l a n g u a g e

  • i

m p l e m e n t e d i n a c

  • m

m

  • n

h u m a n r e a d a b l e l a n g u a g e

slide-6
SLIDE 6

W h y B D D & B D T ?

  • D

e s c r i b e ( T e s t ) i n a h u m a n

  • r

e a d a b l e D S L

  • F
  • c

u s

  • n

a p p l i c a t i

  • n

b e h a v i

  • r
  • C

l e a r l

  • g

i c v s . i m p l e m e n t a t i

  • n

s e p a r a t i

  • n
  • E

n a b l e n

  • n
  • e

n g i n e e r t e s t c r e a t i

  • n

W h y B D D ?

C l e a r F e a t u r e R e q u i r e m e n t s & R e s u l t s

Production Refactor Code Make Feature Test Pass Write a Failing Feature Test

I m p l e m e n t R e l e a s e B u g R e p e a t

slide-7
SLIDE 7

M a k e F e a t u r e T e s t P a s s M a k e F e a t u r e T e s t P a s s P r

  • d

u c t i

  • n

R e f a c t

  • r

C

  • d

e

G i v e n

»

W h e n

»

T h e n

Feature: Feature: Create new address books Scenario: Scenario: Create a new blank address book Given Given the app is running When When user creates a new address book Then Then the address book is blank

W r i t i n g a F e a t u r e F i l e

W r i t e a F a i l i n g F e a t u r e T e s t I m p l e m e n t R e l e a s e B u g R e p e a t

slide-8
SLIDE 8

W r i t e a F a i l i n g F e a t u r e T e s t P r

  • d

u c t i

  • n

R e f a c t

  • r

C

  • d

e

T e s t S t e p I m p l e m e n t a t i

  • n

Given("the app is running", function function(context) { startApplication("AddressBookSwing.jar"); }); When("user creates a new address book", function function(context) { activateItem(waitForObjectItem(":AddressBook_javax.swing.JMenuBar", "File")); activateItem(waitForObjectItem(":File_javax.swing.JMenu", "New...")); }); Then("the address book is blank", function function(context) { waitFor("object.exists(':AddressBook_javax.swing.JTable')", 20000); test.compare(findObject(":AddressBook_javax.swing.JTable").rowcount, 1); });

G e n e r a t e u s i n g G u i d e d

  • R

e c

  • r

d i n g (

  • p

t i

  • n

a l )

M a k e F e a t u r e T e s t P a s s I m p l e m e n t R e l e a s e B u g R e p e a t M a k e F e a t u r e T e s t P a s s

slide-9
SLIDE 9

W r i t e a F a i l i n g F e a t u r e T e s t M a k e F e a t u r e T e s t P a s s P r

  • d

u c t i

  • n

T e s t S t e p I m p l e m e n t a t i

  • n

Given("the app is running", function function(context) { startApplication("AddressBookSwing.jar"); }); When("user creates a new address book", function function(context) { common.invokeMenuItem("File","New"); }); Then("the address book is blank", function function(context) { common.verifyRowCount(":AddressBook_javax.swing.Jtable", 1); });

R e f a c t

  • r

i n g

I m p l e m e n t R e l e a s e B u g R e p e a t R e f a c t

  • r

C

  • d

e M a k e F e a t u r e T e s t P a s s P r

  • d

u c t i

  • n
slide-10
SLIDE 10

B D D G U I T e s t A u t

  • m

a t i

  • n

D e m

slide-11
SLIDE 11
  • C
  • m

p l e t e s u p p

  • r

t f

  • r

F e a t u r e F i l e s w r i t t e n i n G h e r k i n

  • 1

% c

  • m

p a t i b l e w i t h C u c u m b e r , B e h a v e , e t c .

  • T

e s t s t e p s c a n b e i m p l e m e n t e d i n a n y

  • f

S q u i s h ' s s u p p

  • r

t e d s c r i p t i n g l a n g u a g e s

  • P

y t h

  • n

, P e r l , J a v a S c r i p t , T c l & R u b y

  • F

u l l I D E s u p p

  • r

t

  • E

d i t

  • r

w i t h c

  • d

e c

  • m

p l e t i

  • n

, r e c

  • r

d i n g

  • f

s t e p s , e t c .

  • P

r

  • d

u c e c l e a r e r t e s t r e s u l t s

  • C
  • l
  • r
  • c
  • d

e d r e s u l t s d i r e c t l y i n F e a t u r e s fi l e

B u i l t

  • i

n B e h a v i

  • r

D r i v e n D e v e l

  • p

m e n t & T e s t i n g S u p p

  • r

t

B D D i n S q u i s h

slide-12
SLIDE 12

Platforms

O b j e c t

  • b

a s e d G U I T e s t A u t

  • m

a t i

  • n

Technologies

W h y S q u i s h ?

slide-13
SLIDE 13

C

  • n

t a c t M e

a m a n d a @ f r

  • g

l

  • g

i c . c

  • m

a m a n d a b u r m a