AAmit’s LibraryLEARN · PRACTISE · REFLECT

Quality and reliability × Software engineering

Business lens: Quality and reliability · Technology lens: Software engineering

Reading scope: Original synthetic teaching; selected primary background and same-author checks are not independent validation.

Quality is specified behaviour across change

A fictional booking service introduces a revised cancellation workflow. Software quality means the system implements the agreed behaviour under relevant conditions and remains understandable when changed. A release can pass a few visible examples while failing an unusual but important state. Begin with the customer's permitted action, the business consequence and the expected stored result. Developers need a specification they can challenge, not an instruction to make the screen look right. Managers need to know what was tested and what remains uncertain. A reliable release process connects requirements, implementation, verification and correction rather than treating testing as an isolated final ceremony.

Make requirements interoperable

Customer Service explains common cancellation requests, Operations identifies reserved capacity and Finance defines the intended payment disposition. The product owner resolves disagreements and the development team maps the states into software. Consultation should include exceptions such as an already-cancelled booking or a request arriving during another update. Keep one agreed state model and identify who authorises a change. An attractive interface can promise cancellation while the stored reservation remains active. End-to-end verification should therefore include the relevant record and downstream handoff, not only a button response. Document which dependencies are simulated and which are actually exercised.

Worked verification set

An invented release has 36 specified scenarios. Twenty-seven pass, six fail and three have not been run. Passed coverage is 27/36, or 75%. Executed coverage is 33/36, approximately 91.67%; the pass proportion among executed scenarios is 27/33, approximately 81.82%. These different denominators must remain labelled. A correction makes four failed scenarios pass on repetition, and regression checks confirm that the previous passes remain valid. Passed coverage becomes 31/36, approximately 86.11%. Two failures and three unrun scenarios remain. The numbers describe this finite scenario set and do not establish a universal probability of defect-free behaviour.

Use failure cases to improve the design

A failure should be tied to a requirement, operating condition and observed result. If the expected result itself was wrong, revise the requirement through the agreed owner and explain the change before rerunning the test. Do not edit the expectation merely to match the implementation and call that a fix. Python's free unittest documentation is selected background for organising checks, not a substitute for choosing useful scenarios. Include a repeated request and a partially completed handoff when they matter to the booking workflow. A regression check should protect behaviours that the correction might unintentionally change, rather than repeating unrelated tests for a reassuring count.

Contract lesson extension

Use the existing API-contract lesson to represent cancellation states and required confirmations. Write the 36-scenario ledger, then develop four correction-and-verification narratives. If the learner actually executes code, record the input, version and observed output separately from the invented totals. This reading does not provide a new downloadable test suite or execute a booking service. Its portfolio is a traceable requirement-to-test map and release decision memo. Include a stated limitation for an external dependency not exercised in the lesson. A release recommendation can be conditional, with explicit remaining cases and owners, rather than pretending every requirement has already been verified.

Question-word release reasoning

Who owns the requirement and Whom does a cancellation failure affect? Whose expectation defines the stored result? What state is permitted, Where is the downstream change checked and When is regression verification performed? Why does executed coverage exceed passed coverage? Which unrun scenario could change the release decision? How will teams communicate a changed requirement? These questions give testing a business purpose. A local startup may use a small scenario ledger, while a global service needs more extensive coordination; the same principle holds that completed activity is not the same as demonstrated behaviour and a passing interface is not the whole workflow.

Learning progression and research

Foundation learners explain a booking's cancellation states. Undergraduate learners calculate the three initial proportions and the four-scenario correction. Postgraduate learners critique requirement changes, simulated dependencies and regression selection. Research learners investigate whether a shared state model reduces repeat defects or handoff failures, using comparable releases and acknowledging selection effects. A DBA study could examine how consultation improves requirements quality rather than assuming more tests necessarily mean better outcomes. Revision should present a changed specification and ask which expectations need review. The learner should retain the connection between meaningful requirements, independent expected results and a proportionate release conclusion.

Study questions and answers

How do the initial test proportions differ?

Passed coverage is 75%; executed coverage is 33/36 ≈ 91.67%; among executed scenarios, 27/33 ≈ 81.82% pass.

Marking guide: Credit 75% all-case pass,91.67% executed and 81.82% conditional pass.

What is passed coverage after four verified corrections?

31/36 ≈ 86.11%, with two failures and three unrun scenarios remaining. Previous passes must remain valid through relevant regression checks.

Marking guide: Credit 31/36=86.11%, two failures, three unrun; require relevant regression evidence for previous passes.

When may an expected test result change?

When an authorised requirement review establishes the original expectation was wrong or the requirement changed. Matching the implementation alone is not justification.

Marking guide: Change expected results only after authorised requirement review, not simply to match implementation.

Practice task

Map 36 cancellation scenarios to requirements, correction evidence and a conditional release decision.

Practice bridge

  1. Map 36 cancellation scenarios to requirements, correction evidence and a conditional release decision.
  2. Reproduce the stated arithmetic, change one valid assumption and distinguish actual lesson observations from the invented case.

Open connected lab

Boundary: Original synthetic teaching connected to an existing bounded or guided lesson. No new executable fixture, catalogue lab or external platform execution claimed.

Sources and further reading

  • Python unittest documentation
    Scope: Selected explicit-test organisation background; useful checks depend on appropriate independently derived expectations.
    Access: Free selected official background; no certificate or enrolment claim.

Related chapters

Interactive practice

Open workshop · Open runnable practice · Open lab lab-24

Open interactive matrix reading