mersisIdentity

Mock Jutsu HOW-TO | EN

In the landscape of modern software development, the ability to generate realistic and compliant test data is paramount for ensuring the robustness of financial and administrative applications. The mock-jutsu library addresses this critical need by providing a specialized function for generating a mersis number, which serves as the unique identifier for the Turkish Central Registry System. This function is essential for developers and QA engineers working on projects that involve Turkish corporate entities, allowing them to simulate complex business workflows without the risks associated with using actual production information.

The mersis function within mock-jutsu produces a 16-digit numerical string that adheres to the structural standards required by the Turkish Ministry of Trade. By simulating the specific format used for commercial registries, the library ensures that the mock data passes through front-end validation logic and back-end database constraints seamlessly. This level of precision is critical for testing data integrity across various layers of an application, from simple registration forms to intricate reporting modules and tax compliance engines. It provides a reliable way to verify that systems can handle the specific lengths and patterns expected by official Turkish regulatory frameworks.

Testing scenarios for the mersis function are diverse, ranging from validating input masks in user interfaces to performing high-concurrency stress tests on enterprise-level ERP systems. For instance, performance testers can utilize the JMeter integration to populate thousands of concurrent requests with unique identifiers, ensuring that the system handles high-volume registration traffic effectively. Furthermore, the ability to invoke the function via a simple Python call or the command-line interface makes it a versatile tool for both automated CI/CD pipelines and manual data seeding during the initial phases of development.

One of the primary benefits of using mock-jutsu for generating test data is the significant reduction in manual overhead and the elimination of privacy concerns. Instead of manually crafting dummy values that might fail validation patterns or accidentally using real-world identifiers, developers can rely on the library to provide accurate, non-sensitive identifiers instantly. This efficiency not only accelerates the development lifecycle but also helps in maintaining a clean testing environment. By integrating this function into their workflow, technical teams can focus on building high-quality features while ensuring their software is fully compatible with regional identity standards.

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

Parameters

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

Other Languages