Specification by Example Explained - Scrum Day India...What is Specification by Example?...

34
Specification by Example Explained - ShriKant Vashishtha

Transcript of Specification by Example Explained - Scrum Day India...What is Specification by Example?...

Page 1: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Specification by Example Explained

- ShriKant Vashishtha

Page 2: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Automation

Page 3: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples
Page 4: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Bottleneck, Flow and TOC

Page 5: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Testing as Bottleneck

Page 6: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Product Owner as a Bottleneck

Page 7: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

What is Scrum?

Page 8: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

What is Specification by Example?

Page 9: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Collaborative Way of Getting Requirements and Tests

Page 10: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Best way to Collaborate, around White Board

Page 11: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Acceptance Criteria Example

Page 12: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Any Evolutionary Document Can Become Stale

Page 13: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Welcome to the World of Executable Spec

Page 14: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples
Page 15: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Let’s Dig Deeper

Page 16: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Specifications with examples

Page 17: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

You are aiming for key examples enough to understand the function.

Not necessary to have every single example.

Page 18: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Another Scenario and Example

Page 19: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Good test may not be necessarily right candidate to understand the

feature.

Page 20: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Specifications vs Automated Tests

Automated

Tests

Specifications

Page 21: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Aim of Specifications

• Shared Understanding

• Testing

• Documentation

Page 22: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Characteristics of Specifications

• Examples should be precise and testable

• Scripts are not specification (not about how the system is built. click on this button, move to next page. It’s not about UI)

• Specification should be about business functionality, not software design

• Specifications should be self-explanatory → shouldn’t need to cross-reference a lot of sources. Only specification document should be sufficient to know about the system

• Specifications should be in domain language

Page 23: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Specification Styles

BDD Style

Tabulated

Format

Page 24: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Specification Styles

Keyword Driven

Style

Page 25: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Gherkin Feature File

Page 26: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Gherkin Primer

Page 27: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Gherkin Primer

Page 28: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Efficacy of Test Automation

Page 29: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Test Pyramid

UI (10%)

Service (20%)

Unit (70%)

Page 30: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

BDD vs Test Pyramid

Page 31: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

How much web testing do you really need?• Automated acceptance criteria, related to business rules or calculations,

are more effectively done directly using the application code rather than via the user interface.

• You only need a web test for two things:

• Illustrating the user’s journey through the system

• Illustrating how a business rule is represented in the user interface

• A good rule of thumb is to ask yourself whether you’re illustrating how the user interacts with the application or underlying business logic that’s independent of the user interface.

• For example, suppose you were testing a user authentication feature.The acceptance criteria might include the following:

• The user should receive feedback indicating the strength of the password entered.

• Only strong passwords should be accepted

Page 32: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

By the way who owns the tests?

Page 33: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

33 CONFIDENTIAL

Collective Test Ownership

Page 34: Specification by Example Explained - Scrum Day India...What is Specification by Example? Collaborative Way of Getting Requirements and Tests. Best way to Collaborate, around ... •Examples

Thank Youwww.agilebuddha.com, www.malonus.in

@LinkedIn - https://www.linkedin.com/in/shrikantv/

@vashishthask