Browse the Knowledge Hub74 resources
Test cases
Consent test cases, for the scripts that fire before you agree
Twenty eight cases covering non essential cookies and tracking requests before consent, reject parity with accept, defaults off, granular categories, withdrawal taking effect immediately, tag manager bypass, gated embeds, misclassified essential cookies, cached banners and server side forwarding.
All 28 test cases, ready to copy
Free to use and adapt, no sign-up. Download as CSV or Markdown, or copy it straight into your own tooling.
Last updated
28 worked examples
Set no non essential cookie before consent
TypeSecurityPriorityHigh- Test data
- A first visit with the banner displayed and no interaction, inspected in the storage panel
- Expected result
- Only strictly necessary cookies are present. Anything analytics, advertising or personalisation related before a choice is the primary compliance failure.
Fire no tracking request before consent
TypeSecurityPriorityHigh- Test data
- A first visit inspected in the network panel, including requests made by a tag manager
- Expected result
- No request to an analytics or advertising endpoint. Blocking the cookie while still sending the request does not make the request lawful.
Make refusal as easy as acceptance
TypeFunctionalPriorityHigh- Test data
- The first layer of the banner, compared for prominence and click count
- Expected result
- Reject all is available on the same layer with equal prominence to accept all, and refusing does not require visiting a second screen.
Default every optional category to off
TypeSecurityPriorityHigh- Test data
- The preference panel opened on a first visit
- Expected result
- All optional categories are off before a choice is made, since a pre-ticked box is not consent under any of the regimes that require it.
Apply granular category choices exactly
TypeFunctionalPriorityHigh- Test data
- Accept analytics, reject advertising, then inspect cookies and network requests
- Expected result
- Analytics loads and advertising does not, per category rather than treating any acceptance as full acceptance.
Withdraw consent and stop processing immediately
TypeStatePriorityHigh- Test data
- Accept everything, then withdraw, without reloading the page
- Expected result
- Tracking stops in the current session rather than only on next load, and previously set cookies for the withdrawn categories are deleted.
Delete cookies belonging to a withdrawn category
TypeStatePriorityHigh- Test data
- Withdraw a category, then inspect cookies, local storage and session storage
- Expected result
- Identifiers for that category are removed from all three, since leaving them means the processing continues on the next visit.
Make withdrawal reachable at any time
TypeFunctionalPriorityHigh- Test data
- Look for a persistent way to reopen preferences from any page
- Expected result
- A visible, keyboard reachable control exists on every page, since consent must be as easy to withdraw as it was to give.
Persist the choice across pages and sessions
TypeStatePriorityHigh- Test data
- Make a choice, navigate several pages, close the browser and return
- Expected result
- Banner does not reappear and the recorded choice is applied, since re-prompting a user who already refused is a nudge toward acceptance.
Re-prompt only when the basis changes
TypeStatePriorityMedium- Test data
- A new vendor or category added after a choice was recorded
- Expected result
- Re-consent is requested for the new element only, and an existing refusal is not reset to a default by the change.
Expire consent after the stated period
TypeBoundaryPriorityMedium- Test data
- A recorded choice aged past the documented validity period
- Expected result
- Consent is requested again at the stated interval rather than treated as permanent, and the previous choice is not silently carried forward.
Record proof of the consent given
TypeSecurityPriorityHigh- Test data
- Accept a subset of categories and inspect the stored record
- Expected result
- Record captures which categories, the policy version, the timestamp and the method, since demonstrating consent requires evidence rather than an assurance.
Apply the correct regime by location
TypeBoundaryPriorityHigh- Test data
- A visit from a region requiring prior consent and one from a region permitting opt out
- Expected result
- Correct model applied, and a detection failure defaults to the stricter regime rather than the more permissive one.
Honour a global privacy signal
TypeSecurityPriorityHigh- Test data
- A browser sending a recognised opt out preference signal
- Expected result
- Treated as a refusal for the categories it covers, without requiring the user to interact with the banner at all.
Block scripts loaded through a tag manager
TypeSecurityPriorityHigh- Test data
- A tag manager container with tags for each category, before and after consent
- Expected result
- Tags fire only for consented categories. A tag manager loading its own container and then injecting tags is the usual route by which consent is bypassed.
Gate embedded third party content
TypeSecurityPriorityHigh- Test data
- An embedded video, map, chat widget and social button before consent
- Expected result
- Each is blocked with a placeholder offering to load it, since an embed sets its own cookies the moment it renders.
Keep the site fully usable after refusal
TypeNegativePriorityHigh- Test data
- Reject everything, then complete a purchase, a sign in and a form submission
- Expected result
- Every core journey works. A feature that breaks on refusal is a penalty for refusing, and it makes the consent invalid.
Do not block content behind acceptance
TypeNegativePriorityHigh- Test data
- Attempt to read the page without interacting with the banner
- Expected result
- Content is reachable or the wall is a documented and lawful choice, and the banner does not obscure the privacy policy it refers to.
Keep essential cookies genuinely essential
TypeSecurityPriorityHigh- Test data
- The list of cookies classified as strictly necessary
- Expected result
- Each is required for the service to function, and no analytics or advertising identifier is misclassified as essential to avoid needing consent.
Declare every cookie accurately
TypeFunctionalPriorityHigh- Test data
- The cookie declaration compared against cookies actually observed
- Expected result
- Every observed cookie is listed with purpose, provider and duration, and no undeclared cookie is set. Drift between the two is the common audit finding.
Apply consent consistently across subdomains
TypeBoundaryPriorityHigh- Test data
- A choice made on the main domain, then a visit to a subdomain and a separate regional domain
- Expected result
- Documented scope is applied consistently, and the user is not asked twice within one scope or tracked on a subdomain that never asked.
Handle the consent script failing to load
TypeNegativePriorityHigh- Test data
- Block the consent management script, including via an ad blocker
- Expected result
- Non essential scripts stay blocked, since failing open means every user with a blocker is tracked without consent.
Avoid a layout shift when the banner appears
TypePerformancePriorityMedium- Test data
- First paint through to banner render, measured for layout stability
- Expected result
- Banner does not push content and does not delay the largest contentful element beyond the stated budget.
Serve the banner correctly from a cache
TypeStatePriorityHigh- Test data
- A page served from an edge cache to a consented and a non consented visitor
- Expected result
- Consent state is evaluated per visitor rather than baked into the cached response, so one visitor choice is not served to another.
Handle consent inside an embedded browser
TypeCompatibilityPriorityMedium- Test data
- The banner in an in app browser and in a private window with storage restricted
- Expected result
- Banner renders and a choice can be made and applied for the session, rather than failing and defaulting to acceptance.
Localise the banner and the declaration
TypeCompatibilityPriorityMedium- Test data
- The banner in each supported language
- Expected result
- Text, category names and the cookie declaration are translated, since consent given against text the user cannot read is not informed.
Reflect the choice in downstream systems
TypeStatePriorityHigh- Test data
- Reject advertising, then inspect what is sent to marketing and analytics platforms server side
- Expected result
- Server side forwarding respects the choice too, since blocking the browser script while the server still forwards the event changes nothing legally.
Operate the banner with a keyboard and a screen reader
TypeAccessibilityPriorityHigh- Test data
- Keyboard only navigation through the banner, the preference panel and each toggle
- Expected result
- Banner receives focus, every option including reject is reachable in a logical order, toggle state is announced, and focus is not trapped after a choice is made.
What goes in each field
ID
RequiredStable identifier, prefixed by module.
Test case
RequiredWhat is being verified, in one line.
Type
Functional, negative, boundary, security, state, performance, accessibility or compatibility. Use it to check coverage is spread rather than clustered on the happy path.
Priority
Risk based, weighted by regulatory exposure. Anything that sets a non essential cookie or fires a tracking request before consent, or makes refusal harder than acceptance, is High.
Test data
The specific values, including the invalid and boundary ones.
Expected result
RequiredThe precise observable outcome, including message text where the wording itself is the requirement.
Open the network panel on a first visit
Two of these are what regulators actually act on, and both are visible in under a minute without touching the code.
Load the page and touch nothing
Any analytics or advertising request, or any non essential cookie, before a choice is made. Blocking the cookie while still sending the request does not make it lawful.
Count the clicks to refuse
Reject all has to sit on the same layer with equal prominence to accept. If refusing needs a second screen, the consent you collect is not freely given.
Block the consent script itself
With an ad blocker, which a large minority of users run. If non essential scripts then load anyway, everyone with a blocker is tracked without consent.
Reject, then watch the server
Server side forwarding to marketing and analytics platforms respects the choice too. Blocking the browser script while the server still sends the event changes nothing.
Why consent banners fail an audit
Almost every consent finding comes down to one of two things, and both are trivial to check. The first is processing that happens before a choice is made: a cookie set, or a request sent to an analytics or advertising endpoint, on a first visit with the banner still on screen. Blocking the cookie while allowing the request is a common half measure that does not help, because the request itself carries an identifier and an address. The second is asymmetry: accept on the first layer and reject buried behind a second screen. Consent obtained that way is not freely given, and the fix is a layout change rather than an engineering one.
Withdrawal is where implementations quietly fall short. Stopping tracking only on the next page load means the current session continues to be processed after the user said stop. Leaving the previously set identifiers in cookies, local storage and session storage means processing resumes on the next visit regardless of the recorded choice. And a withdrawal control that only exists in a footer link on the homepage is not as easy to reach as the banner that collected the consent.
The bypass routes are the technically interesting part. A tag manager that loads its own container and then injects tags will fire whatever it holds unless consent gates the tags rather than the container. An embedded video, map or chat widget sets its own cookies the moment it renders, so it needs a placeholder rather than a lazy load. Cookies misclassified as strictly necessary avoid needing consent entirely, which is why the essential list deserves reading line by line. And the consent script failing to load must fail closed, since failing open hands every ad blocker user straight past the gate.
Finally, two things that only appear in a real deployment. A page served from an edge cache must evaluate consent per visitor rather than baking one visitor state into the cached response. And the choice has to reach server side forwarding, because a great many products block the browser tag correctly and then send the same event to the same vendor from the backend, which is the same processing with a different transport.
Suggest an improvementPreparing for a privacy or cookie audit?
QAble tests consent implementations end to end, including pre-consent network activity, tag manager gating, withdrawal behaviour and server side forwarding.
Website testing servicesMore test case sets
View allTest cases for a login page
Test cases25 cases across functional, negative, boundary, security, session and accessibility paths, including account enumeration and lockout.Test cases for a registration form
Test cases28 cases covering validation, duplicate accounts, email verification, password rules and the enumeration leak most signup forms ship with.Test cases for search functionality
Test cases28 cases across relevance, partial and fuzzy matching, filters, pagination, empty states, injection attempts and performance under load.Test cases for a shopping cart
Test cases27 cases on quantity limits, price recalculation, stock changes, coupon stacking, guest to account merge and cart persistence.Test cases for checkout and payment
Test cases30 cases including 3D Secure, declines, timeouts, duplicate charges, idempotency, refunds and partial captures.Test cases for file upload
Test cases28 cases on size and type limits, spoofed content types, malicious filenames, progress, resume, virus scanning and storage limits.Test cases for forgot password
Test cases26 cases on reset token expiry, single use enforcement, session invalidation and the enumeration and rate limit gaps that are routine here.Test cases for OTP verification
Test cases26 cases on expiry, resend throttling, attempt limits, code reuse, delivery failure and the brute force window teams forget to close.Test cases for user roles and permissions
Test cases26 cases on horizontal and vertical privilege checks, direct object access, role changes mid-session and permission inheritance.Test cases for form validation
Test cases27 rules-based cases on required fields, length and numeric boundaries, client and server parity, hidden field tampering and error accessibility.Test cases for a date picker
Test cases26 cases on timezone shifts, ambiguous day and month order, impossible dates, min and max limits, leap years and keyboard operation.Test cases for pagination
Test cases24 cases on ordering stability, records changing mid-session, page size caps, deep offset cost, permission-filtered totals and state restore.Test cases for push notifications
Test cases26 cases on app states, deep link routing, token release on sign out, lock screen privacy, preferences, provider failures and platform differences.Test cases for reports and data export
Test cases25 cases on permission filtering in the file, spreadsheet formula injection, encoding, typed numbers and dates, row limits and audit logging.Test cases for a chatbot
Test cases28 cases on paraphrased intents, context, fallback loops, human handoff, policy grounding, prompt injection and data scoping.Test cases for net banking transactions
Test cases28 cases on duplicate debits from a retried request, concurrent transfers against one balance, daily limits across channels, beneficiary cooling periods, second factor binding and reconciliation.Test cases for wallet and UPI payments
Test cases28 cases on payments that time out with no response, idempotency on retry, racing balances, caps across devices, collect request fraud, mandates and refunds.Test cases for insurance claim submission
Test cases28 cases on coverage at the date of loss, waiting periods, deductibles and sub limits, exclusions and riders, duplicate claims and settlement reconciliation.Test cases for patient records in an EHR
Test cases28 cases on duplicate detection and merge, wrong patient entry, units of measure, allergy and interaction alerting, break glass access and audit of reads.Test cases for CRM lead management
Test cases28 cases on duplicate leads under concurrency, routing and the unrouted fallback, round robin races, territory visibility, conversion and bulk import.Test cases for an ERP purchase order
Test cases28 cases on approval thresholds, amendments that must reset approval, budget commitment races, over receipt tolerance, three-way match and duplicate invoices.Test cases for OTT video playback
Test cases28 cases on bitrate recovery after a dip, DRM renewal mid stream, concurrent stream limits and leaked slots, resume conflicts, ad cue points and offline expiry.Test cases for game level progression
Test cases28 cases on save corruption during a crash write, cloud save conflicts, offline queue replay, unlock gating, currency exploits and purchase restore.Test cases for a REST API
Test cases28 cases on status code correctness, cross tenant resource access, mass assignment, idempotent retries, cursor pagination, rate limits and contract drift.Test cases for SSO and social login
Test cases28 cases on linking an account on an unverified email, state and code replay, redirect allow lists, token signature and issuer, deprovisioning and session rotation.Test cases for subscription and billing
Test cases28 cases on mid cycle proration, duplicate and out of order webhooks, renewal double charges, dunning and grace, trials, coupons, metered usage and tax.Test cases for data tables, filters and sorting
Test cases28 cases on unstable sorts across pages, filters that must reset pagination, selection surviving a filter change, bulk action scope and export fidelity.Test cases for session timeout and concurrent login
Test cases28 cases on tokens that survive sign out, refresh token reuse, idle against absolute lifetime, multi tab expiry, session limits and remote revocation.Test cases for a multi step form wizard
Test cases28 cases on values lost to back navigation, refresh and session expiry, step skipping, server side revalidation, duplicate submission and conditional branches.Test cases for email verification
Test cases28 cases on token reuse and expiry, invalidating earlier links, account enumeration, header injection, safe address change and mail scanner prefetching.Test cases for dashboards and analytics widgets
Test cases28 cases on reconciling against source rows, widgets that disagree, timezone aggregation, zero baselines, no data shown as zero and permission leaks in aggregates.Test cases for booking and reservation
Test cases28 cases on concurrent bookings for the last slot, inventory holds that leak, payment without a booking, cancellation boundaries and channel sync.Test cases for mobile app install and update
Test cases28 cases on migration chains across skipped versions, crashes during post upgrade migration, forced update lockouts, deep links and clean reinstall.Test cases for accessibility (WCAG 2.2 AA)
Test cases28 cases on keyboard only completion, focus management, live region announcements, contrast, reflow at 320 pixels, target size and screen reader verification.Test cases for performance and load
Test cases28 cases on spikes with no ramp, recovery after peak, soak and leak detection, pool exhaustion, cold caches, retry storms and data correctness under load.Test cases for the OWASP Top 10
Test cases28 cases on broken access control, mass assignment, injection across every input surface, credential stuffing, session invalidation, SSRF and exposed secrets.Test cases for cross browser compatibility
Test cases28 cases on storage that throws in private mode, blocked third party cookies, engine date parsing, mobile viewport units, in app browsers and ad blockers.Test cases for database and data integrity
Test cases28 cases on uniqueness under concurrency, lost updates, counter races, orphaned rows, migration and backfill safety, replica lag and verified restores.Test cases for localisation and multi language support
Test cases28 cases on text expansion, concatenated sentences, plural rules, locale date parsing, decimal separators, right to left layout, collation and encoding.Test cases for outbound webhooks
Test cases28 cases on retry backoff and dead letter stores, one dead consumer degrading the pipeline, payload signing and replay windows, out of order delivery and endpoint SSRF.Test cases for background jobs and queues
Test cases28 cases on work outliving the visibility timeout, idempotent handlers, poison messages, priority starvation, scheduler overlap across instances and graceful drain.Test cases for real time features and websockets
Test cases28 cases on messages lost in the reconnect gap, half open connections, per channel authorisation, tokens expiring mid connection, backpressure and fanout across instances.Test cases for file storage and media processing
Test cases28 cases on signed URL scope and expiry, serving before scanning completes, content type sniffing, metadata stripping, orphaned objects and derivative failures.Test cases for CSV import and bulk operations
Test cases28 cases on reruns duplicating successes, delimiters inside quoted fields, byte order marks, leading zeros, ambiguous dates and bulk action scope.Test cases for feature flags and progressive rollout
Test cases28 cases on unreachable flag services, unstable bucketing, rollouts that reshuffle users, kill switch latency, server and client mismatch and stale flags.Test cases for Android app lifecycle and permissions
Test cases28 cases on state lost to process death, configuration changes, permanent permission denial, revocation while backgrounded, doze and battery restrictions.Test cases for iOS app lifecycle and permissions
Test cases28 cases on the keychain surviving uninstall, suspended termination, limited photo access, allow once location, app switcher snapshots and biometric invalidation.Test cases for wearable app sync
Test cases28 cases on data recorded away from the phone, duplicate records on resync, full buffers, clock drift, health permissions, battery budgets and unworn readings.Test cases for VR and AR experiences
Test cases28 cases on the frame rate comfort floor, tracking loss, guardian boundaries, involuntary camera movement, AR anchor drift and spatial data privacy.Test cases for IoT device pairing and telemetry
Test cases28 cases on offline buffering and reconnect floods, fleet wide reconnection storms, shared credentials, wrong device clocks and stale queued commands.Test cases for embedded firmware update
Test cases28 cases on power loss mid write, automatic rollback and health confirmation, signature and anti rollback checks, staged rollouts and recovery mode.Test cases for user profile and account settings
Test cases28 cases on partial saves reported as success, optimistic updates the server rejected, mass assignment through a profile form, avatar content inspection and session invalidation.Test cases for account deletion and data export
Test cases28 cases on export links that must be authorised and expiring, deletion cascading to storage, caches, logs and processors, grace periods, legal holds and deadlines.Test cases for notification preferences and delivery
Test cases28 cases on opt outs honoured on one channel and ignored on another, marketing sent as transactional, unsubscribe scope, imports resetting consent and digest timezones.Test cases for admin impersonation and support access
Test cases28 cases on actions attributed to the customer instead of the admin, credential exposure, chained and upward impersonation, session expiry and immutable access records.Test cases for audit logs and activity history
Test cases28 cases on forged entries through log injection, immutability and tamper detection, actor attribution across impersonation and jobs, retention and legal holds.Want your consent gate proven, not assumed?
QAble covers functional, security and compliance paths with ISTQB-certified engineers. Start with a free QA audit of your site.