account_number_maskedBanking

Mock Jutsu HOW-TO | UK

The account_number_masked function within the mock-jutsu library is a specialised tool designed to generate realistic banking test data while prioritising security and compliance. In modern financial software development, handling sensitive information requires strict adherence to data protection standards. This function provides a seamless way to produce mock data that mirrors real-world account identifiers without exposing actual customer details, ensuring that developers can build and test systems in a safe environment without the risk of data leaks.

What sets this function apart is its strict alignment with the PCI-DSS v4.0 §3.3 standard. This global regulation mandates that the primary account number (PAN) must be masked when displayed, typically showing no more than the first six and last four digits. The account_number_masked utility specifically focuses on the most common representation used in customer-facing applications, providing a string where the initial digits are replaced by asterisks, leaving only the final four digits visible, such as ****1234. By using this specific masking algorithm, mock-jutsu ensures that your test data remains compliant with international financial security benchmarks from the very start of the development lifecycle.

For QA engineers and developers, the utility of account_number_masked extends across various testing scenarios. It is particularly effective for validating user interface components, such as account dashboards, payment confirmation screens, or transaction histories, where sensitive data must be partially hidden. It also serves as an excellent resource for testing log sanitisation routines and API response structures. By integrating this function, teams can avoid the legal and security pitfalls associated with using "live" or production-like data in non-production environments. Whether you are performing manual checks or automated regression tests, the consistency provided by this tool enhances the reliability of your test suites.

Accessibility is a core feature of the mock-jutsu ecosystem. Developers can invoke this function through multiple interfaces, including a straightforward Python call via jutsu.generate('account_number_masked'), a convenient CLI command for quick data generation, or even within performance testing scripts using the JMeter plugin syntax ${__mockjutsu(account_number_masked,)}. This flexibility allows for the rapid generation of high-quality mock data across different stages of the CI/CD pipeline. Ultimately, using account_number_masked empowers teams to maintain high security standards while accelerating their development velocity through realistic and compliant data simulation.

CLI Usage
mockjutsu generate account_number_maskedmockjutsu bulk account_number_masked --count 10mockjutsu export account_number_masked --count 10 --format jsonmockjutsu export account_number_masked --count 10 --format csvmockjutsu export account_number_masked --count 10 --format sql
Python API
from mockjutsu import jutsujutsu.generate('account_number_masked')jutsu.bulk('account_number_masked', count=10)jutsu.template(['account_number_masked'], count=5)
JMeter
${__mockjutsu_banking(account_number_masked)}# JMeter Function: __mockjutsu_banking# Parameter 1: account_number_masked# Parameter 2: (not required for this function)
REST API
GET /generate/account_number_masked# → {"type":"account_number_masked","result":"...","status":"ok"}GET /bulk/account_number_masked?count=10POST /template {"types":["account_number_masked"],"count":1}

Other Languages