Specification by Example (SBE) How successful teams deliver the right software

Get Started. It's Free
or sign up with your email address
Rocket clouds
Specification by Example (SBE) How successful teams deliver the right software by Mind Map: Specification by Example (SBE)  How successful teams deliver the right software

1. Benifits

1.1. Implementing changes more efficiently

1.2. Higher product quality

1.3. Less rework

1.4. Better alignment of the activities of different roles on a project

2. Key Process Patterns

2.1. Deriving scope from goals

2.1.1. Building the right scope Understand the "WHY" and "WHO" Understanding why something is needed and who needs it is crucial to evaluating a suggested solution. Understand where the value is coming from Understand what outputs the business users expect Instead of trying to collaborate with business users on specifying how to put things into the system, we should start with examples of outputs. This helps engage business users in the discussion and gives them a clear picture of what they’ll get out of the system. Ask how something would be useful Instead of a technical feature specification, we should ask for a high-level example o f h ow a feature would be useful. This will point us towards the real problem. Ask for an alternative solution This helps business users to express the value of a given feature.

2.2. Specifying Collaboratively

2.2.1. All team workshops (when-starting out with SBE example - JPBR)

2.2.2. Collaborate with the development team.

2.2.3. Pair writing the SBE

2.2.4. Try informal conversations - Face-to-face conversation is considered best.

2.2.5. Involve stakeholders

2.2.6. Undertake detailed preparation and review up front (When: Remote stakeholders)

2.2.7. Don't Hinder discussion by over-preparing

2.3. Illustrating specifications using examples

2.3.1. Examples should be precise Don’t have yes/no answers in your examples (When: The underlying concept isn’t separately defined) Avoid using abstract classes of equivalence (When: You can specify a concrete example)

2.3.2. Examples should be complete Experiment with data Ask for an alternative way to check the functionality (When: Complex/legacy infrastructures)

2.3.3. Examples should be realistic Avoid making up your own data (When: Data-driven projects) Get basic examples directly from customers (When: Working with enterprise customers)

2.3.4. Examples should be easy to understand Avoid the temptation to explore every combinatorial possibility Look for implied concepts

2.3.5. Illustrating nonfunctional requirements Get precise performance requirements (When: Performance is a key feature) Use a checklist for discussions (When: Cross-cutting concerns) Build a reference example (When: Requirements are impossible to quantify)

2.4. Refining the specifications

2.4.1. What to focus on when refining specifications Examples should be precise and testable Scripts are not specifications Don’t create flow-like descriptions Specifications should be about business functionality, not software design Avoid writing specifications that are tightly coupled with code Resist the temptation to work around technical difficulties in specifications (When: Working on a legacy system) Don’t get trapped in user interface details (When: Web projects) Specifications should be self-explanatory Don’t overspecify examples Start with basic examples; then expand through exploring (When: Describing rules with many parameter combinations) Specifications should be focused Use “Given-When-Then” language in specifications In order to: Make the test easier to understand Don’t explicitly set up all the dependencies in the specification (When: Dealing with complex dependencies/referential integrity) Apply defaults in the automation layer Don’t always rely on defaults (When: Working with objects with many attributes) Specifications should be in domain language

2.5. Automating validation without changing specifications

2.5.1. Starting with automation To learn about tools, try a simple project first (When: Working on a legacy system) Plan for automation upfront Don’t postpone or delegate automation Avoid automating existing manual test scripts Gain trust with user interface tests (When: Team members are skeptical about executable specifications)

2.5.2. Managing the automation layer Don’t treat automation code as second-grade code Describe validation processes in the automation layer Don’t replicate business logic in the test automation layer Automate along system boundaries (When: Complex integrations) Don’t check business logic through the user interface Automate below the skin of the application (When: Checking session and workflow constraints)

2.5.3. Automating user interfaces Specify user interface functionality at a higher level of abstraction Check only UI functionality with UI specifications (When: User interface contains complex logic) Avoid recorded UI tests Set up context in a database

2.5.4. Test data management Avoid using prepopulated data (When: Specifying logic that’s not data driven) Try using prepopulated reference data (When: Data-driven systems) Pull prototypes from the database (When: Legacy data-driven systems)

2.6. Validating the system frequently

2.6.1. Reducing unreliability Find the most annoying thing, fix it, and repeat (When: Working on a system with bad automated test support) Identify unstable tests using CI test history When: Retrofitting automated testing into a legacy system Set up a dedicated continuous validation environment Employ fully automated deployment Create simpler test doubles for external systems (When: Working with external reference data sources) Selectively isolate external systems (When: External systems participate in work) Try multistage validation (When: Large/multisite groups) Execute tests in transactions (When: Executable specifications modify reference data) Run quick checks for reference data (When: Data-driven systems) Wait for events, not for elapsed time Make asynchronous processing optional (When: Greenfield projects) Don’t use executable specifications as end-to-end validations (When: Brownfield projects)

2.6.2. Getting feedback faster Introduce business time (When: Working with temporal constraints) Break long test packs into smaller modules Avoid using in-memory databases for testing (When: Data-driven systems) Separate quick and slow tests (When: A small number of tests take most of the time to execute) Keep overnight packs stable (When: Slow tests run only overnight) Create a current iteration pack Parallelize test runs (When: You can get more than one test environment) Try disabling less risky tests When: Test feedback is very slow

2.6.3. Managing failing tests Create a known regression failures pack Automatically check which tests are turned off (When: Failing tests are disabled, not moved to a separate pack)

2.7. Evolving living documentation

2.7.1. Living documentation should be easy to understand Don’t create long specifications Don’t use many small specifications to describe a single feature Look for higher-level concepts Avoid using technical automation concepts in tests (When: Stakeholders aren’t technical)

2.7.2. Living documentation should be consistent Evolve a language Base the specification language on personas When: Web projects Collaborate on defining the language (When: Choosing not to run specification workshops) Document your building blocks

2.7.3. Living documentation should be organized for easy access Organize current work by stories Reorganize stories by functional areas Organize along UI navigation routes When: Documenting user interfaces Organize along business processes When: End-to-end use case traceability required Use tags instead of URLs when referring to executable specifications (When: You need traceability of specifications)

2.7.4. Listen to your living documentation

3. Living Documentation

3.1. Why we need authoritative documentation

3.1.1. Need to know what system does (what is the business functionality)

3.1.2. Easy and cheap to maintain

3.1.3. Documentation can be kept consistent with the system functionality even if the underlying programming language code is changed frequently

3.2. Tests can be good documentation

3.3. Creating documentation from executable specifications

3.4. Benefits of the documentation centric model