Top Banner
atdays.com BDD Test Framework on PHP ... develop you features philosophically Oleksii Zozulenko 1 Saturday, February 9, 13
31
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Bdd test frameworkphilosophy

atdays.com

BDD Test Framework on PHP

... develop you features philosophically

Oleksii Zozulenko

1

Saturday, February 9, 13

Page 2: Bdd test frameworkphilosophy

atdays.com #atdays

My name is Oleksii

I like automation (for last 7 years)

2

Saturday, February 9, 13

Page 3: Bdd test frameworkphilosophy

atdays.com #atdays

Context. Project

3

Engine for Internet stores

Saturday, February 9, 13

Page 4: Bdd test frameworkphilosophy

atdays.com #atdays4

Test cases & Stories

Context. Docs

Saturday, February 9, 13

Page 5: Bdd test frameworkphilosophy

atdays.com #atdays4

Test cases & Stories

Context. Docs

Saturday, February 9, 13

Page 6: Bdd test frameworkphilosophy

atdays.com #atdays5

Context. Tests

Takes too long time

Can not involve developers

Auto tests

Hard to support

Saturday, February 9, 13

Page 7: Bdd test frameworkphilosophy

atdays.com #atdays6

Saturday, February 9, 13

Page 8: Bdd test frameworkphilosophy

atdays.com #atdays

BEHAVIOR DRIVEN DEVELOPMENT

7

Saturday, February 9, 13

Page 9: Bdd test frameworkphilosophy

atdays.com #atdays

Brief overview

8

Behavior, not test/should

Re-translation your user stories into code

http://dannorth.net/introducing-bdd/

Dan north

Saturday, February 9, 13

Page 10: Bdd test frameworkphilosophy

atdays.com #atdays9

We need documented tests

But

Tests should run!

Saturday, February 9, 13

Page 11: Bdd test frameworkphilosophy

atdays.com #atdays

TOOLS

10

Saturday, February 9, 13

Page 12: Bdd test frameworkphilosophy

atdays.com #atdays

Different

11

Codeception

RSpec

Cucumber

JSpec

JBehave

Fabulous

Behat

Saturday, February 9, 13

Page 13: Bdd test frameworkphilosophy

atdays.com #atdays12

Behat&

Cucumber&

Symfony&

Mink&(WebDriver)&

Tags,&Events&

Snippets&

Saturday, February 9, 13

Page 14: Bdd test frameworkphilosophy

atdays.com #atdays

FRAMEWORK

13

Saturday, February 9, 13

Page 15: Bdd test frameworkphilosophy

atdays.com #atdays14

Saturday, February 9, 13

Page 16: Bdd test frameworkphilosophy

atdays.com #atdays

ARCHITECTURE

15

Saturday, February 9, 13

Page 17: Bdd test frameworkphilosophy

atdays.com #atdays

Flexibility

16

Saturday, February 9, 13

Page 18: Bdd test frameworkphilosophy

atdays.com #atdays

Scalability

17

Saturday, February 9, 13

Page 19: Bdd test frameworkphilosophy

atdays.com #atdays

APPLICATION API

18

Saturday, February 9, 13

Page 20: Bdd test frameworkphilosophy

atdays.com #atdays19

Application API

En##es&

DAO&

Model&

Saturday, February 9, 13

Page 21: Bdd test frameworkphilosophy

atdays.com #atdays

PAGE OBJECT PATTERN

20

Saturday, February 9, 13

Page 22: Bdd test frameworkphilosophy

atdays.com #atdays

Yaml structure

21

LayoutPage:elements:

Element1: “xpathvalue”Element2: “xpathvalue”

PageName:url: “canbedynamicwith%ID%”inherit: LayoutPageentityClass: “Bundle\Entities\PageEnity”defaultFind: “byId”elements:

Element: “%{AnotherPage/Element}%xpath”

Saturday, February 9, 13

Page 23: Bdd test frameworkphilosophy

atdays.com #atdays

PageHelper

22

getPage($pageName)

getElement($pageName, $element, array

$attributes )

getUrl($pageName, $entityId)

Reading yaml structure

Saturday, February 9, 13

Page 24: Bdd test frameworkphilosophy

atdays.com #atdays

PITFALLS

23

Saturday, February 9, 13

Page 25: Bdd test frameworkphilosophy

atdays.com #atdays24

Native Language

Saturday, February 9, 13

Page 26: Bdd test frameworkphilosophy

atdays.com #atdays25

Hard to re-use code

Saturday, February 9, 13

Page 27: Bdd test frameworkphilosophy

atdays.com #atdays

SUMMARY

26

Saturday, February 9, 13

Page 28: Bdd test frameworkphilosophy

atdays.com #atdays

Use your Application

27

Use Your Application

Saturday, February 9, 13

Page 29: Bdd test frameworkphilosophy

atdays.com #atdays28

Saturday, February 9, 13

Page 30: Bdd test frameworkphilosophy

Saturday, February 9, 13

Page 31: Bdd test frameworkphilosophy

atdays.com

Thanks

[email protected]@qainsider

qainsider.com

30

Saturday, February 9, 13