Upload
ardesco
View
324
Download
1
Tags:
Embed Size (px)
DESCRIPTION
Slides from my LTG talk on 30 July 2014
Citation preview
Testing Anti-Patterns
Mark Collin - @Ardesco http://ardesco.lazerycode.com
!
BDD
What people call BDD
As a user I want my search to return search results
Given I navigate to the google Website
When I type cheese in the search box
And click the “Google Search” button
Then search results for cheese will be shown
CHECK THAT SEARCH WORKS ON THE GOOGLE WEBSITE
STEP 1 Navigate to the google website
STEP 2 Type “cheese” in the search box
STEP 3 Click the “Google Search” button
STEP 4 Check that search results for cheese are shown
What people call BDD
• Conflating Scenarios
!
Given I want to expand my knowledge of all things cheese related
When I search for cheese on google Then I will get lots of cheesy information
Try to be more like this:
Interviewer: So you currently work in a BDD environment, can you tell me a bit more about that? Candidate: We use cucumber !Interviewer: That’s great, what else do you do.!Candidate: Um… we use cucumber
What people call BDD
• Conflating Scenarios
• Using Cucumber != BDD
BDD uses examples in conversation to illustrate behaviour. We sometimes call those examples scenarios, but really they mean the same thing. My favourite technique for eliciting examples is just to ask for them: “Can you give me an example?”
Liz Keogh
!
Defects
Curiously Reported/Unintelligible Defects
• Too little information / Presumed knowledge
!
!
Too little informationDescription:
When I try to log into the site it breaks
Reproduction steps:
Log into the site
Actual:
It breaks
Expected:
It shouldn’t break
Presumed KnowledgeDescription:
Using a TGS connecting to PDB and exercising scenario Alpha12, results not saved and notifications not sent.
Reproduction steps:
1. Enable all tunnels
2. Configure PDB data sources
3. Exercise scenario Alpha12 and then save results to CDC
Actual:
Results not saved to CDC
Expected:
Results should be saved to CDC and GMQ should be notified!
Curiously Reported/Unintelligible Defects
• Too little information / Presumed knowledge
• You haven’t diagnosed the problem!
!
Curiously Reported/Unintelligible Defects
• Too little information / Presumed knowledge
• You haven’t diagnosed the problem!
• Multiple defects in one ticket
An Ideal Defect
• Be clear about which Operating System / Device / Server you found the issue on!• If testing a website say which browser version you are using!• Minimal reproduction steps - if you don’t need to interact with 5 other systems
first to produce the error don’t add it to the reproduction steps.• Expected/Actual - explain what you think should happen, and what actually
happens (you may be wrong, but its the starting point for a conversation).• Add relevant attachments, e.g. screenshots, logs, etc.!Finally we should always endeavour to make the reproduction steps simple enough that they can be followed by a 6 year old with no technical knowledge.
Inappropriate Automation• Rewriting dev code badly
• Going through the motions, but not actually checking anything
• Doing everything through the UI
• Focus your tests, don’t check everything!