licenseDocument

Mock Jutsu HOW-TO | UK

In the modern landscape of software development and quality assurance, managing sensitive information like identification numbers requires a careful balance between realism and security. The mock-jutsu library addresses this challenge by offering a robust license function under its Document category. This utility is specifically designed to generate a generic driver license number format, providing developers with high-quality mock data that mimics the structure of official documentation without compromising real-world privacy. By integrating this into your workflow, you can ensure that your applications handle document identifiers with precision and consistency across various environments.

The algorithm behind the license generation in mock-jutsu focuses on structural accuracy and pattern replication. While driver license formats vary significantly across different global jurisdictions, this function produces a standardised numeric string—exemplified by the format 654321—that adheres to common validation lengths and digit patterns. This approach ensures that the test data remains versatile enough for international testing environments while remaining compatible with standard database schemas. By providing a predictable yet randomised output, mock-jutsu allows engineering teams to bypass the complexities of manual data entry or the legal risks associated with using anonymised production datasets.

Testing scenarios for this function are extensive, particularly for platforms involving identity verification or user onboarding. Whether you are building a car rental application, a fintech platform requiring KYC compliance, or a government services portal, having reliable license mock data is essential. It enables engineers to stress-test form validation logic, verify search functionality within administrative dashboards, and ensure that data masking protocols are functioning correctly. Furthermore, the ability to generate these identifiers on the fly via the CLI or Python API makes it a powerful tool for automated unit testing and complex integration suites where document parity is required.

One of the primary developer benefits of using mock-jutsu is its seamless cross-platform integration. Whether you are executing a quick command via the terminal with "mockjutsu generate license," writing a Python script using "jutsu.generate('license')", or conducting performance testing in JMeter with the specific function string, the library maintains total parity. This flexibility streamlines the transition between local development and large-scale load testing. Ultimately, leveraging mock-jutsu for document simulation empowers teams to build more resilient systems by providing safe, scalable, and realistic test data that accelerates the entire software development life cycle.

CLI Usage
mockjutsu generate licensemockjutsu bulk license --count 10mockjutsu export license --count 10 --format jsonmockjutsu export license --count 10 --format csvmockjutsu export license --count 10 --format sql# --mask: regulation-compliant output (PCI DSS / GDPR / KVKK)mockjutsu generate license --maskmockjutsu bulk license --count 5 --mask
Python API
from mockjutsu import jutsujutsu.generate('license')jutsu.bulk('license', count=10)jutsu.template(['license'], count=5)# mask=True: regulation-compliant outputjutsu.generate('license', mask=True)jutsu.bulk('license', count=5, mask=True)
JMeter
${__mockjutsu_identity(license)}# JMeter Function: __mockjutsu_identity# Parameter 1: license# Parameter 2: (not required for this function)# Add 'mask' keyword to get a regulation-compliant masked value${__mockjutsu_identity(license,mask)}
REST API
GET /generate/license# → {"type":"license","result":"...","status":"ok"}GET /bulk/license?count=10POST /template {"types":["license"],"count":1}# mask=true: regulation-compliant outputGET /generate/license?mask=trueGET /bulk/license?count=5&mask=true

Parameters

Parameter Values Description
--mask true | false Return a regulation-compliant masked value (PCI DSS, GDPR, KVKK…)

Other Languages