liveBook · Manning

Maintainability

As explained in Effective Behavior-Driven Development

Maintainability is the ease with which software can be understood, modified, corrected, or enhanced.

Maintainability is the ease of understanding, modifying, correcting, or enhancing software. Readable, persistent examples of required behavior can help teams preserve that understanding as people and business needs change. section 1.3.6

Two practices support maintainability in these examples:

  • Automated examples connect stakeholder requirements to delivered behavior and help guard against side effects and regressions. section 1.3.6
  • Centralizing default test values in a readable DomainDefaults class makes automation code more consistent and its decisions clearer. section 14.1
Listing 14.3 Class to keep the defaults and modified step definition
*** Support/DomainDefaults.cs ***
public static class DomainDefaults 
{
  public const string PizzaSize = "Medium"; #A
}

*** StepDefinitions/OrderingStepDefinitions.cs ***
[Given("the customer has placed an order containing a {string} pizza")]
public void GivenTheCustomerHasPlacedAnOrderContaining(string pizzaName)
{
  var order = ... 
  order.AddItem(pizzaName, DomainDefaults.PizzaSize);    #B
  ...
}

See a hard-coded pizza size replaced with a named default in DomainDefaults. section 14.1

How Effective Behavior-Driven Development covers it

How deep it goes
Explains executable verification and one default-data pattern, without detailing broader maintenance practices.
Examples
Uses automated behavior examples and a pizza-ordering test with a centralized Medium size default.
What you can do after
Understand how persistent behavior examples and centralized test defaults can support maintainability.
How it connects
Connects maintainability to Behavior-Driven Development, executable examples, and the Domain Default pattern.

Also explained in

Compare how 10 books explain maintainability →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Effective Behavior-Driven Development. The section links point to the parts of the book it draws on.