export

Mock Jutsu HOW-TO | UK

The export command within the mock-jutsu library serves as a versatile powerhouse for developers requiring high-volume test data across multiple formats. Whether you are building a new application or stress-testing an existing infrastructure, this function allows for the seamless generation of complex datasets by combining various identity and contact types into a single output. By leveraging mock-jutsu, engineers can quickly synthesise realistic information—such as full names, national identification numbers like TCKN, and international phone numbers—facilitating a robust development lifecycle without the privacy risks associated with using production data.

Technically, the export utility employs a sophisticated mapping algorithm to ensure data integrity across different output schemas. It supports bulk transformations into JSON arrays, comma-separated values (CSV), or standard SQL INSERT statements, adhering strictly to industry-standard formatting. For instance, the CSV generation follows RFC 4180 guidelines to ensure compatibility with spreadsheet software and database loaders, while the SQL output is correctly escaped to prevent syntax errors during large-scale database seeding. This flexibility ensures that the mock data produced is immediately actionable, regardless of whether the destination is a NoSQL document store or a traditional relational database management system.

Testing scenarios for the export function are extensive, ranging from initial database migrations to performance benchmarking in JMeter environments. Developers can invoke the command directly via the CLI for rapid prototyping or integrate the jutsu.generate('export') method into Python scripts for automated testing pipelines. In the context of performance testing, using the JMeter plugin allows teams to inject realistic test data into HTTP requests, simulating real-world user traffic with high fidelity. This capability is crucial for identifying bottlenecks in data processing layers before code reaches the production environment.

The primary benefit of using mock-jutsu for data exportation is the significant reduction in manual setup time. Instead of crafting bespoke scripts to generate related fields, developers can rely on a single command to produce cohesive records that maintain logical consistency. This streamlined approach not only accelerates the testing phase but also ensures that the test data remains clean, repeatable, and easily shareable across distributed teams. Ultimately, the export function empowers developers to focus on core logic by providing a reliable, automated solution for all their data synthesis requirements.

CLI Usage
mockjutsu export fullname tckn phone --count 10 --format csv --locale TRmockjutsu export fullname tckn phone --count 10 --format csv --locale DEmockjutsu export fullname tckn phone --count 50 --format csv --locale TR
Python API
from mockjutsu import jutsujutsu.generate('export', locale='TR')jutsu.bulk('export', count=10, locale='TR')jutsu.template(['export'], count=5, locale='TR')# with --count parameterjutsu.generate('export', count='int', locale='TR')
JMeter
${__mockjutsu(export,TR)}# JMeter Function: __mockjutsu# Parameter 1: export# Parameter 2: locale (TR/UK/US/DE/FR/RU)${__mockjutsu(export,DE)}
REST API
GET /generate/export?locale=TR# → {"type":"export","result":"...","status":"ok"}GET /bulk/export?count=10&locale=TRPOST /template {"types":["export"],"count":1,"locale":"TR"}

Parameters

Parameter Values Description
--locale TR|UK|US|DE|FR|RU Region / locale for locale-aware output
--count int Number of records to generate (default: 10)
--format json|csv|sql Color output format (default: hex)
--table string SQL table name for INSERT statements (default: records)

Other Languages