vehicleCommerceLocale Aware

Mock Jutsu HOW-TO | EN

The vehicle function within the mock-jutsu library is a specialized tool designed for developers and QA engineers who require high-quality, commerce-related test data. This function generates comprehensive vehicle profiles that include essential attributes such as the manufacturer (make), the specific model, the production year, and a unique Vehicle Identification Number (VIN). By providing structured and realistic datasets, mock-jutsu ensures that your application’s database remains populated with consistent and believable information throughout the development lifecycle. Whether you are building an automotive marketplace or a complex fleet management dashboard, having access to accurate mock data is crucial for verifying UI layouts and backend processing logic.

Under the hood, the vehicle generator utilizes a robust algorithm that adheres to global automotive standards. The generated VINs are meticulously crafted to follow the ISO 3779 format, ensuring that your internal validation scripts and checksum logic recognize the test data as syntactically correct. This level of detail prevents false negatives during automated testing, as the mock-jutsu library avoids simple random strings in favor of contextually aware data. By simulating real-world manufacturing outputs, developers can test edge cases involving various vehicle years or specific manufacturer codes without needing access to a live production database or sensitive private information.

Utilizing this function is particularly beneficial in diverse testing scenarios such as insurance premium calculations, vehicle registration workflows, or e-commerce checkout processes. For instance, engineers can use the vehicle generator to simulate bulk imports of dealership inventory, ensuring the system handles diverse makes and models without performance degradation. Because the mock data is both deterministic and varied, it provides a stable foundation for regression testing. Integrating these datasets into your workflow helps identify potential bottlenecks in data processing and ensures that search and filter functionalities in your application behave exactly as expected for the end user.

Integration is seamless across various environments, making mock-jutsu a versatile choice for modern engineering teams. Developers can invoke the function directly via the Python API using the simple jutsu.generate('vehicle') command or use the command-line interface for quick prototyping and script automation. For performance testers, the JMeter plugin allows for the injection of dynamic vehicle data into load tests, ensuring that every concurrent request carries unique information. By streamlining the generation of complex test data, mock-jutsu reduces the manual overhead of script maintenance and accelerates the delivery of high-quality software in competitive markets.

CLI Usage
mockjutsu generate vehicle --locale TRmockjutsu generate vehicle --locale DEmockjutsu bulk vehicle --count 10 --locale TRmockjutsu export vehicle --count 10 --format json --locale TRmockjutsu export vehicle --count 10 --format csv --locale TRmockjutsu export vehicle --count 10 --format sql --locale TR# --mask: regulation-compliant output (PCI DSS / GDPR / KVKK)mockjutsu generate vehicle --locale TR --maskmockjutsu bulk vehicle --count 5 --locale TR --mask
Python API
from mockjutsu import jutsujutsu.generate('vehicle', locale='TR')jutsu.bulk('vehicle', count=10, locale='TR')jutsu.template(['vehicle'], count=5, locale='TR')# mask=True: regulation-compliant outputjutsu.generate('vehicle', locale='TR', mask=True)jutsu.bulk('vehicle', count=5, locale='TR', mask=True)
JMeter
${__mockjutsu_commerce(vehicle,TR)}# JMeter Function: __mockjutsu_commerce# Parameter 1: vehicle# Parameter 2: locale (TR/UK/US/DE/FR/RU)${__mockjutsu_commerce(vehicle,DE)}# Add 'mask' keyword to get a regulation-compliant masked value${__mockjutsu_commerce(vehicle,TR,mask)}
REST API
GET /generate/vehicle?locale=TR# → {"type":"vehicle","result":"...","status":"ok"}GET /bulk/vehicle?count=10&locale=TRPOST /template {"types":["vehicle"],"count":1,"locale":"TR"}# mask=true: regulation-compliant outputGET /generate/vehicle?locale=TR&mask=trueGET /bulk/vehicle?count=5&locale=TR&mask=true

Parameters

Parameter Values Description
--locale TR|UK|US|DE|FR|RU Region / locale for locale-aware output
--mask true | false Return a regulation-compliant masked value (PCI DSS, GDPR, KVKK…)

Other Languages