Your cart is empty
Shop now
+

CVV UI Test: Test Cases for Card Security Code Fields

Explore

CVV UI Test: Test Cases for Card Security Code Fields

We guarantee gift cards direct to your inbox immediately.
Shop Now!

Let's Work Together

Sign up now with Call of Gift Cards and become eligible for benefits including 10% commission on cards bought from us, awesome conversion rates and much more!
Find Out More

Digital Gift Cards

The market for digital goods and services are growing rapidly. One of the true shifts in online behaviour is the switch from traditional direct online payments and purchase to wallets and gift cards. ...read more
+

Digital Gift Cards

The market for digital goods and services are growing rapidly. One of the true shifts in online behaviour is the switch from traditional direct online payments and purchase to wallets and gift cards. We invite you to start your own online business as a partner of ours. By signing up as a partner you’ll get access to one of the largest gift card databases in the world. All you need to focus on is to market your website and products. Gift cards are quickly outperforming traditional gifts, as they give the recipient the choice to pick their own present from a variety of options. The range of e-gift cards available on the Call of Gift Cards's partner sites includes popular categories such as restaurants, games, travel and fashion.

Gift Vouchers

Traditional gift vouchers are printed paper gifts available in set values that can be spent in specific stores. Open-loop, semi-open loop, and closed-loop are often terms used when referring to gift v...read more
+

Gift Vouchers

Traditional gift vouchers are printed paper gifts available in set values that can be spent in specific stores. Open-loop, semi-open loop, and closed-loop are often terms used when referring to gift vouchers. All gift cards sold via our partners’ websites are closed loop. This means that the gift card can only be spent at a single brand location, for example, an Xbox voucher can only be spent at Xbox etc.

Our Gift Cards

Minecraft Coins – Starfield – Alan Wake 2 – Spotify Gift Card – Madden NFL 24 – Mortal Kombat™ 1 – Garena Shells – FIFA 23 – Assassin’s Creed Mirage – Valorant Points – Grand Theft Auto V – Razer Gold Pin – Cabal Online eCoin – Battlenet Gift Card – Elden Ring – Minecraft Java + Bedrock – Call of Duty: Modern Warfare III - Cross-Gen Bundle – EA SPORTS FCTM 24 Standard Edition Xbox One & Xbox Series X|S – Steam Wallet Gift Card – Battlefield™ V Standard Edition – iTunes Gift Card – PlayStation Network PSN Gift Card – Netflix Gift Card – Google Play Gift Card – Amazon Gift Card – Xbox Live Gift Card – Facebook Game Gift Card – FIFA 20 (Xbox One) – Far Cry 5 - Gold Edition (Xbox One) – NieR:Automata Become As Gods Edition (Xbox One) – SONIC FORCES™ Digital Standard Edition (Xbox Game EU) – Apex Legends™ - Octane Edition (Xbox Game EU) – Mario Kart 8 Deluxe (Nintendo) – Fortnite V-Bucks Gift Card – Nintendo eShop Gift Card – Red Dead Redemption 2 (Xbox One) – Halo 5: Guardians (Xbox One) – The Legend of Zelda: Link's Awakening (Nintendo) – DOOM Eternal Standard Edition (Xbox One) – The Legend of Zelda: Breath of the Wild (Nintendo) – Resident Evil 3 (Xbox One) – Need For Speed Heat (Xbox One) – Assassin's Creed Odyssey - Gold Edition (Xbox One) – Cars 3: Driven to Win (Xbox One) – Call of Duty: Modern Warfare 2 Campaign Remastered (Xbox One) – Team Sonic Racing™ (Xbox Game EU) – Project CARS - Game of the Year Edition (Xbox One) – Mario & Sonic Tokyo 2020 (Nintendo) – Tom Clancy’s Ghost Recon Wildlands - Deluxe Edition (Xbox One) – Forza Horizon 4 Ultimate Edition (Xbox One) – Sekiro™: Shadows Die Twice (Xbox One EU) – Tom Clancy's The Division 2 (Xbox One EU) – Gears 5 (Xbox One) – Dragon Ball Z: Kakarot (Xbox One) – The Crew Ultimate Edition (Xbox One) – Ultimate Marvel vs. Capcom 3 (Xbox One) – Pokemon Let's Go Eevee! (Nintendo) – Sonic Mania (Xbox Game EU) – UFC 3 - Deluxe Edition (Xbox One) – Mass Effect Andromeda - Standard Recruit Edition (Xbox One) – BioShock: The Collection (Xbox One) – A Way Out (Xbox One) – Borderlands 3 (Xbox One) – Overcooked! 2 (Nintendo) – World of Warcraft – PUBG Gift Card – Spyro Reignited Trilogy (Xbox One) – Aeria Points Gift Card – Destiny 2: Shadowkeep (Xbox One) – Steep (Xbox One) – Infinite Minigolf (Xbox One) – Rage 2 (Xbox One) – Fire Emblem Warriors (Nintendo) – Anthem (Xbox One) – Kingdom Hearts 3 (Xbox One) – FIFA 19 (Xbox One) – Goat Simulator (Xbox One) – The Elder Scrolls Online (Xbox One) – FOR HONOR™ Standard Edition (Xbox One) – IMVU Prepaid Gift Card

