Slide 1

Slide 1 text

Adding Tests to an Uncovered App Zach Smith | @zmsmith

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Production

Slide 6

Slide 6 text

Staging Production

Slide 7

Slide 7 text

http://tech.yipit.com/2011/11/09/how-yipit-deploys-django/

Slide 8

Slide 8 text

http://tech.yipit.com/2011/11/09/how-yipit-deploys-django/ self call

Slide 9

Slide 9 text

Automated Testing

Slide 10

Slide 10 text

Automated Testing Automated Testing

Slide 11

Slide 11 text

WHEN TO AUTOMATE?

Slide 12

Slide 12 text

WHEN TO AUTOMATE? - Time

Slide 13

Slide 13 text

WHEN TO AUTOMATE? - Time - Team

Slide 14

Slide 14 text

WHEN TO AUTOMATE? - Time - Team - Things really, really have to work

Slide 15

Slide 15 text

TYPES OF TESTS

Slide 16

Slide 16 text

TYPES OF TESTS - Acceptance Tests

Slide 17

Slide 17 text

TYPES OF TESTS - Acceptance Tests - Functional Tests

Slide 18

Slide 18 text

TYPES OF TESTS - Acceptance Tests - Functional Tests - Unit Tests

Slide 19

Slide 19 text

ACCEPTANCE TESTS

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

#BDD library for Gherkin syntax lettuce #browser API on top of selenium splinter #Always keep this the newest version selenium==2.21.3

Slide 23

Slide 23 text

GHERKIN Given the state of a system, When an action is taken, Then an outcome is achieved.

Slide 24

Slide 24 text

#BDD library for Gherkin syntax lettuce #browser API on top of selenium splinter #Always keep this the newest version selenium==2.21.3

Slide 25

Slide 25 text

#BDD library for Gherkin syntax lettuce #browser API on top of selenium splinter #Always keep this the newest version selenium==2.21.3

Slide 26

Slide 26 text

settings.py

Slide 27

Slide 27 text

FEATURES

Slide 28

Slide 28 text

polls/features/vote.feature

Slide 29

Slide 29 text

polls/features/vote.feature

Slide 30

Slide 30 text

terrain.py

Slide 31

Slide 31 text

polls/features/steps.py

Slide 32

Slide 32 text

polls/features/vote.feature

Slide 33

Slide 33 text

terrain.py

Slide 34

Slide 34 text

polls/features/steps.py

Slide 35

Slide 35 text

polls/features/steps.py

Slide 36

Slide 36 text

polls/features/steps.py

Slide 37

Slide 37 text

polls/features/steps.py

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

FUNCTIONAL TESTS

Slide 40

Slide 40 text

polls/templates/results.html

Slide 41

Slide 41 text

#Includes a nose test runner and #options for running types of tests unclebob #helper library for scenarios #and assertions sure

Slide 42

Slide 42 text

#Includes a nose test runner and #options for running types of tests unclebob #helper library for scenarios #and assertions sure

Slide 43

Slide 43 text

settings.py

Slide 44

Slide 44 text

polls/tests/functional/test_polls.py

Slide 45

Slide 45 text

polls/tests/functional/test_polls.py

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

UNIT TESTS

Slide 48

Slide 48 text

#Includes a nose test runner and #options for running types of tests unclebob #helper library for scenarios #and assertions sure

Slide 49

Slide 49 text

#Includes a nose test runner and #options for running types of tests unclebob #helper library for scenarios #and assertions sure

Slide 50

Slide 50 text

#Includes a nose test runner and #options for running types of tests unclebob #helper library for scenarios #and assertions sure #python mocking library mock

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

settings.py

Slide 56

Slide 56 text

polls/models.py

Slide 57

Slide 57 text

polls/tests/unit/test_polls.py

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

polls/models.py

Slide 60

Slide 60 text

polls/tests/unit/test_analytics.py

Slide 61

Slide 61 text

polls/tests/unit/test_analytics.py

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

SUMMARY •Acceptance •Functional •Unit

Slide 64

Slide 64 text

QUESTIONS? Zach Smith | @zmsmith