๐ก๏ธ Data Integrity Hub
Employee directory with intentional UI data corruption for data integrity testing practice.
Overview
Data Integrity Hub exposes a clean dataset of 50 employee records via API and CSV download. The web UI, however, intentionally renders corrupted versions of 3 specific records. The core practice is comparing these three data sources โ API JSON, CSV file, and the rendered HTML table โ and identifying the discrepancies.
This app is designed for data migration testing, ETL validation, and learning to write tests that catch subtle data corruption (wrong values, typos, missing rows).
/api/datahub
x-api-key: <your-key>
/datahub.html
50 employees (API) / 49 (UI)
Quick Start
curl https://qacloud.dev/api/datahub/employees \ -H "x-api-key: YOUR_KEY" | jq '.employees | length' # โ 50 curl https://qacloud.dev/api/datahub/employees/csv \ -H "x-api-key: YOUR_KEY" -o employees.csv wc -l employees.csv # โ 51 (50 rows + header)
Dataset Overview
The dataset contains 50 employees with department IDs d001โd050. Each record has the following fields:
- id โ string, format
d001โd050 - name โ full name string
- department โ department name string
- role โ job title string
- email โ email address string
- active โ boolean, employment status
- salary โ integer, annual USD
- hire_date โ ISO date string (YYYY-MM-DD)
Sample Record (Clean โ from API)
{
"id": "d001",
"name": "Alice Johnson",
"department": "Engineering",
"role": "Senior Engineer",
"email": "alice.johnson@example.com",
"active": true,
"salary": 120000,
"hire_date": "2019-03-15"
}
Intentional Bugs
Three records are deliberately corrupted in the UI rendering. The API and CSV always return clean data for these records.
API vs UI Diff Summary
| ID | Name | Field | API / CSV Value | UI Value |
|---|---|---|---|---|
d005 | Emma Wilson | active | true | false |
d012 | Elizabeth Murphy | name | "Elizabeth Murphy" | "Elizabet Murphy" |
d029 | Benjamin Green | row exists | present (row 29) | absent (deleted) |
All other 47 records are identical across API, CSV, and UI.
API Reference
Returns the complete, uncorrupted employee list. Always 50 records.
{
"employees": [
{
"id": "d001",
"name": "Alice Johnson",
"department": "Engineering",
"role": "Senior Engineer",
"email": "alice.johnson@example.com",
"active": true,
"salary": 120000,
"hire_date": "2019-03-15"
},
...
]
}
Filter by department or active status using query params: ?department=Engineering ?active=true
Returns a CSV file with the header row + 50 data rows. Total line count = 51.
Response headers: Content-Type: text/csv, Content-Disposition: attachment; filename="employees.csv"
id,name,department,role,email,active,salary,hire_date d001,Alice Johnson,Engineering,Senior Engineer,alice.johnson@example.com,true,120000,2019-03-15 d002,Bob Chen,Marketing,Marketing Analyst,bob.chen@example.com,true,85000,2020-07-22 ...
This CSV is always clean โ no corruptions. Use it as the reference data to diff against the UI.
Test Cases
Steps: GET /employees โ check employees.length === 50. Response should include all IDs d001โd050.
Steps: Download CSV โ count lines โ expect 51. Verify first line is the header row.
Steps: Open the UI. Count visible rows in the employee table โ expect 50, actual is 49. Verify d029 (Benjamin Green) is missing from the rendered table.
Steps: GET /employees โ find d005 โ verify active === true. This is the clean/correct value.
Steps: Open UI. Find Emma Wilson (d005). Check the Active/Inactive badge โ it shows "Inactive" (active: false). The API says true โ this is Bug 1.
Steps: GET /employees โ find d012 โ verify name is exactly "Elizabeth Murphy" (with 'h').
Steps: Open UI. Find employee d012. Read the displayed name โ should be "Elizabeth Murphy" but displays as "Elizabet Murphy" (Bug 2).
Steps: Download CSV โ check that d005 shows active=true, d012 shows "Elizabeth Murphy" (correct spelling), and d029's row exists.
QA Tasks
?department=X response count.