atm_sessionCardPhysicsLocale Aware

Mock Jutsu HOW-TO | UK

The atm_session function, a core component of the CardPhysics category within the mock-jutsu library, provides developers with high-fidelity, structured JSON records representing automated teller machine interactions. This utility is indispensable for teams building financial software, as it generates comprehensive datasets including unique session identifiers, terminal IDs, masked Primary Account Numbers (PANs), and critical EMV-related fields. By producing realistic mock data that mimics the complexity of a live banking environment, mock-jutsu allows engineers to simulate end-to-end transaction flows without the security risks associated with handling actual sensitive cardholder information or personally identifiable data.

To ensure technical accuracy, the atm_session generator adheres to industry-standard logic for financial messaging. Each record includes a synchronised Application Transaction Counter (ATC) and a simulated Application Request Cryptogram (ARQC), which are vital for testing the integrity of payment processing kernels and host authorisation systems. The function also produces varied response codes, enabling developers to create robust test data scenarios that cover both successful authorisations and common failure modes, such as insufficient funds, hardware timeouts, or invalid PIN attempts. This level of detail ensures that the mock data remains relevant for complex validation logic and cryptographic verification workflows used in modern banking.

The versatility of the atm_session function is further enhanced by its seamless integration across various development environments. Whether you are performing rapid prototyping via the command-line interface with the mockjutsu generate command, building dynamic test suites in Python using the jutsu.generate method, or executing large-scale performance benchmarks in JMeter via the custom function plugin, the output remains consistent and reliable. This multi-platform support significantly reduces the time spent on manual data preparation, allowing QA engineers and developers to focus on identifying edge cases in transaction routing and reconciliation systems rather than formatting data.

Ultimately, leveraging atm_session within the mock-jutsu ecosystem empowers organisations to maintain high standards of software quality while accelerating the development lifecycle. By providing a standardised way to generate complex ATM session records, the library bridges the gap between development and production-grade financial simulation. This results in more resilient applications, better-tested fraud detection algorithms, and a more secure approach to managing test data across the entire DevOps pipeline, ensuring that financial systems are battle-tested before they ever reach a live environment.

CLI Usage
mockjutsu generate atm_session --locale TRmockjutsu generate atm_session --locale DEmockjutsu bulk atm_session --count 10 --locale TRmockjutsu export atm_session --count 10 --format json --locale TRmockjutsu export atm_session --count 10 --format csv --locale TRmockjutsu export atm_session --count 10 --format sql --locale TR# --mask: regulation-compliant output (PCI DSS / GDPR / KVKK)mockjutsu generate atm_session --locale TR --maskmockjutsu bulk atm_session --count 5 --locale TR --mask
Python API
from mockjutsu import jutsujutsu.generate('atm_session', locale='TR')jutsu.bulk('atm_session', count=10, locale='TR')jutsu.template(['atm_session'], count=5, locale='TR')# with --locale parameterjutsu.generate('atm_session', locale='TR', locale='TR')# mask=True: regulation-compliant outputjutsu.generate('atm_session', locale='TR', mask=True)jutsu.bulk('atm_session', count=5, locale='TR', mask=True)
JMeter
${__mockjutsu_cardphysics(atm_session,TR)}# JMeter Function: __mockjutsu_cardphysics# Parameter 1: atm_session# Parameter 2: locale (TR/UK/US/DE/FR/RU)${__mockjutsu_cardphysics(atm_session,DE)}# Add 'mask' keyword to get a regulation-compliant masked value${__mockjutsu_cardphysics(atm_session,TR,mask)}
REST API
GET /generate/atm_session?locale=TR# → {"type":"atm_session","result":"...","status":"ok"}GET /bulk/atm_session?count=10&locale=TRPOST /template {"types":["atm_session"],"count":1,"locale":"TR"}# mask=true: regulation-compliant outputGET /generate/atm_session?locale=TR&mask=trueGET /bulk/atm_session?count=5&locale=TR&mask=true

Parameters

Parameter Values Description
--locale TR|UK|US|DE|FR|RU Region / locale for locale-aware output
--locale TR|UK|US|DE|FR|RU Region / locale for locale-aware output
--mask true | false Return a regulation-compliant masked value (PCI DSS, GDPR, KVKK…)

Other Languages