CVV Test Case Design: A Practical QA Guide

Our Cards

Choose from any of our gift cards to give to your loved ones

CVV Test Cases for Testing: Sandbox Numbers Only

giftcardimage

Where to Use?

Redeem your gift cards at any of our Merchants

read more

Where to Buy?

You can purchase a gift card from any of these locations

read more

ABOUT US

about

What is ONYX GiftCards?

Onyx Gift Cards is a Grenadian company designed to introduce, market and manage gift cards systems in Grenada for retailers and corporations. We are enthusiastic about the effect and influence we will have on the local market. We intend to expand our systems regionally with a range of product offerings and services.

What is a Gift Card?

Gift cards are the preferred way of giving and receiving gifts. They carry a monetary value that can be redeemed for gifts at your favorite store.
Onyx GiftCards are “Open Gift Cards” which means that they can be redeemed at multiple merchant locations. They are standard credit card size, can fit into the average wallet and made of PVC plastic. Onyx GiftCards are Barcoded for security and safety for the consumer and bear a disclaimer at the back.
Onyx Giftcards can be bought with a branded Card backer which is black in colour and is designed to fit the card. There is an area to write a brief message to the recipient as well.

How it Works?

  • Buy an Onyx Gift Card at these local stores
  • Give your gift card to friends, family, co-workers, etc.
  • The recipient can shop at our select merchants nationwide
  • Your friends, family, co-workers, etc. will present their gift card at checkout to pay for your item(s)
  • They will walk away happy with the best gift ever...the gift of Choice

Why ONYX GiftCards?

  • Save TIME. No need to run around looking for the perfect gift
  • Redeem from a variety of business island-wide. We will continue adding businesses as fast as ONYX grows.
  • ONYX Gift Cards do not expire
  • Cards are valued at convinient amounts to meet every need and occasion

CVV test case design is the work of mapping every way a customer can reach the card security code field and proving your payment form handles each one correctly. You are not testing the code itself. You are testing your validation, your formatting, your error messages, and what your system does with that value after the authorization call. Get those right and you prevent a whole class of failed transactions and support tickets.

Pin down what the field actually is

The CVV is a 3-digit code on the back of most cards. American Express prints a 4-digit code on the front and calls it CID. That one difference drives most of your test matrix, so settle it before you write any cases. Ask whether your gateway tokenizes the value, whether your form swaps length rules by card brand, and whether the field is even required for every card type you accept.

The core cases

  1. Valid 3-digit code with a Visa or Mastercard number. Expect authorization to proceed.
  2. Valid 4-digit code with an Amex number. Expect the same.
  3. Empty field on a brand that requires a code. Expect a clear, non-technical error.
  4. Two digits. Expect rejection, not a silent trim to something else.
  5. Five digits on a non-Amex card. Expect rejection.
  6. Letters or symbols mixed in. Expect rejection.
  7. A leading zero, such as 007. This must pass. Store the value as a string, never as a number.

Edge cases that catch real bugs

Brand detection switching mid-entry. Someone types a 15-digit Amex prefix, sees a 4-digit field, then edits the number into a Visa. Your form has to reset the length rule. Test that explicitly, because it is the case QA teams skip.

Paste and whitespace. Copying " 123 " out of a notes app is common. Trim it instead of rejecting it.

Unicode digits. Arabic-Indic or full-width numerals look like digits to a human and not to a regex. Decide whether you normalize or reject, then test both paths.

Wrong code on a valid card. The issuer declines it. Your UI should show a decline, not a field validation error. Those are different states and users get confused the moment you merge them.

Autofill. Browsers and password managers fill security codes inconsistently. Confirm a filled value lands in the right field and triggers the same validation as a typed one.

Test data discipline

Never test with a real card. Use the sandbox numbers your processor publishes and rotate them per run so a stale token does not hide a failure. If the team keeps a shared sheet of test cards, give brand, code length, and expected result their own columns. A large share of the flaky results I have seen trace back to someone firing a 4-digit code at a card number that was never Amex.

Automate the boring part, watch the rest

Digit count and character class checks belong in a parameterized unit test. Error copy and layout shifts do not. Keep those manual or visual, since the failure mode is a message that is technically correct and unreadable on a phone.

One last rule: log the outcome, never the value. The code should not sit in application logs, analytics, or test fixtures. That is a compliance requirement, not a style preference.

Contact Us

Latest

Latest

Read our complete guide: Should You Buy CVV From a Card Shop? The Honest Buyer's Guide