HIPAA Compliance Testing: A QA Checklist for Healthcare Apps
Most HIPAA problems in software don't look like hacks. Nobody breaks in. A billing clerk opens a record they never needed, a lab result travels to an analytics vendor in a page URL, or a chart stays open on a clinic comp
Most HIPAA problems in software don't look like hacks. Nobody breaks in. A billing clerk opens a record they never needed, a lab result travels to an analytics vendor in a page URL, or a chart stays open on a clinic computer while the nurse walks away. Each of these is a normal feature doing something nobody tested.
This checklist is the one our QA engineers start from on healthcare web and mobile apps. It turns the HIPAA technical safeguards into checks you can run on staging: who can see which record, how sessions end, what the audit log records and where protected health information (PHI) leaks.
Testing supports compliance; it does not make you compliant. Compliance belongs to the covered entity or business associate and goes well beyond the code, and there is no official HIPAA certification for software. This is a QA checklist, not legal advice.
A typical failure we look for
Picture a patient portal with a "Share my lab results" button that creates a long random link to the PDF, no login needed. The link lands in a shared laptop's history, in an analytics dashboard that records page URLs and in a support ticket, and months later it still opens the PDF. Nobody broke in and every test passed. The checklist below covers each step: PHI in URLs, trackers on logged-in pages and links that never expire.
HIPAA technical safeguards: what they ask of your software
HIPAA doesn't list features. The Security Rule sets safeguards for electronic PHI, and the HIPAA technical safeguards in 45 CFR 164.312 are the part software implements most directly. Each one becomes a set of tests:
| Safeguard (45 CFR) | What we test |
|---|---|
Unique user identification (Required) 164.312(a)(2)(i)
|
No shared accounts. Every view, edit and export is tied to one named user. |
Emergency access procedure (Required) 164.312(a)(2)(ii)
|
A "break-glass" path works when it should, is limited in time and is logged for review. |
Automatic logoff (Addressable) 164.312(a)(2)(iii)
|
Idle sessions end on the server, not only in the UI, after the time your policy sets. |
Encryption and decryption (Addressable) 164.312(a)(2)(iv)
|
Stored PHI, exports and backups are encrypted as your design says. |
Audit controls (Required) 164.312(b)
|
Reads, changes, exports and denied attempts are recorded and can be reviewed. |
Integrity (Required ยท spec addressable) 164.312(c)
|
PHI can't be changed or deleted without a trace. |
Person or entity authentication (Required) 164.312(d)
|
Login, MFA, password reset and API tokens prove who is asking. |
Transmission security (Required ยท specs addressable) 164.312(e)
|
PHI travels over TLS only, and doesn't go out by plain email or SMS against your rules. |
Two administrative safeguards in 164.308, regular review of system activity and monitoring of log-in attempts, also only work if the product records the right events.
"Addressable" doesn't mean optional. Under 164.306(d)(3) you must implement an addressable safeguard if it is reasonable and appropriate, or document why not and use an equivalent measure. For a cloud patient portal, automatic logoff and encryption are almost always expected.
What is changing. HHS proposed a major Security Rule update in January 2025 that would make nearly all safeguards required, including encryption and multi-factor authentication. As of November 2026 it is still a proposal, with a final rule estimated for 2027. Separately, on November 19, 2026, HHS published a final Privacy Rule update that cuts the time to answer a patient's request for their records from 30 to 15 calendar days, with compliance due by July 19, 2027. That one affects your patient export flows (section 5).
A consumer health app that is neither a covered entity nor a business associate may fall under the FTC's Health Breach Notification Rule instead. The checks below are useful either way.
Before you start: what to set up
- Synthetic test data, never real patients. Generate patients with Synthea, an open-source synthetic patient generator, or use data de-identified under the HHS de-identification guidance. A production copy in staging is still PHI.
- A role and permission matrix in writing. Every role (patient, proxy, clinician, nurse, front desk, billing, admin, support) against every data type and action. Most access bugs are gaps between this matrix and the code.
- Test accounts for every role, including two clinicians on different care teams and two patients, so you can test "my record" against "someone else's".
- Read access to audit logs and app logs on staging. Many checks are only visible there.
- A list of every third party that receives data: analytics, error tracking, chat, email and SMS providers, video vendors. Each one needs a business associate agreement if it gets PHI.
1. Access control checklist
Start with the role matrix, then attack it through the API, not only the UI. In our experience the screen is usually right and the API behind it is where records leak.
| Area | What to check | Example |
|---|---|---|
| Patient scope | โข A patient sees only their own records, and a proxy only the patients they are linked to โข Changing an ID in the URL or API returns 403 or 404, never another patient's data โข Lists, search and exports apply the same rule as single records |
Log in as patient 1042, open /lab-results/1042, then change it to 1043. Repeat with the API call the page makes. |
| Roles and care teams | โข Clinicians see their own patients or care team, as your policy says โข Front desk and billing see what their job needs and nothing clinical โข Roles are enforced on the server for every endpoint, not by hiding buttons |
Call the clinical notes endpoint with a front-desk token: expect 403, and an audit event for the attempt. |
| Minimum necessary | โข API responses contain only the fields the role needs โข Hidden columns are not in the JSON, the HTML or the CSV export โข Search results don't show diagnoses in previews or autocomplete |
Open the billing view and read the API response in DevTools: no diagnoses, clinicalNotes or lab values. |
| Emergency access | โข Break-glass access asks for a reason and works only for the allowed roles โข It expires after the set time โข Every use is logged and shows up for review |
Use break-glass on an unassigned patient, wait past the limit, then try again without it. |
2. Login and session checklist
Healthcare apps run on shared computers in clinics and on phones that get lent to family members. Sessions have to end on their own, and logging out has to actually log you out.
| Area | What to check | Example |
|---|---|---|
| Authentication | โข MFA works for the roles that need it, including recovery when a phone is lost โข Password reset doesn't reveal whether an account exists โข Failed logins lock or slow down the account and are logged |
Try 10 wrong passwords: the account slows down or locks, and the attempts appear in the log for review. |
| Automatic logoff | โข An idle session ends after the time your policy sets, on the server and in the UI โข PHI is removed from the screen, not only covered by a dialog โข The Back button doesn't bring the record back from the browser cache |
Open a chart, leave it idle past the limit, then press Back and check the screen and the network tab. |
| Logout and tokens | โข Logout invalidates the session and refresh tokens on the server โข Old tokens stop working after a password change or deactivation โข "Log out of all devices" really does |
Copy the access token, log out, then call the API with the old token: expect 401. |
| Mobile apps | โข The app locks or hides PHI after the set time in the background โข The app switcher preview doesn't show PHI โข Biometric unlock falls back safely when biometrics change |
Open lab results, switch apps, and look at the app switcher preview on iOS and Android. |
3. Audit log checklist
The audit log is how your client answers "who looked at this patient's record?" after a complaint or a breach. If the log only records edits, the answer is "we don't know".
| Area | What to check | Example |
|---|---|---|
| What is recorded | โข Views of records are logged, not only changes โข Exports, prints, downloads and shares are logged โข Denied access attempts and break-glass use are logged |
Open a chart, download a PDF and try a forbidden record: all three appear in the log. |
| What each entry says | โข Who (a unique user ID, never a shared account), what action, which patient, when, from where โข Times are consistent across services, in one time zone or UTC โข The entry itself doesn't copy clinical details it doesn't need |
Compare the log entry time with the request time in your API gateway; they must match within seconds. |
| Protection | โข Nobody, including admins, can edit or delete entries through the app or API โข Access to the log is itself limited and logged โข Log retention matches the period your compliance team set (HIPAA keeps required documentation for 6 years) |
As an admin, send DELETE and PATCH to an audit entry: both must fail. |
4. PHI exposure checklist
This is where we find the most surprises. PHI rarely leaks from the database; it leaks into places nobody thinks of as storage: URLs, logs, notifications and third-party scripts.
| Area | What to check | Example |
|---|---|---|
| URLs and links | โข No names, dates of birth, record numbers or diagnoses in URLs or query strings โข Shared and emailed links need a login or expire quickly and work once โข Pages with PHI send Cache-Control: no-store
|
Click through the portal and read every URL. A link like /results?name=Jordan+Test&test=HIV fails. |
| Trackers on logged-in pages | โข Analytics, pixels and session replay don't receive PHI from logged-in pages or the app โข Page titles and URLs sent to analytics contain no PHI โข Every vendor that does receive PHI has a business associate agreement |
Record network traffic in the portal and search third-party requests for the test patient's name and record number. |
| Logs and error tracking | โข App logs, error trackers and APM don't store request bodies with PHI โข Error messages shown to users don't include other patients' data โข Support tools and screenshots mask PHI |
Trigger a validation error on the intake form and look for the submitted values in your error tracker. |
| Notifications | โข Email, SMS and push texts follow your rules on what they may say โข Lock-screen previews show no diagnosis or result โข Messages go only to verified contacts |
Book a test appointment and read the SMS on a locked phone: "You have a new message", not the clinic specialty and result. |
| Encryption and transport | โข HTTPS only, with HSTS and no mixed content โข Exports, backups and files in storage are encrypted, and storage buckets are not public โข The mobile app doesn't keep PHI in plain files or unencrypted caches |
Request the API over http://: expect a redirect or refusal. Open a file storage URL without a login: expect a denial. |
On trackers, HHS guidance on online tracking technologies says tracking on user-authenticated pages generally has access to PHI, and that information collected by a regulated entity's mobile app is generally PHI. A 2024 court decision vacated the part of that guidance about unauthenticated public pages; the parts about logged-in pages and apps were not vacated. Ask your counsel how it applies to your public pages.
We also check these flows against the OWASP Top 10.
5. Integrity, backup and patient access checklist
| Area | What to check | Example |
|---|---|---|
| Integrity | โข Changes to clinical data keep a history: old value, new value, who, when โข Two people editing one record can't silently overwrite each other โข Files and messages can't be swapped or altered after they are signed or sent |
Open the same allergy list in two tabs, save both: the second save must warn, not overwrite. |
| Backup and restore | โข A restore from backup actually works and the data is complete โข Restored data keeps its access rules and audit history โข The restore time fits your contingency plan |
Restore staging from last night's backup and run the access and audit tests above against it. |
| Patient access | โข Patients can view and download their records in the formats you promise โข Requests and their dates are tracked so the team can answer on time โข Exports contain only that patient's data and are logged |
Request a full export as a test patient: check the content, the format, the log entry and the time stamp of the request. |
Under the Privacy Rule update of November 19, 2026, a covered entity must answer an access request within 15 calendar days instead of 30, with one extension of up to 30 days. The compliance date is July 19, 2027. If your product handles these requests, check that its workflow and reminders match the new deadline.
6. What to automate first
You don't need to automate the whole list. HIPAA checks that run on every release pay off fastest in four places:
- API tests for access by role and by patient. Roles against endpoints, "own" against "other" records. See our API testing approach.
- Audit log checks. One test per key action (view, export, denied attempt). Logging breaks quietly during refactors.
- Session tests. A token must stop working after logout, timeout and deactivation.
- A PHI leak check in the browser. One end-to-end test that walks the portal with a synthetic patient and fails if their name or record number reaches a third-party request or a URL. See test automation.
Keep exploratory testing for new roles, integrations and anything that shares or exports data for the first time.
7. Examples: HIPAA checks in Playwright and Postman
The examples below run against your staging environment with synthetic patients only. Tokens for test roles come from CI secrets. Endpoints such as /api/patients/:id and /api/test/audit are placeholders for your own API; the ideas carry over to any stack.
Access by role and by patient with Playwright. Playwright's test runner works well for API tests. Here each test signs in as a different role and checks both what it may see and what it must not.
Show code: access control tests (Playwright)import { test, expect, request, type APIRequestContext } from '@playwright/test';
// Staging only, synthetic patients only. Tokens for each test role come from CI secrets.
const BASE = process.env.STAGING_API_URL!; // e.g. https://staging-api.example.com
const ASSIGNED = 'test-patient-001'; // assigned to the test clinician
const UNASSIGNED = 'test-patient-002'; // belongs to another care team
async function as(role: 'clinician' | 'billing' | 'patient'): Promise<APIRequestContext> {
return request.newContext({
baseURL: BASE,
extraHTTPHeaders: { authorization: `Bearer ${process.env[`TOKEN_${role.toUpperCase()}`]}` },
});
}
test('a clinician can open an assigned patient, but not another team\'s patient', async () => {
const api = await as('clinician');
expect((await api.get(`/api/patients/${ASSIGNED}`)).status()).toBe(200);
// Changing the ID in the URL must not work. 404 is fine too, if that is your rule.
const other = await api.get(`/api/patients/${UNASSIGNED}`);
expect([403, 404]).toContain(other.status());
});
test('billing sees only what billing needs (minimum necessary)', async () => {
const api = await as('billing');
const res = await api.get(`/api/patients/${ASSIGNED}`);
expect(res.status()).toBe(200);
const body = await res.json();
expect(body).toHaveProperty('insurance');
// Hidden in the UI is not enough: the API must not send these fields at all.
for (const field of ['diagnoses', 'clinicalNotes', 'labResults']) {
expect(body).not.toHaveProperty(field);
}
});
test('a patient cannot read another patient\'s record', async () => {
const api = await as('patient'); // logged in as test-patient-001
const res = await api.get(`/api/patients/${UNASSIGNED}/lab-results`);
expect([403, 404]).toContain(res.status());
});
Audit log and sessions with Playwright. The first test opens a record and then checks that the view was logged and that even an admin can't erase it. The second checks that the server, not just the browser, ends a session.
Show code: audit log and session tests (Playwright)import { test, expect, request } from '@playwright/test';
// /api/test/audit is a placeholder for however your team reads audit events on staging.
const BASE = process.env.STAGING_API_URL!;
const PATIENT = 'test-patient-001';
test('opening a record writes an audit event that cannot be deleted', async () => {
const clinician = await request.newContext({
baseURL: BASE,
extraHTTPHeaders: { authorization: `Bearer ${process.env.TOKEN_CLINICIAN}` },
});
const admin = await request.newContext({
baseURL: BASE,
extraHTTPHeaders: { authorization: `Bearer ${process.env.TOKEN_ADMIN}` },
});
const started = new Date();
expect((await clinician.get(`/api/patients/${PATIENT}`)).ok()).toBeTruthy();
const res = await admin.get('/api/test/audit', {
params: { patientId: PATIENT, since: started.toISOString() },
});
const events: Array<{ id: string; actor: string; action: string; patientId: string; at: string }> =
await res.json();
const read = events.find((e) => e.action === 'read' && e.actor === 'test-clinician-01');
expect(read, 'no audit event for a record view').toBeDefined();
expect(read!.patientId).toBe(PATIENT);
expect(new Date(read!.at).getTime()).toBeGreaterThanOrEqual(started.getTime() - 1000);
// Even an admin must not be able to erase or edit the trail through the API.
expect((await admin.delete(`/api/audit/${read!.id}`)).ok()).toBeFalsy();
expect((await admin.patch(`/api/audit/${read!.id}`, { data: { actor: 'someone-else' } })).ok()).toBeFalsy();
});
test('a token stops working after logout', async () => {
const token = process.env.TOKEN_CLINICIAN_DISPOSABLE!; // a fresh session made for this test
const api = await request.newContext({
baseURL: BASE,
extraHTTPHeaders: { authorization: `Bearer ${token}` },
});
expect((await api.get(`/api/patients/${PATIENT}`)).status()).toBe(200);
expect((await api.post('/api/auth/logout')).ok()).toBeTruthy();
expect((await api.get(`/api/patients/${PATIENT}`)).status()).toBe(401);
});
PHI leaks and automatic logoff in the browser. This test walks the portal as a synthetic patient and fails if their name, record number or date of birth reaches a third-party request or a URL. The second test uses Playwright's clock to jump past the idle limit instead of waiting 15 minutes.
Show code: PHI leak and idle logoff tests (Playwright)import { test, expect } from '@playwright/test';
// Patient portal on staging, logged in as a synthetic patient (storageState from a setup project).
// "Jordan Test" and MRN "TEST-000123" are fake values that exist only in test data.
const PHI_MARKERS = ['Jordan Test', 'TEST-000123', '1984-03-02'];
const OWN_HOSTS = ['staging.example.com', 'staging-api.example.com'];
test('no PHI in URLs or in requests to third parties', async ({ page }) => {
const leaks: string[] = [];
page.on('request', (req) => {
const host = new URL(req.url()).hostname;
if (OWN_HOSTS.includes(host)) return;
const sent = decodeURIComponent(req.url()) + (req.postData() ?? '');
for (const marker of PHI_MARKERS) {
if (sent.includes(marker)) leaks.push(`${marker} -> ${host}`);
}
});
await page.goto('/portal/appointments');
await page.getByRole('link', { name: /lab results/i }).click();
await page.getByRole('button', { name: /download pdf/i }).click();
for (const marker of PHI_MARKERS) {
expect(decodeURIComponent(page.url())).not.toContain(marker);
}
expect(leaks, 'PHI sent to a third party').toEqual([]);
});
test('an idle session logs out and hides the record', async ({ page }) => {
await page.clock.install(); // control timers before the app loads
await page.goto('/portal/lab-results');
await expect(page.getByRole('heading', { name: /lab results/i })).toBeVisible();
// Your idle limit, e.g. 15 minutes. Move time instead of waiting.
await page.clock.fastForward('15:01');
await expect(page).toHaveURL(/\/login/);
await expect(page.getByText('Jordan Test')).toHaveCount(0);
// Back must not bring the record back from the cache.
await page.goBack();
await expect(page.getByText('Jordan Test')).toHaveCount(0);
});
Response checks in Postman. If your team keeps API collections in Postman, add these to the Tests tab of a request that returns PHI and run the collection in CI with Newman: newman run patient-api.postman_collection.json -e staging.postman_environment.json.
// Tests tab of "GET {{baseUrl}}/api/patients/{{patientId}}" called with the billing role token
pm.test('PHI responses are not cached', () => {
pm.expect(pm.response.headers.get('Cache-Control') || '').to.include('no-store');
});
pm.test('HSTS is on', () => {
pm.expect(pm.response.headers.get('Strict-Transport-Security') || '').to.include('max-age=');
});
pm.test('billing gets only the fields billing needs', () => {
const body = pm.response.json();
['diagnoses', 'clinicalNotes', 'labResults', 'ssn'].forEach((field) => {
pm.expect(body, `unexpected field: ${field}`).to.not.have.property(field);
});
});
Start with these tests, run them on every merge, and add one each time an access or logging bug reaches staging.
8. Using AI and MCP tools without leaking PHI
AI assistants can speed up the first draft of these tests. Playwright MCP (@playwright/mcp) lets an assistant walk the portal as a synthetic patient and turn the steps into a test you review; the Postman MCP server can build the role-matrix collection; Synthea keeps everything synthetic, so nothing real reaches a prompt. Three rules matter more than the tool:
- No PHI in prompts, screenshots or logs you share with an AI tool, unless your organization has a business associate agreement with that vendor that covers it.
- Review every generated test. Check that each one fails when access is wrong.
- Use test-role tokens with limited permissions only, never an admin or production credential.
From our projects
One example from our work, without the client's name:
- A U.S. healthcare product with several user roles, web and mobile apps and patient data. Testing was done by developers before each release, and patient-data access rules had never been tested systematically. We built the QA process from scratch, tested web, API and mobile apps on real devices, and added access-control checks against the OWASP Top 10 and accessibility checks against WCAG 2.1 AA to every release. Bugs dropped by 80%. Read the case.
We test web, mobile and API products for healthcare teams, including mobile apps on real devices and accessibility. Book a call to tell us about yours.
FAQ
What is HIPAA compliance testing?
Testing that the safeguards your HIPAA program relies on actually work in the product: access control by role, automatic logoff, audit logs, authentication, encryption in transit and the absence of PHI in URLs, logs and third-party requests. It supports compliance but does not by itself make a product compliant.
Is there an official HIPAA certification for software?
No. HHS does not certify software or vendors as HIPAA compliant. Compliance belongs to the covered entity or business associate and covers risk analysis, policies, business associate agreements and training, not only the code. Testing gives you evidence that the technical safeguards behave as designed.
Can we use real patient data for testing?
Avoid it. Use synthetic data (for example generated with Synthea) or data de-identified under the HIPAA Privacy Rule. A copy of production in staging is still PHI and needs the same protection as production.
Does HIPAA require automatic logoff and encryption?
In the current Security Rule both are addressable implementation specifications. Addressable does not mean optional: you must implement them or document why they are not reasonable and put an equivalent measure in place. HHS has proposed making encryption and multi-factor authentication required, but that update was not final as of November 2026.
Which HIPAA tests should be automated first?
API tests for access by role and by patient, an audit log check for record views and exports, a session test that a token stops working after logout or timeout, and a browser test that no PHI reaches third-party requests on logged-in pages. Run them on every release.
Originally published on the Test Squad blog. Oleksandr Bobyr is a QA expert at Test Squad with more than 6 years in software testing.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.


