br_cpfIntlIDs

Mock Jutsu HOW-TO | UK

The br_cpf function is a core component of the mock-jutsu library, specifically designed for developers needing reliable Brazilian Cadastro de Pessoas Físicas identifiers. As part of the IntlIDs category, this utility generates realistic eleven-digit strings that adhere strictly to the formatting standards used in Brazil. Whether you are building an e-commerce platform for the Latin American market or a complex fintech application, having access to accurate test data is essential for bypassing validation hurdles during the initial development and integration phases.

Under the hood, the br_cpf function ensures that every generated value is mathematically sound and realistic. The Brazilian CPF standard relies on a specific MOD-11 algorithm to calculate the final two check digits based on the preceding nine numbers, resulting in a complete eleven-digit string. By simulating this precise logic, mock-jutsu provides mock data that passes front-end masks and back-end validation scripts alike. This prevents the common frustration of manual data entry errors or the use of repetitive placeholder values that might otherwise fail rigorous data integrity checks.

Flexibility is a hallmark of the mock-jutsu ecosystem, and the br_cpf generator is no exception. Developers can integrate it directly into their Python scripts using the standard library call, or leverage the command-line interface for rapid prototyping and shell scripting. For those conducting performance tests, the library also supports JMeter integration, allowing for the dynamic generation of unique identifiers within large-scale load-testing scripts. This versatility ensures that your testing environment remains as close to production as possible without compromising sensitive personal information or violating privacy regulations.

Utilising br_cpf significantly enhances the quality of automated quality assurance processes. It is particularly useful for testing user onboarding flows, payment gateway integrations, and database constraints where unique, valid identifiers are mandatory. By incorporating high-quality test data into your CI/CD pipelines, you can catch potential bugs in regional formatting or validation logic early in the software development lifecycle. Ultimately, mock-jutsu empowers engineering teams to build more robust, globally-compliant software with minimal configuration overhead and maximum reliability.

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

Parameters

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

Other Languages