bg_egnIntlIDs

Mock Jutsu HOW-TO | EN

Software developers and QA engineers often require specialized identifiers for localized application testing. The bg_egn function within the mock-jutsu library is designed specifically to generate realistic Bulgarian Uniform Civil Numbers, known locally as Edinen Grazhdanski Nomer. As a core component of the IntlIDs category, this tool produces the standard 10-digit string required by Bulgarian administrative systems. Each generated value encapsulates a person's birth date, birth order, and gender, ensuring that the mock data reflects the structural integrity of real-world identifiers while maintaining privacy and security during the development lifecycle.

The technical accuracy of the bg_egn generator is rooted in its strict adherence to the official Bulgarian national standard. The function utilizes a sophisticated algorithm to calculate the final checksum digit via a MOD-11 verification process. This involves multiplying the first nine digits by a specific set of mathematical weights and determining the remainder. Furthermore, the mock-jutsu library correctly handles century offsets—adjusting the month value for individuals born in the 1800s or 2000s—ensuring that the test data remains valid across different historical and future-dated scenarios. This level of detail is essential for bypassing front-end validation logic and database constraints during rigorous testing phases.

Integrating bg_egn into your testing pipeline provides significant advantages for verifying data validation logic. Whether you are building a FinTech application requiring KYC verification or a government service portal, having access to compliant test data is essential. Developers can use this function to test form validation, database indexing, and API response handling without the risk of using sensitive personal information. The ability to generate thousands of unique, valid EGNs allows for robust stress testing and ensures that edge cases, such as leap year birthdays or specific regional codes, are handled correctly by the underlying application logic.

Accessibility is a hallmark of the mock-jutsu framework, and the bg_egn function is no exception. It can be invoked seamlessly via the command-line interface for quick data generation using "mockjutsu generate bg_egn", integrated directly into Python scripts using "jutsu.generate('bg_egn')", or utilized within performance testing suites like JMeter. By automating the creation of these complex identifiers, mock-jutsu empowers development teams to focus on core features rather than the manual creation of localized datasets. This versatility makes it an indispensable asset for any internationalized software project requiring high-fidelity Bulgarian mock data.

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

Parameters

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

Other Languages