atdd with cucumber java talk at devopsqanj meetup aug 11 2016
TRANSCRIPT
- 1 -
ATTD talk with DevOpsQANJ – Jersey City – Thursday, Aug 11th 2016
Anil Jaising
- 2 -
20 years of experience working in Wall Street firms as a developer, architect, delivery manager and agile coach.
Executive director @ JP Morgan, contributes articles on Agile and DevOps @ nimblebydesign.com. Speak at various industry and technology conferences.
About me
- 3 -
Question every assumption– Taiichi Ohno1.Detect the abnormality2.Stop what you are doing3.Fix or correct the immediate problem4.Investigate the root cause and install a countermeasure
Stop the line at Toyota
- 4 -
Testing must be independent and thus separated from development
Testing cannot start before coding is finished
Testing follows the sequence of (1) test case design, (2) test case execution, (3) test case reporting (a test waterfall)
There must be a separate test department
There must be a test manager
Testing must be “well planned”
There must be a “testing strategy” and a “master test plan”
Testing must be done at the end
Some assumptions about testing
Source: Practices for scaling lean and agile development by Craig Larman and Bas Vodde
- 5 -
Developer activity: Guard your system against defects and build in quality
TDD
Write the test that fails
Write the code that passes
Refactor the code
- 6 -
Testing is a team sport
- 7 -
Testing is the process of executing a program to find errors
Avoid assuming testing is testing
Reference: IEEE paper by Robert Martin and Grigori Melnik
- 8 -
ATDD – From user stories to business value
User Story:
As an ATM user I want to withdraw cash from the ATM machine such that the total amount left is equal to the difference between the original amount and the amount I withdrew
Original amount
withdraw Final amount
100 20 80
Examples:
- 9 -
Team building examples
- 10 -
ATDD – From user stories to business value
Original amount
withdraw Final amount
100 20 80
250 10 240
500 50 450
750 70 680
1000 500 500
- 11 -
Demo: Code -> Design -> pass the test -> refactor the code
Download the demo code at https://github.com/aniljaising/ATTD-with-Cucumber
Source: Cucumber for Java Book by Seb Rose, Aslak Hellesoy and Matt Wynne
- 12 -
Features
The glue - Step definitions
Implementation
Automation library
How Cucumber works?
Source: Cucumber for Java Book by Seb Rose, Aslak Hellesoy and Matt Wynne
- 13 -
Ubiquitous language – Spec by example
Living documentation
Single source of truth
Less rework
Why Cucumber?
Source: http://cucumber.io
- 14 -
Q & A