liveBook · Manning

Consistency

As explained in Software Testing with Generative AI

Consistency is a quality characteristic concerning whether software and its data behave uniformly across equivalent inputs, operations, and uses.

Consistency is a software quality characteristic: equivalent inputs, operations, and uses should produce uniform behavior. It helps turn vague requirements into questions about validation, data handling, and repeatable outcomes. section 4.4.1

Use consistency to examine:

  • Whether equivalent project names are treated uniformly, including differences in capitalization. section 4.4.5
  • Whether data structures permit values that later operations cannot handle reliably, such as null keys. section 4.4.5
  • Whether requirements clarify how time entries are validated and interpreted. section 4.4.1

Timesheet manager

A timesheet accepts a project name and duration. The implementation rejects null project names and nonpositive durations, but a consistency review also considers capitalization and the treatment of existing entries. Normalizing names to lowercase and using a map operation that supplies a default value illustrate possible responses to inconsistent project lookup and storage.

How Software Testing with Generative AI covers it

How deep it goes
Develops consistency through structured questions, Java code-risk analysis, and concrete handling of names, keys, and durations.
Examples
Uses a timesheet user story, half-hour durations, project-name validation, a HashMap, and lowercase normalization as concrete examples.
What it assumes
Assumes a user story or Java implementation to analyze, while prompting explicitly for quality characteristics and output structure.
What you can do after
Diagnose consistency risks with ChatGPT by supplying requirements or Java code and requesting formatted questions or risk explanations.
How it connects
Connects consistency with software testing, accuracy, validation, requirements clarification, Java collections, and refactoring.

Also explained in

Compare how 20 books explain consistency →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Software Testing with Generative AI. The section links point to the parts of the book it draws on.