bulk

Mock Jutsu HOW-TO | EN

The bulk command within the mock-jutsu library serves as a high-performance utility for developers who need to produce large volumes of synthetic information rapidly. Unlike single-value generators, this function is designed to scale any existing data type by generating N values in a single execution. Whether you are working via the command-line interface, integrating directly into a Python script with jutsu.generate, or utilizing the library within a JMeter performance test, the bulk command provides a streamlined way to populate arrays and datasets. It acts as a sophisticated wrapper that inherits all global flags, allowing users to apply specific constraints like network protocols, currency formats, or locale settings across the entire generated set.

Under the hood, mock-jutsu utilizes a high-efficiency iteration algorithm that ensures each entry in the bulk output maintains the structural integrity and randomization standards of its underlying type. For example, if a developer requests a batch of credit card numbers or IP addresses, the engine applies the relevant standards—such as the Luhn algorithm for financial data or specific IPv4/v6 protocols for networking—to every item in the collection. This ensures that the resulting test data is not only voluminous but also valid and realistic for complex validation logic. By automating the repetition of these generation logic patterns, the library removes the manual overhead typically associated with creating large-scale arrays for application testing.

This functionality is particularly beneficial in scenarios involving database seeding, load testing, and stress testing. When engineers need to simulate thousands of concurrent user interactions or fill a staging environment with millions of unique records, the bulk command becomes an essential part of the CI/CD pipeline. It allows for the creation of diverse test data that can expose edge cases in data processing pipelines and search algorithms. By providing a consistent and repeatable way to generate mock data at scale, mock-jutsu empowers development teams to identify performance bottlenecks and ensure their systems can handle high-traffic environments without the risks associated with using real production data.

Ultimately, the primary developer benefit of using the bulk function is the significant reduction in time-to-market for data-intensive projects. Instead of writing custom loops or scripts to aggregate individual mock data points, users can leverage a single command to get exactly what they need in a structured format. The versatility of mock-jutsu ensures that whether the requirement is for localized addresses or specific network headers, the bulk generation remains performant and reliable. This efficiency allows teams to focus more on core application logic and less on the tedious maintenance of static test files, leading to more robust and well-tested software architectures.

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

Other Languages