ro_cnpIntlIDs

Mock Jutsu HOW-TO | UK

The ro_cnp function is a specialised tool within the mock-jutsu library, designed to generate authentic-looking Romanian Personal Numerical Codes, known locally as the Cod Numeric Personal. As a critical component of the IntlIDs category, this function allows developers to produce the 13-digit identifier required for various administrative, financial, and healthcare applications in Romania. By using ro_cnp, software engineering teams can ensure their databases are populated with structurally sound test data that adheres to the official standards mandated by the Romanian authorities.

Each identifier generated by this function follows the strict algorithmic requirements of the Romanian national ID system, including the crucial MOD-11 check digit verification. This level of precision is essential for testing systems that perform real-time validation, as it prevents form submission errors and logic failures during automated QA cycles. Whether you are building a fintech platform, a local government portal, or a customer relationship management system, having access to valid mock data ensures that your internal logic for parsing birth dates, gender, and regional codes remains robust and error-free.

Integration is seamless across various development environments, providing flexibility for different workflows. For Python-based backend development, engineers can invoke jutsu.generate('ro_cnp') to populate objects or unit tests. Those conducting performance or load testing can leverage the JMeter syntax, ${__mockjutsu(ro_cnp,)}, to simulate high-concurrency user registrations with unique identifiers. Additionally, the mock-jutsu CLI command, mockjutsu generate ro_cnp, provides a rapid method for fetching identifiers for manual testing or quick database seeding, making it a versatile choice for modern DevOps pipelines.

Beyond technical accuracy, utilising the ro_cnp function offers significant benefits regarding data privacy and GDPR compliance. By substituting sensitive real-world identifiers with synthetic test data, organisations significantly mitigate the risks associated with data breaches during the development and staging lifecycles. This approach not only streamlines the testing process by removing the need for complex data masking but also fosters a secure environment where developers can focus on refining functionality without compromising on security or international regulatory requirements.

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

Parameters

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

Other Languages