The rvn function within the mock-jutsu library is a specialised tool designed to generate realistic German Pension Insurance Numbers, known as the Rentenversicherungsnummer (RVNR). As a core component of the identity category, this function provides developers with the ability to produce high-fidelity mock data that adheres to the strict formatting rules used by German social security institutions. By integrating this feature into a development workflow, teams can ensure that their applications handle sensitive identity strings correctly while maintaining compliance with data protection regulations.
Each identifier produced by the rvn function follows the official architectural standard, which typically includes an area code, the user's date of birth, the initial of their birth name, a gender-specific serial number, and a final check digit calculated via a specific checksum algorithm. Because mock-jutsu accurately replicates this complex structure, the generated test data is indistinguishable from real-world entries in terms of syntax. This is particularly beneficial for testing validation logic in web forms, ensuring that input masks and back-end verification scripts behave as expected when encountering valid German insurance identifiers.
For developers working across different environments, mock-jutsu offers flexible integration methods for the rvn generator. Whether you are performing quick data generation via the command line with the "mockjutsu generate rvn" command, or building automated test suites in Python using the "jutsu.generate('rvn')" method, the library provides a seamless experience. Furthermore, performance testers can leverage the JMeter integration using the "${__mockjutsu(rvn,)}" syntax to inject dynamic identity values into load tests, simulating realistic user traffic for HR, insurance, and payroll systems.
Ultimately, the inclusion of the rvn function in your testing toolkit streamlines the creation of robust datasets for the DACH market. By automating the generation of this specific identity format, mock-jutsu eliminates the need for manual data entry and reduces the risk of using real personal information in non-production environments. This approach not only enhances the quality of test data but also accelerates the software development lifecycle, allowing engineers to focus on building features rather than managing complex identity mockups or worrying about the mathematical validity of their test strings.
mockjutsu generate rvnmockjutsu bulk rvn --count 10mockjutsu export rvn --count 10 --format jsonmockjutsu export rvn --count 10 --format csvmockjutsu export rvn --count 10 --format sql# --mask: regulation-compliant output (PCI DSS / GDPR / KVKK)mockjutsu generate rvn --maskmockjutsu bulk rvn --count 5 --maskfrom mockjutsu import jutsujutsu.generate('rvn')jutsu.bulk('rvn', count=10)jutsu.template(['rvn'], count=5)# mask=True: regulation-compliant outputjutsu.generate('rvn', mask=True)jutsu.bulk('rvn', count=5, mask=True)${__mockjutsu_identity(rvn)}# JMeter Function: __mockjutsu_identity# Parameter 1: rvn# Parameter 2: (not required for this function)# Add 'mask' keyword to get a regulation-compliant masked value${__mockjutsu_identity(rvn,mask)}GET /generate/rvn# → {"type":"rvn","result":"...","status":"ok"}GET /bulk/rvn?count=10POST /template {"types":["rvn"],"count":1}# mask=true: regulation-compliant outputGET /generate/rvn?mask=trueGET /bulk/rvn?count=5&mask=true| Parameter | Values | Description |
|---|---|---|
| --mask | true | false | Return a regulation-compliant masked value (PCI DSS, GDPR, KVKK…) |