4. STORY TIME
• 6 Years Ago, 2 floors from here
• Rebuilding the “ATV” part of the Dutch Food Retail Labor Agreement
• 40 Page RFC Document detailing changes
5. STORY TIME
6 Years ago, 2 floors from here
• 40 page RFC document detailing
changes
• Written by a specifier, months before
• Testing was so complex, a custom test
“engine” was created
• In production, over the course of four
years, at least 10 “bugs” were
discovered
2 Years ago, 1 floor from here
• 1 Feature file containing 25 scenarios
• Written by the team
• 36 Additional testcases identified and
added
• Discovered multiple bugs in original
code
• In the last two years, no bugs were
found in production
6. HOW DID WE START
• Specification by Example was hot-and-happening
• Feature files seemed like the solution…
… however, where do I leave all my graphs and pictures?
• Specification by Example doesn’t start with switching tooling
• It starts with changing people and process
11. WHAT DID WE LEARN
• Start small
• Keep the business close (especially when using an assigned requirements analyst)
• Domain Language is key to success!
• Provide testers and specifiers with direct feedback to new scenarios.
• Define guidelines for usage of stuff like tags
17. EYE-OPENERS
Given the following data is in the database
| empid | fname | lname | sal | mngid |
| 1 | John | Doe | 30000 | 2 |
| 2 | Jane | Doe | 50000 | |
When I calculate my total labor costs per year
Then I see the result 80000 on the screen
Just because you can write
”tables” into your feature file
doesn’t mean you HAVE to.
18. EYE-OPENERS
Given the following data is in the database
| empid | fname | lname | sal | mngid |
| 1 | John | Doe | 30000 | 2 |
| 2 | Jane | Doe | 50000 | |
When I calculate my total labor costs per year
Then I see the result 80000 on the screen
This column doesn’t seem
relevant to the scenario, so why
include it? Instead fall-back to a
sane default in your automation
code.
19. TIPS ‘N TRICKS
Since there are actually three
scenario’s here, this column is
used to identify each one of
them. Use it!
Scenario Outline: Salary increase calculation
Given an employee with a salary of <Salary>
And employees with a salary between <Minimum> and <Maximum> are given a
raise of <Percent>
When I calculate the salary increase
Then the result should be <Result>
Examples: Raise
| Description | Salary | Minimum | Maximum | Percent | Result |
| Managers | 50000 | 45000 | 55000 | 10 | 55000 |
| Employees | 30000 | 20000 | 45000 | 5 | 31500 |
| Secretaries | 10000 | 5000 | 20000 | 50 | 20000 |
20. TIPS ‘N TRICKS
Scenario Outline: Salary increase calculation
Given an employee with a salary of <Salary>
And employees with a salary between <Minimum> and <Maximum> are given a
raise of <Percent>
When I calculate the salary increase
Then the result should be <Result>
Examples: Raise
| Description | Salary | Minimum | Maximum | Percent | Result |
| Managers | 50000 | 45000 | 55000 | 10 | 55000 |
| Employees | 30000 | 20000 | 45000 | 5 | 31500 |
| Secretaries | 10000 | 5000 | 20000 | 50 | 20000 |
Wait a minute?
21. TIPS ‘N TRICKS
Scenario Outline: Salary increase calculation
Given …
Examples: Raise
| Description | Salary | Minimum | Maximum | Percent | Result |
| Managers | 50000 | 45000 | 55000 | 10 | 55000 |
Examples: No raise
| Description | Salary | Minimum | Maximum | Percent | Result |
| Managers | 60000 | 45000 | 55000 | 10 | 60000 |
Notas do Editor
Blaat verhaal over 6 jaar terug
Jonathan interupt, ik herinner me dat anders
Mark: klopt, 2 jaar terug nog een keer gedaan
… met veel beter resultaat
Mark verteld hoe een ontwikkelaar 6 jaar geleden begonnen is aan de aan herbouw van ATV. Wanneer hij bij het derde punt komt, valt Jonathan hem in de reden en zegt dat hij zich dat herinnerd maar dacht dat het maar 2 jaar geleden was…
Geen versiebeheer op Sharepoint en Enterprise Architect
Geen relatie tussen specs en producten (code). Er zit een gat tussen, niemand weet hoe groot.
Er zijn specs van dingen die niet bestaan
Specs van zaken die anders werken
Specs van zaken die allang achterhaald staan
Geen relatie tussen test en product/specs. Er wordt “vanuit de verte” gekeken naar het product
Binnen de specs geen relatie tussen Sharepoint documenten en Enterprise Architect
Level of automation
The featurefiles represent an UI
Being able to test everything still doesn’t mean you should!
ATDD-circle => Refactoring isn’t limited to (implementation) code
It’s okay to use predefined testsets
“auto-completion” is a perfectly valid approach
Functional Testcoverage will never be perfect
Gherkin supports “tables”, doesn’t mean you should put down actual tables
ATDD-circle => Refactoring isn’t limited to (implementation) code
It’s okay to use predefined testsets
“auto-completion” is a perfectly valid approach
Functional Testcoverage will never be perfect
Gherkin supports “tables”, doesn’t mean you should put down actual tables
ATDD-circle => Refactoring isn’t limited to (implementation) code
It’s okay to use predefined testsets
“auto-completion” is a perfectly valid approach
Functional Testcoverage will never be perfect
Gherkin supports “tables”, doesn’t mean you should put down actual tables
ATDD-circle => Refactoring isn’t limited to (implementation) code
It’s okay to use predefined testsets
“auto-completion” is a perfectly valid approach
Functional Testcoverage will never be perfect
Gherkin supports “tables”, doesn’t mean you should put down actual tables
ATDD-circle => Refactoring isn’t limited to (implementation) code
It’s okay to use predefined testsets
“auto-completion” is a perfectly valid approach
Functional Testcoverage will never be perfect
Gherkin supports “tables”, doesn’t mean you should put down actual tables
Description column in Scenario Outline Examples
Use different “actors” where appropriate (Don’t keep editing the same scenario)
Don’t be afraid to refactor, the testset is it’s own insurance policy
Don’t forget to check whether your scenarios can actually fail
A scenario outline can have multiple (named) example sets
Description column in Scenario Outline Examples
Use different “actors” where appropriate (Don’t keep editing the same scenario)
Don’t be afraid to refactor, the testset is it’s own insurance policy
Don’t forget to check whether your scenarios can actually fail
A scenario outline can have multiple (named) example sets
Description column in Scenario Outline Examples
Use different “actors” where appropriate (Don’t keep editing the same scenario)
Don’t be afraid to refactor, the testset is it’s own insurance policy
Don’t forget to check whether your scenarios can actually fail
A scenario outline can have multiple (named) example sets