bg_egnIntlIDs

Mock Jutsu HOW-TO | UK

The bg_egn function within the mock-jutsu library is an essential tool for developers and QA engineers requiring authentic Bulgarian Uniform Civil Numbers, known locally as Edinen Grazhdanski Nomer, for their testing environments. This function facilitates the generation of high-quality mock data that adheres strictly to the national identification standards of Bulgaria. Each generated string consists of ten digits, encoding critical demographic information such as the individual's date of birth and sex, while ensuring structural integrity through a sophisticated validation algorithm. By using bg_egn, software engineers can bypass the risks associated with using real personal identifiers, maintaining high privacy standards while ensuring their applications handle Bulgarian regional data correctly.

Technically, the bg_egn algorithm implemented in mock-jutsu is remarkably precise. The first six digits represent the year, month, and day of birth. To accommodate different centuries, the month value is intelligently offset—adding 20 for births in the 1800s or 40 for the 2000s—ensuring the test data remains chronologically accurate and realistic. The ninth digit indicates the individual's gender, and the final tenth digit serves as a checksum calculated via a weighted MOD-11 formula. This level of detail ensures that any mock data generated will pass through front-end masks and back-end validation logic seamlessly. Whether you are invoking the function via the Python API using jutsu.generate('bg_egn') or through the command-line interface, the output remains consistently valid and reliable.

For performance testers and automation specialists, the integration of bg_egn into complex workflows is straightforward. The function is fully compatible with JMeter via the ${__mockjutsu(bg_egn,)} syntax, allowing for large-scale stress testing of government portals or financial services platforms. Common testing scenarios include verifying database constraints, checking age-restricted access logic, and validating registration forms that require a legitimate EGN format. Using mock-jutsu eliminates the manual overhead of calculating checksums or searching for valid ID patterns online, significantly accelerating the software development lifecycle.

Ultimately, the primary benefit of the bg_egn utility is the balance it strikes between realism and data security. Developers can populate their staging environments with diverse datasets that reflect real-world demographics without compromising sensitive information or violating GDPR principles. As part of the broader mock-jutsu ecosystem, this function provides a robust solution for internationalisation testing, ensuring that systems designed for the Bulgarian market are resilient, compliant, and thoroughly vetted before reaching production.

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