how to detect smelly acceptance tests - agile dev practices
TRANSCRIPT
![Page 1: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/1.jpg)
![Page 2: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/2.jpg)
![Page 3: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/3.jpg)
![Page 4: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/4.jpg)
How to detect smelly acceptance tests and why they are wrong!
Kishen Simbhoedatpanday
[email protected] @KishenPanday
![Page 5: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/5.jpg)
What is ATDD?
![Page 6: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/6.jpg)
Do you think the Business cares about Unit Testing? I don’t think so
![Page 7: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/7.jpg)
Unit Tests Facilitating the team with Design & Fast Feedback
![Page 8: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/8.jpg)
Getting lost in details. Not meeting customers’ expectations
![Page 9: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/9.jpg)
We need something that gives us the big picture. Acceptance tests to the rescue.
![Page 10: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/10.jpg)
Acceptance Tests should tell us which features are fault
![Page 11: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/11.jpg)
What do you think?
![Page 12: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/12.jpg)
Acceptance Tests They can do so much more!
![Page 13: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/13.jpg)
We stop treating them as Tests
We treat them as Specifications
![Page 14: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/14.jpg)
Specifications By Example
! Describe the solution in non-technical terms
! Define Acceptance Criteria before development
! Quality increases when everyone understands
![Page 15: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/15.jpg)
My thoughts at work
![Page 16: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/16.jpg)
Developers and Acceptance Testing
![Page 17: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/17.jpg)
Testers and Acceptance Testing
![Page 18: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/18.jpg)
Business and Acceptance Testing
![Page 19: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/19.jpg)
What do you think?
![Page 20: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/20.jpg)
It stinks!
![Page 21: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/21.jpg)
FUN! Love and listen to your specification
![Page 22: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/22.jpg)
Specifications that matter Understandable for everyone
![Page 23: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/23.jpg)
Why?
! Check common understanding
! Get rid of assumptions
! You’ll know when you’re done
![Page 24: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/24.jpg)
Stop talking abstract terms Get into detail as soon as you can!
![Page 25: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/25.jpg)
Good acceptance tests have these properties
! Explicitly defined
! Observable
! Realistic scenario
! Related to user story
! Observed instantly
![Page 26: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/26.jpg)
Example
As an Account Holder I want to withdraw cash from an ATM So that I can get money when the bank is closed
![Page 27: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/27.jpg)
Explicitly defined?
Given a customer with ID "12" in front of ATM And the machine contains "100” And the user places card into ATM And the user gets "Please enter PIN” And the user enters PIN "1234” And the system verifies correct PIN And the user selects "cash withdrawal” And the user selects "Enter amount” And the user types "20” And the user selects "OK”
![Page 28: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/28.jpg)
Explicitly defined?
When the user gets "Please wait” And the user waits until no "Please wait” And the user gets "Please remove card” And the user removes card from ATM And the user gets "20” And the user gets "Please remove cash” And the user removes cash from ATM Then the machine contains "80” And the account balance should be "80"
![Page 29: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/29.jpg)
Observable?
Given a customer with ID "12" in front of ATM And the machine contains "100” When the user places card into ATM And the user enters PIN "1234” And the user selects "cash withdrawal” And the user selects "Enter amount” Then the user types "20” And the user selects "OK”
![Page 30: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/30.jpg)
Realistic scenario?
Given a customer with ID "12" in front of ATM When the user enters amount “-123” Then the user gets ”Not a valid amount”
![Page 31: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/31.jpg)
Related to user story?
Given a customer with ID "12" in front of ATM And transfers “100” from savings to withdrawal account When the user enters amount “100” Then the user gets ”100”
![Page 32: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/32.jpg)
Observed instantly?
Given a customer with ID "12" in front of ATM And the machine contains "100” And the user places card into ATM And the user gets "Please enter PIN” And the user enters PIN "1234” And the system verifies correct PIN And the user selects "cash withdrawal” And the user selects "Enter amount” And the user types "20” And the user selects "OK” Then screen show correctly
![Page 33: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/33.jpg)
When writing tests or specifications Think about Heidi Klum who needs to fix it tomorrow
![Page 34: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/34.jpg)
Transforming tests into specifications
Business
Workflow
Technical
Cla
rity
Stab
ility
![Page 35: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/35.jpg)
Less smelly
![Page 36: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/36.jpg)
The breakdown
Withdraw Money
ATM dispensing
Account Balance
![Page 37: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/37.jpg)
The split
![Page 38: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/38.jpg)
Layers of Abstraction
Business
Workflow
Technical
JVM
![Page 39: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/39.jpg)
Specifications that matter
Questions?
! Know upfront what to “accept” as done
! Check common understanding
! SMART
! Layers of Abstractions
![Page 40: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/40.jpg)
Smelly Acceptance Tests More examples
![Page 41: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/41.jpg)
Lost in UI details Watch out!
![Page 42: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/42.jpg)
End – to – end testing Is not bad in itself, it’s just hard
![Page 43: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/43.jpg)
Slow tests
Test Suites > 15 minutes are not allowed!
![Page 44: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/44.jpg)
Huge Test Data
![Page 45: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/45.jpg)
Huge Test Data
![Page 46: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/46.jpg)
Huge Test Data
![Page 47: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/47.jpg)
UI, API Huge Test Data goes here!
Create User Create Transfer Account Create products > 200 euro Order products
Given a Customer has a transfer account When a user orders funds of total price > 200 EUR Then transfer is accepted
Huge Test Data
Business
Workflow
Technical
![Page 48: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/48.jpg)
Erratic Tests
Object
Property X: 10
Test 1
Test 2
Test 3
Read X: 10
Write X : 12
Read X : 10
![Page 49: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/49.jpg)
Regression Bug Suite Why do you have them in the first place?
![Page 50: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/50.jpg)
How to detect smelly Acceptance Tests
Questions?
! Not SMART
! Slow - End-to-End
! Irrelevant Details
! Edge Cases
! Erratic Tests
! Shared mutable objects
! Regression checks
! UI details
![Page 51: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/51.jpg)
Why bother? Why care about smelly acceptance tests?
![Page 52: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/52.jpg)
Keep the team together
![Page 53: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/53.jpg)
Unstable tests - There is nothing worse No one likes to work with them
![Page 54: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/54.jpg)
Tools, Tools and more Tools
![Page 55: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/55.jpg)
Success is not in tools It’s in collaboration Select a tool that facilitates maximum collaboration
![Page 56: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/56.jpg)
![Page 57: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/57.jpg)
![Page 58: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/58.jpg)
De afbeelding kan niet worden weergegeven. Mogelijk is er onvoldoende geheugen beschikbaar om de afbeelding te openen of is de afbeelding beschadigd. Start de computer opnieuw op en open het bestand opnieuw. Als de afbeelding nog steeds wordt voorgesteld door een rode X, kunt u de afbeelding verwijderen en opnieuw invoegen.
Wat Rong Khun, Chiang Rai, Thailand
![Page 59: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/59.jpg)
Thank you! Please evaluate my presentation
See evaluation booklets in conference bag
Kishen Simbhoedatpanday
[email protected] @KishenPanday
![Page 60: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/60.jpg)
Xebium = Fitnesse + Selenium The Love & Hate
![Page 61: How to detect smelly acceptance tests - Agile Dev Practices](https://reader036.vdocument.in/reader036/viewer/2022062419/5599422d1a28ab21778b47ce/html5/thumbnails/61.jpg)
Xebium & Layers of Abstraction
Fitnesse
Other Fixtures
API
DB
Xebium Selenium
Business level Workflow level
Technical level
Too technical level