crnIdentity

Mock Jutsu HOW-TO | EN

In the landscape of United Kingdom business operations, the Company Registration Number (CRN) serves as a vital unique identifier assigned by Companies House. When developers are building financial platforms, CRM systems, or regulatory compliance tools, they require high-fidelity mock data that mirrors these real-world identifiers. The mock-jutsu library addresses this need through its dedicated crn function, providing a reliable way to generate synthetically accurate identifiers that conform to the specific formatting rules used across the UK.

The technical structure of a crn typically involves an eight-character string. While many are purely numeric, the standard also accounts for regional prefixes such as "SC" for Scotland or "NI" for Northern Ireland. By utilizing mock-jutsu, developers can ensure their test data reflects these alphanumeric variations, allowing for robust validation of input fields and database schemas. Whether you are calling the function via the CLI with mockjutsu generate crn or integrating it into a Python backend using jutsu.generate('crn'), the library ensures the output is structurally sound and ready for high-volume testing environments.

One of the primary benefits of using mock-jutsu for this purpose is the mitigation of privacy risks. Using real company data in staging or development environments can lead to security vulnerabilities or GDPR compliance issues. Generating a synthetic crn allows teams to perform rigorous quality assurance—such as testing KYC (Know Your Customer) workflows or verifying search indexing—without exposing sensitive corporate information. This approach is particularly beneficial for automated testing suites where thousands of unique records are needed to simulate a realistic production load.

Furthermore, the crn function is designed for cross-functional utility. Performance testers can leverage the JMeter integration to inject realistic identifiers into load tests, ensuring that the system handles data processing at scale. By automating the creation of this specific type of test data, mock-jutsu reduces the manual overhead often associated with data preparation. This allows engineering teams to focus on core logic and feature development, confident that their identity-related data points are consistent, professional, and compliant with international formatting standards.

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

Parameters

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

Other Languages