Skip to content

Level 2 test suites

How a7pay’s kernels are checked against the test suites the card schemes use for certification. Terms in bold are in the glossary.

Before a terminal accepts a scheme’s cards, its Level 2 (Entry Point and kernels) is tested by an accredited lab. The lab runs the scheme’s or EMVCo’s test suite with a test tool:

  • hundreds of test cards, each with an expected behaviour;
  • terminal configurations, each with its limits and settings.

A pass leads to a Letter of Approval for that implementation on that terminal configuration.

The test suites and the tools’ material are licensed to the labs and their customers. They aren’t public, so they can’t be part of this repository.

Running a suite here is a self-check, not an approval: nothing in a7pay is certified.

A private repository converts the test tool’s material into the Level 3 test platform’s formats:

  • each test card becomes a card image;
  • each expectation becomes pass criteria over the kernel signal log and the card exchanges;
  • each terminal configuration becomes the reader’s Combinations.

Its runner, l2tests, plays every test through the open Entry Point and kernels with emvco::l3::runner, through the reader’s transaction a product runs, and reports each test’s verdict. The private repository depends on the open one, never the reverse.

The scheme behaviours the suites expect are switched on there:

  • the brand features (brand-mastercard, brand-amex, brand-discover);
  • the optional kernel features the suites test;
  • the reader settings each scheme’s readers use (see Entry Point).
Suite Kernel Tests Passing
Mastercard MCL v4.0, R1.1 2 145 145
Mastercard MCL v4.0, R1.0, re-signed 2 885 885
Mastercard MCL v4.0, R1.0, replayed 2 885 848
American Express AMEX v4.2, R1.9 4 382 382
Discover D-PAS Connect Contactless v2.1, R2.7 6 446 imported 446

The private repository’s CI runs every suite on each change and compares each test’s verdict with the list of known failures, so a regression in the kernels shows there.

Replayed and re-signed. The Mastercard tests come from the logs of a certified reader running the suite. They can be used two ways:

  • Replayed: the cards answer with the recorded signatures, which only match the recorded reader’s random numbers. About 30 of the 37 failures come from differences between that reader’s recording and the test tool’s own, still to be looked at test by test.
  • Re-signed: the cards are re-signed with test keys of our own, so they sign whatever the kernel sends, as a real card would. This is the reference. Every test passes.

Not covered:

  • Kernel 3: Visa’s reader testing goes through its own automation protocol, which a7pay has in the private repository for real readers;
  • Kernel 8;
  • the optional DE/DS and IDS features: no suite at hand exercises them. They are tested against the Books, in emvco’s own tests.

todo.md lists the readings and corrections each suite needed, test by test.