Acceptance criteria from the documentation, run on Chicago's licence register
The handover set, written from five public documents before any record was read, holds 8 user stories and 37 acceptance criteria.
The request and the requirements
Shown as frozen before the data.
Written from the published documentation only, the five documents on the method page, before any row of the register was read. The stories and criteria are below; this document says why they exist.
1. The request
A city small-business office asks a vague question: "Can we use the open licence data for our licence speed report?" Two people own the answer.
- The licensing operations lead decides what the office promises new businesses ("most licences are issued within N days") and where to put staff.
- The performance analyst builds and publishes the monthly report.
Narrowed, the question becomes: can the monthly report read the open register as published, or does it need an acceptance step that holds back failing rows first, and which rules must that step apply? The decision it serves is whether to fund that step before the report goes live.
2. Scope
In scope:
- the open register as published (one extract, every record since 2002);
- the stages the register records, from application to expiry, cancellation or revocation;
- the two report measures: days from application to issue for new licences, and the share of renewals filed on time.
Out of scope:
- whether the city is fast or slow (that is the report's job, not this one's);
- fees and inspections (the register holds neither amounts nor inspection results);
- the separate business owners dataset;
- any fix to the source system (the data owner decides fixes; this step only holds rows back and logs why).
3. How the process is meant to work
The business process map follows one licence from application to renewal or end, in four lanes: the applicant, the licensing office, other city departments and finance. Each step that writes a field of the register names it. The data flow diagram shows where those fields are created, copied to the open register each night, checked by the acceptance step and read by the report.
4. Business requirements
- 1. The report shows the median days from application to issue for new licences, by month of issue.
- 2. The report shows the share of renewals filed by the 15th of the month the previous licence expires, the deadline in Municipal Code 4-4-021.
- 3. No record is counted twice, and every record type is counted under its documented meaning.
- 4. A record that breaks a rule is held back with the rule it broke, and the data owner gets the list. Held back rows are counted and the count is published beside each figure.
- 5. The report and its acceptance step read only the published columns. Owner names never appear in the report; they stay in the quarantine log, which only the analyst and the data owner can open.
5. Data requirements
Each data requirement is a user story with its acceptance criteria, listed below. Every criterion quotes the sentence of the documentation it rests on.
| Story | What its criteria check |
|---|---|
| One record, one licence | ids present and unique, a licence number on every record, one owner account and one licence type per licence number |
| Codes agree | each licence code and activity id has one name, only documented record types and status codes, ward and precinct agree, each community area has one name |
| Stage dates in order | application, documents, payment, approval and issue dates present where the process creates them, in process order, none after the extract date, none before 2002 |
| Term rules | start and expiry present, expiry after start, a two or four year term, a period starting on the 15th, in the month of issue |
| Renewals linked | each renewal continues a period of the same licence, periods do not overlap, the renewal is created near its period start |
| Status dated | a status change date exactly on cancelled, revoked and appealed records, and a cancellation inside its term |
| Who and where | a valid zip code, an address, a legal name, a location inside the city when a ward is given |
| Liquor-only steps | conditional approval and location expansion only where liquor is licensed |
6. Acceptance and sign-off
The acceptance round runs every criterion on the full extract as a test script: rows in scope, rows failing, a pass or fail, and the failing row keys written to the quarantine log.
- A criterion passes with no failing row, is within tolerance with failing rows at most 0.1% of its scope, and fails above that. With no row in scope it is not testable.
- A story is accepted when all its criteria pass or are within tolerance. Otherwise its failing rows are held back and the story goes back to the data owner.
- The report may go live on accepted rows when the stories behind its measures (stage dates and term rules for the speed measure, term rules and renewals for the renewal measure) are accepted, or when their failing rows are held back and counted as business requirement 4 says.
Roles: the performance analyst runs the round and owns the checks; the licensing operations lead signs each story; the data owner (Business Affairs and Consumer Protection, as the dataset names it) receives every failure log and owns the fixes.
7. Open questions and assumptions
- Chapter 4-4 says a term is two or four years (4-4-021) and that no licence is granted for longer than two years (4-4-110). The term criterion accepts both terms; the licensing office should say which holds today.
- The chapter 4-4 text used is a 2011 compilation hosted by the city. A rule amended since would show up as a criterion that fails on most rows.
- The documentation does not say what values conditional_approval takes. The conditional approval criterion assumes Y.
- Change of location, capacity, expansion and activity records have no documented term, so the term criteria leave them out.
- The city's extent in the location criterion (41.64 to 42.03 north, 87.52 to 87.95 west) is an assumption, not a published rule.
Business process map
One licence from application to renewal or end, in four lanes. Grey notes name the register field each step writes. Drawn as code, so the download rebuilds it.
Data flow diagram
Where each field is created, copied to the open register each night, checked by the acceptance step and read by the report.
Business case
Written before any row of the register was read. Costs are assumptions, labelled as such; the benefit is measured on the register after the criteria were frozen, on the results page.
The decision
Fund an acceptance step between the open register and the monthly licence speed report, or build the report straight on the register.
Options
| Option | What it does | Cost (assumed) |
|---|---|---|
| A. Report straight on the register | The report reads every published row. | none to build |
| B. Acceptance step (recommended if the rule below holds) | The acceptance criteria run on every refresh; failing rows are held back with their rule, counted beside each figure, and sent to the data owner. | about 8 analyst days to build, 2 analyst hours a month to read the failure log; at an assumed US$75 an hour, about US$4,500 once and US$1,800 a year |
| C. Clean the source | The data owner fixes the records at source. | not priced; the data owner's call, informed by B's failure log |
The rule that decides it (declared before the data)
Fund option B when, on the extract, holding back the failing rows moves either measure in any of the five most recent full years (2021 to 2025) by at least:
- 1 day in the median days from application to issue for new licences, or
- 1 percentage point in the share of renewals filed on time,
or when more than 1% of the rows a measure reads would be held back. Otherwise build option A and run the checks monthly as an alarm only.
Risks
- A wrong published figure is corrected in public; the cost is credibility, which this case does not price.
- The acceptance step can hold back good rows when a requirement is wrong. Criteria that fail on a fifth or more of their rows are treated as a wrong requirement to rewrite, not as bad data.
- The documentation is partly a 2011 compilation, so some rules may be out of date.
Stories and acceptance criteria
Each criterion quotes the sentence of the documentation it rests on. The tester runs it as a query on the full register.
One record, one licence
As the performance analyst, I want every record and every licence identified once, so that monthly counts of new licences are not doubled.
| Criterion | Given | Then | The rule it rests on |
|---|---|---|---|
| Record id present and unique | Any record | Its id is present and no other record has the same id | A calculated ID for each record. |
| Licence id present and unique | Any record | Its license_id is present and no other record has the same license_id | An internal database ID for each record. |
| Licence number on every record | Any record | It carries a license_number | Each license has a single license number that stays consistent throughout the lifetime of the license. |
| One owner account per licence number | All records of one license_number | They carry one account_number (the owner cannot change) | No transfer of ownership shall be allowed on any license. |
| One licence type per licence number | All records of one license_number | They carry one license_code (one licence, one type) | Each license has a single license number that stays consistent throughout the lifetime of the license. |
Codes agree
As the performance analyst, I want codes and their names to agree, and only documented codes, so that the report groups licence types and record types the same way every month.
| Criterion | Given | Then | The rule it rests on |
|---|---|---|---|
| Each licence code has one name | All records with one license_code | They carry the same license_description; rows with a description other than the code's most common one fail | Each code value corresponds to a specific LICENSE DESCRIPTION value. |
| Each activity id has one name | All records with one business_activity_id | They carry the same business_activity; rows with an activity other than the id's most common one fail | Each ID value corresponds to a specific BUSINESS ACTIVITY value. |
| Only documented record types | Any record | Application_type is one of ISSUE, RENEW, C_LOC, C_CAPA, C_EXPA, C_SBA | is a change of business activity record. |
| Only documented status codes | Any record | License_status is one of AAI, AAC, REV, REA | means the license revocation has been appealed. |
| Ward and precinct agree | A record with a ward and a precinct | Ward_precinct is present and holds that ward, then that precinct | The ward and precinct where the business is located. |
| Each community area has one name | All records with one community_area | They carry the same community_area_name; rows with a name other than the area's most common one fail | Community Area Name |
Stage dates in order
As the licensing operations lead, I want each record's stage dates present and in process order, so that days from application to issue is a real duration.
| Criterion | Given | Then | The rule it rests on |
|---|---|---|---|
| New licences carry an application date | A record that is not a renewal | Application_created_date is present | The date the business license application was created. |
| Renewals carry no application date | A renewal record | Application_created_date is empty | RENEW type records do not have an application. |
| Documents-complete date on every record | Any record | Application_requirements_complete is present (documents received, or the renewal record created) | For all application types except RENEW, this is the date all required application documents were received. |
| Application on or before documents complete | A non-renewal record with both dates | The application was created on or before the day its documents were complete | For all application types except RENEW, this is the date all required application documents were received. |
| Documents complete on or before approval | A record with both dates | Documents were complete on or before the day the licence was approved for issuance | This is the date the license was ready for issuance. |
| Approval on or before issue | A record with both dates | The licence was approved for issuance on or before the day it was issued | This is the date the license was ready for issuance. |
| Fee paid on or before issue | A record with both dates | The fee was paid on or before the day the licence was issued | Some license types require renewal inspections after license payment but before the license certificate can be issued. |
| Issue date on every record | Any record (the register holds issued licences) | Date_issued is present | Business licenses issued by the Department of Business Affairs and Consumer Protection in the City of Chicago from 2002 to the present. |
| No past-event date after the extract | Any record | No stage date that records a past event (created, complete, payment, approved, issued, status change) is later than the extract date | Frequency: Data is updated daily. |
| Issued in 2002 or later | A record with an issue date | It was issued on or after 1 January 2002 | Time Period: January 1, 2002 to present. |
Term rules
As the licensing operations lead, I want each licence period to follow the term rules, so that expiry and renewal dates can be trusted.
| Criterion | Given | Then | The rule it rests on |
|---|---|---|---|
| Start and expiry dates present | Any record | License_start_date and expiration_date are both present | a licensee may elect to have the term of a license expire at the end of two years or four years |
| Expiry after start | A record with both dates | The licence expires after it starts | a licensee may elect to have the term of a license expire at the end of two years or four years |
| A two or four year term | A new or renewal record with both dates | The term is two years (699 to 822 days, which allows an initial licence issued up to 90 days into a period) or four years (1,430 to 1,553 days) | a licensee may elect to have the term of a license expire at the end of two years or four years |
| Period starts on the 15th | A new or renewal record with a start date | The licence period starts on the 15th of a month | shall begin on the 15th day of the month the license was originally issued. |
| New licence starts in its month of issue | A new licence issued from 2011 on | Its period starts in the month it was issued | shall begin on the 15th day of the month the license was originally issued. |
Renewals linked
As the performance analyst, I want each renewal linked to the period it continues, so that on-time renewal can be measured.
| Criterion | Given | Then | The rule it rests on |
|---|---|---|---|
| Each renewal continues an earlier period | A renewal record | Another record of the same license_number expires within the three days before this period starts | may renew any license at the beginning of a new license period upon proper application and payment of the required fee. |
| Periods of one licence do not overlap | The new and renewal records of one license_number, in start order | No period starts before the previous one has expired | may renew any license at the beginning of a new license period upon proper application and payment of the required fee. |
| Renewal created near its period start | A renewal record with both dates | The renewal record was created no more than 90 days before its period starts and no more than 92 days after (the late window before a new application is needed) | Licenses may be renewed beginning 45 days prior to the renewal application dates provided in this section. |
Status changes dated
As the licensing operations lead, I want cancellations, revocations and appeals dated, so that active licences are counted right.
| Criterion | Given | Then | The rule it rests on |
|---|---|---|---|
| Status change dated exactly when cancelled, revoked or appealed | Any record | License_status_change_date is present exactly when the status is AAC, REV or REA | This date corresponds to the date a license was cancelled (AAC), revoked (REV) or appealed (REA). |
| Cancellation inside the term | A cancelled record with its dates | The cancellation date falls between the licence start and expiration | means the license was cancelled during its term. |
Who and where
As a report reader, I want each licence to say who holds it and where it is, so that the report can be cut by area.
| Criterion | Given | Then | The rule it rests on |
|---|---|---|---|
| Zip code of five or nine digits | A record with a zip code | Zip_code is five digits, optionally followed by a hyphen and four digits | The business location address and square footage |
| Address present | Any record | Address is present | All such licenses so issued shall bear the seal of the city, the name of the licensee, address, |
| Location inside the city when a ward is given | A record with a ward (so inside the city) | Latitude and longitude are present and inside the city's extent (41.64 to 42.03 north, 87.52 to 87.95 west; an assumption, not a published rule) | The ward where the business is located. |
| Legal name present | Any record | Legal_name is present | All such licenses so issued shall bear the seal of the city, the name of the licensee, address, |
Liquor-only steps
As the licensing operations lead, I want liquor-only steps to appear only on liquor licences, so that liquor processing times are not mixed with others.
| Criterion | Given | Then | The rule it rests on |
|---|---|---|---|
| Conditional approval only on liquor licences | A record marked for conditional approval (value Y) | The licence is a liquor licence (its description names liquor) | This pertains to applications that contain liquor licenses. |
| Expansion records only with a liquor licence | A location expansion record (C_EXPA) | The same account and site hold a liquor licence in the register | only applies to businesses that have liquor licenses. |
The summaryThe artefactsAcceptance round and resultsA second authorMethod and glossary