cl_rutIntlIDs

Mock Jutsu HOW-TO | UK

The cl_rut function is a specialised component within the mock-jutsu library, designed to generate authentic Chilean Rol Único Tributario (RUT) numbers. As a cornerstone of the IntlIDs category, this tool allows developers to produce high-quality mock data that adheres to the specific legal and mathematical standards required for Chilean identity verification. Whether you are building financial applications, e-commerce platforms, or government-facing portals, having access to accurate test data is essential for ensuring that your input validation logic functions correctly under real-world conditions.

At its core, the cl_rut generator produces a sequence consisting of seven or eight digits followed by a hyphen and a verification character. This final character, known as the "dígito verificador", is calculated using the standardised MOD-11 algorithm, which can result in a numeric value from zero to nine or the uppercase letter "K". By strictly following this mathematical standard, mock-jutsu ensures that every generated ID passes checksum validation tests, preventing the common pitfalls of using random numeric strings that would otherwise be rejected by Chilean systems or database constraints.

For engineering teams, the benefits of using cl_rut extend beyond simple data generation. It is particularly useful for stress-testing database constraints, verifying front-end input masks, and conducting integration tests for regional APIs. The function is designed for seamless integration across various environments; developers can trigger it via the CLI for quick prototyping, call it directly within Python scripts using the jutsu.generate('cl_rut') method, or even embed it into performance testing workflows using the JMeter syntax ${__mockjutsu(cl_rut,)}. This versatility makes it an indispensable asset for those targeting the Latin American market.

Ultimately, incorporating cl_rut into your development lifecycle reduces the manual overhead of creating valid identifiers and minimises the risk of data-related bugs in production. By providing a reliable source of test data, mock-jutsu empowers developers to focus on building robust features rather than worrying about the intricacies of international ID formats. The library’s commitment to providing realistic and mathematically sound mock data ensures that your software remains compliant and functional, regardless of the geographical complexity of the user base.

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

Parameters

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

Other Languages