35
December 2011 Specifications For Enterprise Testing Presenters Sathyan Sethumadhavan & Shalabh Varma

Specifications for Enterprise Testing

Embed Size (px)

Citation preview

Page 1: Specifications for Enterprise Testing

December 2011

Specifications For Enterprise Testing

Presenters

Sathyan Sethumadhavan & Shalabh Varma

Page 2: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Agenda

Where do we spend more time

A new approach for collaboration

Implement Specifications

Gauge Progress

Q&A

Page 3: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Do you experience any of this

Long Regression Cycles

Defects Leakage - Missing Requirements

Test and Requirements documents becomes stale

Spends more time on defect management and triage

Less confidence - Existing test coverage

Frequent changes - Breaks existing functionalities

Page 4: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Do you spend more time here

Requirements document

Creating test plan and strategy

Creating test Cases/Steps

Defect Management

Traceability Matrix

Fix productionDefects

Page 5: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Page 6: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Specifications Driven Development

Page 7: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

EXAMPLES

REQUIREMENTS

TESTSCan Become

Elaborate

Verify

Page 8: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Specifications – Focus Area

Requirementsdocument

Creating test plan and strategy

Creating test cases

Defect management and analysis

Traceability Matrix

Fix production defects

Specifications for both humans and machines

Tests as Documentation

Managing stale artifcats

Specifying Collaborately

Validating Frequently

Page 9: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

A Good Specification

Examples should be complete

Precise and Testable

True Specification – Not a script

About business functionality – Not software design

Self-explanatory and focused

Page 10: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

A Good Specification

Page 11: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

A Good Specification

Page 12: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Benefits

Distributed teams - Necessary artifacts and re-use artifacts

One-time specification – Referred by stakeholders and team

Artifacts remain as living documents

Focus on collaboration and communication gap

More time on exploratory/business testing

Time-to-market availability

Page 13: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Specifications – Key Process Patterns

Page 14: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Key Process Patterns

Page 15: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Key Process Patterns - Goals

Understand customer’s business requirements

Understand the “Why” and “Who”

Understand the intent and value

Understand the Output

Team delivers complete feature

Page 16: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Key Process Patterns - Collaboration

Page 17: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Key Process Patterns - Examples

Requirements - Don’t provide full and unambiguous context

Don’t have Yes/No answers in your example

Ask for alternate way for validation

Avoid making up your own data

Avoid temptation to explore all possibility

Page 18: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Key Process Patterns - Refining

Page 19: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Key Process Patterns - Refining

Don’t create workflow like descriptions

Don’t get trapped in user interface details

Show and lets the user understand

Refined Examples = Acceptance criteria for delivery

Page 20: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Key Process Patterns - Refining

Page 21: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Key Process Patterns - Automation

Plan for automation upfront

Don’t delegate automation towards the end

Avoid automating existing manual scripts

Automate along system boundaries with necessary context

Automated Specification = Executable Specification

Page 22: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Key Process Patterns - Automation

Page 23: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Key Process Patterns - Validation

Fix the most annoying thing, fix it and repeat

Simpler test doubles for external systems

Isolated environment and fully automated deployments

Look for ways for faster feedback

Don’t just disable failing tests

Page 24: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Key Process Patterns – Living Documentation

Don’t create long specifications

Avoid using technical concepts in tests

Base specification on personas

Evolve the ubiquitous language and use it consistently.

Organize based on functional areas

Page 25: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Implementing Specifications

Page 26: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Greenfield

Implement as part of the big process change

Use TDD as a first step towards Specifications

Follow the key process patterns

Page 27: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Existing Projects

Start with automated tests

Don’t talk process or jargon words

Don’t make test automation end goal

Our Focus - Collaboration and process-change

Executable specification in the same codebase

Page 28: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Gauge Progress

Page 29: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Gauge Progress

Page 30: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Take Away

Distributed teams - Necessary artifacts and re-use artifacts

One-time specification – Referred by stakeholders and team

Artifacts remain as living documents

Focus on collaboration and communication gap

More time on exploratory/business testing

Time-to-market availability

Page 31: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Case Studies

Page 32: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Case Studies

Page 33: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

Tools

Twist - http://studios.thoughtworks.com/twist-agile-test-automation/ Cucumber – http://cukes.infoConcordion – http://www.concordion.orgFitNesse - http://fitnesse.orgJbehave - http://jbehave.orgGreenPepper: http://www.greenpeppersoftware.com. Robot Framework: http://www.robotframework.orgSpecFlow: http://www.specflow.orgTextTest: http://www.texttest.org

Page 34: Specifications for Enterprise Testing

Contact us

Sathyan [email protected]

Shalabh [email protected]

Page 35: Specifications for Enterprise Testing

Private and Confidential. © 2011 ThoughtWorks, Ltd. All rights reserved.

References

① Specification by example and Manning the specification- Gojko Adzic

② Projects implemented SDD in real-time