no_fodselsnummerIntlIDs

Mock Jutsu HOW-TO | UK

The no_fodselsnummer function within the mock-jutsu library is a specialised generator designed to produce realistic Norwegian Fødselsnummer, also known as National Identity Numbers. These identifiers are essential for any software targeting the Norwegian market, as they are used extensively across healthcare, finance, and public administration. By using mock-jutsu, developers can quickly populate their databases with high-quality test data that mirrors the structure of real-world identifiers without compromising sensitive personal information or violating privacy regulations.

Technically, each generated no_fodselsnummer follows the official 11-digit format required by Norwegian authorities. The structure comprises the individual's date of birth, a three-digit individual number, and two crucial check digits calculated via the MOD-11 algorithm. This rigorous adherence to the national standard ensures that the mock data will pass both front-end validation logic and back-end checksum verification. Whether you are testing a registration form or a complex financial transaction engine, the accuracy of these check digits is vital for preventing false negatives during the quality assurance process and ensuring system integrity.

One of the primary benefits of using mock-jutsu for this purpose is its exceptional cross-platform accessibility. Developers can integrate it directly into their Python scripts using the jutsu.generate('no_fodselsnummer') method, while performance testers can leverage the ${__mockjutsu(no_fodselsnummer,)} syntax within JMeter to simulate high-load scenarios. Additionally, the CLI tool allows for the rapid generation of bulk test data for manual inspection or CSV seeding. This flexibility significantly reduces the overhead associated with manual data creation and ensures that development teams can focus on building robust, production-ready features.

Utilising synthetic mock data like the no_fodselsnummer is also a critical step for maintaining GDPR compliance and protecting user privacy during the development lifecycle. Since the generated numbers are syntactically correct but not tied to actual individuals, they provide a safe environment for stress testing and debugging. By incorporating mock-jutsu into your CI/CD pipeline, you ensure that your applications are tested against valid edge cases, including various birth years and gender-specific individual numbers, resulting in a more resilient and reliable end-product for Norwegian users.

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

Parameters

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

Other Languages