580 likes | 736 Views
Gojko Adzic gojko@gojko.net http://gojko.net http://www.neuri.co.uk. Agile Acceptance Testing Closing the communication gap in software projects. Why should you care (PM/BA)?. Developers will actually read the specifications They will understood the stuff correctly
E N D
Gojko Adzic gojko@gojko.net http://gojko.net http://www.neuri.co.uk Agile Acceptance Testing Closing the communication gap in software projects
Why should you care (PM/BA)? • Developers will actually read the specifications • They will understood the stuff correctly • They will not skip parts of the specs • You can track the development progress • Save time on acceptance/smoke testing
Why should you care (dev)? • Requirements will be unambiguous and without functional gaps • Business analysts will really understand those special cases you mentioned • You will have automated tests to guide development • It will be easier to take-over and hand-over code
Why should you care (QA) • Finally stop those guys from making the same mistakes over and over • Avoid doing the same stuff all the time • Build quality in from the start • Vefify business rules by a click on a button
An experiment with four active battalions in US Army Commander expectations matched actions in only 34% of the cases L.G.Shattuck, 2000 http://www.au.af.mil/au/awc/awcgate/milreview/shattuck.pdf
Traditional process is like the Telephone game! http://www.sxc.hu/profile/scol22
Pay ₤2 for a 1000 clicks • what about 2500 clicks? • what about 500 clicks? • what about 999 clicks? • what about 1000 clicks over 2 days?
One of the most effective ways of testing requirements is with test cases very much like those for testing the completed system Donald Gause and Gerald Weinberg Exploring Requirements - 1989!
As formality increases, tests and requirements become indistinguishable. Robert C. Martin and Grigori Melnik Tests and Requirements, Requirements and Tests: a Mobius Strip IEEE Software January/February Issue 2008
Key practices • Discuss real-world examples to build a shared understanding of the domain • Use those examples as an acceptance criteria • Automate acceptance tests • Focus the development on those tests • Use the tests as a live specification to facilitate change
It is not UAT! • It is not even “testing” in the QA sense. • Customers, developers, business analysts involved as well as QA.
Better names • “Acceptance testing” is misleading! • Behaviours • Executable specifications • Examples
It is about improving the communication and providing guidance for development Although it is called “testing”, it is not really about QA
A very useful way to think about acceptance tests in practice http://www.jamesshore.com/Blog/How-I-Use-Fit.html Jim Shore: “Describe-Demonstrate-Develop”
The Example-Writing workshop • Business people, developers and QA in the same room • Transfer the knowledge • Ensure that we all understand the same thing
Can you give us a few examples? How do we verify that this thing we are going to write is implemented completely and correctly?
Pretend it is magic… …and we deliver this software. How would you test it?
Inconsistencies and gaps are easy to spot when you write the rules down!
Real-world examples help flush out incorrect assumed rules find real business rules!
People have think at a more detailed level and can't brush questions off…
People approach the same problem from different perspectives, so this avoids groupthink!
Step 2:Select a formal set of acceptance tests and automate them
Check at the source Inexpensive Verifications Test to prevent defects, not to discover them The Toyota Way
Verify business rules with the click of a button Save time on manually (acceptance/smoke)testing
Automate tests, but still keep them human-readable And you can add pictures as well….
Given a stock of prices 0.5,1.0 When the stock is traded at 2.0 Then the alert status should be OFF When the stock is traded at 5.0 Then the alert status should be OFF When the stock is traded at 11.0 Then the alert status should be OFF And this
No just-in-case code Step 3:Providing focus for development
… not just the rules they see Developers will have to code exactly what was specified
When all the tests are green, the job is done Automated testreports show where we are…
Tests promote a consistent use of the DDD ubiquitous language!
Previous examples help you ensure to discuss all important edge cases.
Automated tests show straight away when something is obsolete or broken
[tests became a] • “significant and valuable business resource” Rick Mugridge, Doubling the Value of Automated Tests, Google Tech Talks 09/2006
Save time by not writing those big requirements docs that nobody reads… “It’s extra work and I don’t have time”
Tests ARE Specifications “But they will only look at the tests and not read the requirements…”
“What if I leave something out? If they are using tests as the scope, and we do not specify some tests, what happens then?“
“That’s cheating! We give the developers exactly what we are going to test, and they develop the software only to pass those tests…”