Test Objectives for Credit Cards

Tips for writing Test Objectives for Credit Cards

Test Objectives for Credit Cards

The credit cards or payment card testing most of the time requires you to have a valid set of test data on your backend / stub / test payment gateway. This can sometimes be challenging in Exploratory Testing / Session Based Testing approach as you might not have had upfront preparation to build your test data sets. Similarly on more traditional setup test data might come in too late or just purely wrong.

This is how it usually goes, tell me you have seen this in your organisation..  You have your test strategy to outline the high level test approach, you document it in your Test Plan. Section in the test plan talks about test data and about the process of obtaining it. The process usually is that a test data request is a deliverable of the test team and to be send well in advance to backend provider so that they can build their matching test data in time. Thats all good on paper and as an approach, but what usually happens is that when the test data request is needed, testers are unsure what credit card / payment card types there are, what are the valid card numbers for different types of card issuers and how to identify different error / edge cases tested. A

The solution, you should plan to have a good test coverage across all common credit card providers and also types of common payment related transactions. First have a look at the common credit card numbers below that all pass the Luhn check (e.g. card number validation rules). Then make sure you also have set of #TestObjectives for common edge/error cases.

Example dummy test credit card numbers for all major card providers:

Group Test Objective
Valid – VISA 4929650861605758
Valid – VISA 4485943428975756
Valid – VISA-13 4532899907669
Valid – VISA-13 4916687573348
Valid – VISA-Electron 4913799459302050
Valid – VISA-Electron 4026176061878617
Valid – AMEX 342269787907623
Valid – AMEX 371141329871449
Valid – Diners 36817133562731
Valid – Diners 30284958217394
Valid – MasterCard 5272714214304400
Valid – MasterCard 5304238005599053
Valid – Discover 6011411130389136
Valid – Discover 6011093033795278
Valid – Voyager 869960950111224
Valid – Voyager 869938596218603
Valid – JCB 3096424357950485
Valid – JCB 3528373068549300
Valid – JCB-15 180053595869851
Valid – JCB-15 180074724760381
Valid – Maestro 6762903497841288
Valid – Maestro 5893702419914569
Valid – Laser 6304828521941637
Valid – Laser 6706296756264196
Valid – InstaPayment 6397107594293152
Valid – InstaPayment 6386198192124082
Valid – enRoute 201470181601610
Valid – enRoute 201406505012647

!! And just to be sure, all these credit card numbers are test numbers, e.g. dummy numbers that just pass the validation checks but are not real credit card numbers. Therefor you should of course only use these as #TestObjectives against your test backends instead of live backend.

 

Common Test objectives for various error / edge cases when testing Credit cards:

Group Test Objective
Error case Credit card type is invalid
Error case Credit card Declined – Expired
Error case Credit card Declined – Fraud
Error case Credit card Declined – Hold Card
Error case Credit card Declined – Referred
Error case Credit card Declined – insufficient funds

In addition to the above there are lot of payment gateway related errors that are not card specific, those have been omitted as the focus here is on common #TestObjectives that should be valid for all payments systems using credit cards.


Good Resources:

Online Credit Card validator by FreeFormatter.com
Luhn Algorithm Information

Another good resource is the following eBook that includes this and many other Test Objectives + lot more to get you started writing Test Objectives.

Download Now

 

 

 

Test a Tester:


What is the last digit of the Credit Card on the featured picture?

Do you know the answer? Leave a comment below!

 

 

Facebooktwittergoogle_pluspinterestlinkedinmailby feather

Leave a Comment

Your email address will not be published. Required fields are marked *