CVV UI Test: Test Cases for Card Security Code Fields

What is a CVV UI test?

A CVV UI test checks how the card security code field in a payment form behaves. It covers input rules, length limits, masking, error messages, autofill, and mobile keyboards, plus what the form sends to the payment processor. QA teams run this test during checkout testing, before release, and after any gateway change.

read more

Why the CVV field needs its own test pass

The field holds three or four characters, so teams treat it as trivial. That is where bugs hide.

CVV UI Testing: A Comprehensive Guide

  • Card variety. Visa, Mastercard, and Discover use three digits. American Express uses four, printed on the front of the card.
  • Autofill. Browsers and password managers fill the field when the HTML attributes are right, and skip it when they are not.
  • Mobile input. A phone should show a numeric keypad, not a full text keyboard.
  • Gateway rules. Some processors reject a mismatch at the authorization step. Others return a soft decline that your UI has to explain.
  • Compliance. The code must never reach your database, your logs, or an analytics event.

Standard test cases for a CVV input field

Input and length

  • Accepts three digits for Visa, Mastercard, and Discover.
  • Accepts four digits for American Express and rejects a fifth.
  • Rejects letters, symbols, and spaces.
  • Keeps a leading zero (012) as typed instead of stripping it.
  • Blocks a paste of four digits into a three digit field without crashing or truncating the wrong end.
  • Shows the numeric keypad on iOS and Android through inputmode="numeric".

Validation and error states

  • Submitting an empty field shows one error, placed next to the field.
  • The error clears as soon as the shopper types a digit.
  • A gateway mismatch code returns a message a shopper can act on, not a raw error string.
  • The form does not lock the pay button while a CVV error is on screen without explaining why.

Masking and data handling

  • Confirm the field is type="password" or type="tel" depending on your masking choice, and that the value never appears in the DOM as plain text when masking is on.
  • Check the browser network tab: the code should go to the processor, not to your own endpoint.
  • Search the codebase for CVV logging. Session replay tools and error trackers are the usual leaks.

Accessibility and mobile

  • The field has a real <label> or aria-label that reads "security code", not "cvv".
  • Errors are tied to the field with aria-describedby and announced by screen readers.
  • The tap target is at least 44 by 44 pixels on mobile.
  • The keyboard does not cover the field when it opens.

Which test card numbers should you use?

Work in your processor's sandbox mode. Stripe and other gateways publish test cards such as 4242 4242 4242 4242 with any future expiry and any three digit code, plus an Amex card for four digit CID checks. Decline cards, such as 4000 0000 0000 0002, let you verify how the form renders a failed payment. Test CVV values differ by gateway, so read the sandbox docs before you hard code them in a suite.

cvv test layout

How to automate a CVV UI test

  1. Pick a driver. Playwright, Cypress, and Selenium all handle iframes, which matters when the field lives inside a hosted payment frame.
  2. Load the checkout page in sandbox mode with a test card.
  3. Fill the card number and expiry, then type into the CVV field and assert the stored value.
  4. Assert filtering: send letters and symbols with fill() and check the field stays clean.
  5. Submit and assert both the gateway response and the rendered error or success state.
  6. Capture a visual snapshot of each error state so layout regressions show up in review.
  7. Add a unit test for your own validation helper, separate from the browser test, so it runs in milliseconds.

Common CVV field bugs

  • The field accepts letters because validation lives only on the server.
  • maxlength is set to 3, which cuts off every Amex card.
  • Paste is blocked in the name of security, which breaks password managers.
  • autocomplete="off" is set, but browsers ignore it and autofill anyway, so the field behaves in ways nobody tested.
  • The field clears on blur, forcing a retype of the whole form.
  • The error text reads "invalid input" with no hint about what to fix.
  • The CVV is stored with the order record, which is a compliance problem, not a UX one.

Which PCI DSS rules shape the test?

PCI DSS treats the CVV as sensitive authentication data. Requirement 3.2 forbids storing it after authorization in any form, including a hash. A CVV UI test should confirm the code stays inside the payment iframe or tokenization layer and never reaches your own servers.

test cvv ui

Frequently asked questions

How many digits does a CVV have?

Three digits for most cards and four for American Express. Amex calls it a CID and prints it on the front of the card, above the number.

Can I test a CVV field without a live gateway?

Yes. Sandbox mode from your processor accepts test card numbers, so no real card data is needed at any point in the test run.

Should the CVV field allow paste?

Yes. Blocking paste breaks password managers and pushes shoppers to mistype the code. Allow it and validate the value after.

Does the CVV field need an autocomplete attribute?

Yes. Use autocomplete="cc-csc", which tells browsers and password managers where the code belongs.

Do I need to mask the CVV?

Masking is common on desktop but hides typos. Plenty of teams show the digits on mobile, where typing errors cost more than shoulder surfing.

What's New

CVV UI Testing: A Comprehensive Guide

Discover the essential steps and best practices for effective CVV UI testing to enhance your website's security and user experience. Learn more in our comprehensive guide.

What's New

Why I Can't Write a CVV Buying Guide

I can't write a buying guide for CVVs or stolen card data. I can help with card-fraud prevention, PCI DSS, and payment-security content instead.

Read our complete guide: What to Know Before You Buy CVV: Prices, Scams, and Legal Risks