The mock-jutsu library provides a robust solution for generating realistic telecom identifiers, with the imei function serving as a cornerstone for mobile network simulation. An International Mobile Equipment Identity (IMEI) is a unique 15-digit number used to identify individual hardware devices on a cellular network. By using this function, developers can produce high-quality mock data that mirrors the structure of genuine hardware identifiers, ensuring that database schemas and validation logic are tested against accurate patterns.
Accuracy is paramount when dealing with telecom standards, which is why the imei generator in mock-jutsu strictly adheres to the Luhn algorithm. This checksum formula is the global standard used to validate various identification numbers, preventing accidental errors during data entry. Each generated imei includes a correctly calculated check digit, allowing it to pass through front-end validation scripts and back-end integrity checks without being flagged as malformed. This level of precision is essential for building reliable test data suites that behave exactly like production environments.
Integrating this functionality into your existing workflow is straightforward, whether you are working in a local development environment or a continuous integration pipeline. Developers can invoke the generator using the Python API with jutsu.generate('imei'), or utilise the command-line interface for quick data seeding via mockjutsu generate imei. For performance testers, the library also supports JMeter integration using the ${__mockjutsu(imei,)} syntax. This versatility ensures that regardless of the tooling, high-fidelity mock data is always accessible for stress testing and feature verification.
The practical applications for this function are extensive, ranging from testing mobile device management (MDM) platforms to validating billing systems and inventory databases. By using mock-jutsu to generate realistic test data, engineering teams can identify edge cases in their handling of device registrations and network activations without needing access to physical hardware. Ultimately, the imei function empowers developers to build more resilient telecom software by providing a consistent, automated, and standard-compliant source of simulated device information.
mockjutsu generate imeimockjutsu bulk imei --count 10mockjutsu export imei --count 10 --format jsonmockjutsu export imei --count 10 --format csvmockjutsu export imei --count 10 --format sql# --mask: regulation-compliant output (PCI DSS / GDPR / KVKK)mockjutsu generate imei --maskmockjutsu bulk imei --count 5 --maskfrom mockjutsu import jutsujutsu.generate('imei')jutsu.bulk('imei', count=10)jutsu.template(['imei'], count=5)# mask=True: regulation-compliant outputjutsu.generate('imei', mask=True)jutsu.bulk('imei', count=5, mask=True)${__mockjutsu_telecom(imei)}# JMeter Function: __mockjutsu_telecom# Parameter 1: imei# Parameter 2: (not required for this function)# Add 'mask' keyword to get a regulation-compliant masked value${__mockjutsu_telecom(imei,mask)}GET /generate/imei# → {"type":"imei","result":"...","status":"ok"}GET /bulk/imei?count=10POST /template {"types":["imei"],"count":1}# mask=true: regulation-compliant outputGET /generate/imei?mask=trueGET /bulk/imei?count=5&mask=true| Parameter | Values | Description |
|---|---|---|
| --mask | true | false | Return a regulation-compliant masked value (PCI DSS, GDPR, KVKK…) |