mx_curpIntlIDs

Mock Jutsu HOW-TO | UK

The mx_curp function is a specialised tool within the mock-jutsu library, designed to generate high-quality test data for Mexican identity systems. The Clave Única de Registro de Población (CURP) is a fundamental identifier for citizens and residents in Mexico, and accurately replicating its complex structure is essential for robust software testing. By using mock-jutsu, developers can instantly produce valid 18-character strings that mirror the official format, ensuring that applications handling Mexican user data are thoroughly vetted before deployment.

Each string generated by mx_curp adheres to the strict alphanumeric standards set by the Mexican government. The function meticulously constructs the identifier using a specific sequence: the person's name initials, date of birth, gender, and state code, followed by internal homonymy characters and a final check digit. This check digit is calculated using the official CURP alphabet and a weighted algorithm, making the mock data indistinguishable from real identifiers during validation checks. This level of precision is vital for testing data entry forms, database indexing, and backend validation logic where a simple random string would fail to pass checksum requirements.

Integrating this function into your workflow is seamless, whether you are working in a local development environment or a continuous integration pipeline. Developers can invoke mx_curp via the Python API using jutsu.generate('mx_curp'), or generate quick samples through the CLI with the command mockjutsu generate mx_curp. For performance testers, the library even supports JMeter integration using the ${__mockjutsu(mx_curp,)} syntax. This versatility makes it an indispensable asset for engineering teams building fintech solutions, government portals, or any international platform targeting the Mexican market.

Beyond simple generation, using mock-jutsu for your test data requirements significantly reduces the risk of using sensitive, real-world information in non-production environments. It allows teams to simulate diverse user profiles and edge cases without compromising privacy or security. By automating the creation of valid CURP identifiers, mx_curp streamlines the development lifecycle, allowing engineers to focus on building features rather than manually crafting complex test cases. This ensures that your software remains compliant with data protection standards while maintaining high levels of functional reliability and performance.

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

Parameters

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

Other Languages