Test Automation Without the Headache: Agile Tour Vienna 2015

Post on 06-Jan-2017

596 views 1 download

Transcript of Test Automation Without the Headache: Agile Tour Vienna 2015

Gojko Adzic@gojkoadzic

FASTFOOD

FASTFOOD

CEMENT

FASTFOOD

CEMENT

BLINDER

FASTFOOD

CEMENT

BLINDER EXOSKELETON

Divideexpectations,

workflows,interactions

When items = …,assert tax == ...

When items = …,assert tax == ...

Add itemsAuthoriseCheckout

When items = …,assert tax == ...

Add itemsAuthoriseCheckout

$('input[name=…]').val(…)$('a[role=…]').click()

When items = …,assert tax == ...

Add itemsAuthoriseCheckout

$('input[name=…]').val(…)$('a[role=…]').click()

DEPENDSON THETOOL

DEPENDSON THE APP

Simulate onlythings youcompletelyunderstand

AVOIDMOCKING

NEVERMOCK

Set accounts: |id |name |type |credit limit |balance|stat|

|1 |XD_DIRECT |XD |10000000 |0 |O ||2 |XD_DIRECT |XD |10000000 |0 |O | |3 |XD_DIRECT |XD |10000000 |0 |O |

Aggregate user transactions

Check statement: |user id |account id |name |risk |reg_date | |187 |1 |M Smith |x1 |01.09.2009 |

Add transactions:|txid |acct |amount |ccy |stat |tx date | gw ||1 |1 |10 |EUR |X |01.01.2010 | G1_x |

|2 |2 |10 |EUR |X |02.01.2010 | EPAY |

Execute statement summary 07.01.2010

Check transactions:|txid |amount |currency |stat | date ||1 |10 |EUR |X |01.01.2010 | |4 |10 |EUR |P |04.01.2010 ||7 |10 |EUR |S |07.01.2010 |

Make the link frominputs to outputs

obvious

Optimise fortroubleshootingnot for writing

Re-organisefor discovery

5 KEY PATTERNS1) Split expectations, workflows and interaction2) Isolate only things you completely understand3) Make the link from inputs to outputs obvious4) Optimise for troubleshooting not for writing5) Re-organise for discovery