mx_rfcIntlIDs

Mock Jutsu HOW-TO | UK

The mx_rfc function is a specialised utility within the mock-jutsu library designed to generate realistic Mexican tax identification numbers, known as the Registro Federal de Contribuyentes. This tool is indispensable for developers and QA engineers who require high-quality test data that adheres to the strict formatting standards set by the Mexican tax authorities (SAT). By integrating mx_rfc into your development workflow, you can ensure that your applications handle local identification formats with precision, whether you are building financial software, e-commerce portals, or human resource management systems targeting the Mexican market.

Technically, the function mirrors official standards to produce both 13-character strings for individuals and 12-character strings for corporate entities. For physical persons, the mock data includes a specific combination of letters derived from the individual's name, followed by their date of birth in YYMMDD format and a unique three-digit alphanumeric homoclave. For companies, the structure begins with a three-letter abbreviation of the legal name followed by the date of incorporation. This level of detail ensures that the generated mx_rfc values pass structural regex checks and basic validation logic, making them far superior to simple random string generation for robust software testing.

Utilising mock-jutsu for this specific requirement provides significant benefits across various testing scenarios, particularly when stress testing databases or validating complex form inputs. Instead of manually creating spreadsheets of identifiers, developers can use the CLI command "mockjutsu generate mx_rfc" or the Python method "jutsu.generate('mx_rfc')" to populate environments instantly. This automation is particularly useful for JMeter performance testing, where the "${__mockjutsu(mx_rfc,)}" function can simulate thousands of unique users or transactions without triggering duplicate entry errors or format violations in the application under test.

Ultimately, the primary advantage of using the mx_rfc function lies in its ability to streamline the creation of compliant test data without compromising on realism. It allows engineering teams to focus on core logic and edge-case handling rather than the minutiae of regional identification logic. By leveraging the mock-jutsu framework, organisations can accelerate their delivery pipelines and improve the reliability of their software in international markets, ensuring that every generated identifier serves as a robust and accurate placeholder for real-world production data.

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

Parameters

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

Other Languages