weightHealthLocale Aware

Mock Jutsu HOW-TO | UK

The weight function within the mock-jutsu library serves as a robust solution for developers requiring realistic health-related metrics during the software development lifecycle. By generating localised weight measurements in both kilograms (kg) and pounds (lbs), this feature ensures that mock data reflects real-world physiological variations. Whether you are building a fitness tracking application, a clinical management system, or a nutritional database, having access to accurate test data is essential for validating user interface components and complex backend logic.

To maintain high levels of realism, the algorithm behind the weight generator adheres to standard biological distributions found in global health datasets. It avoids the pitfalls of purely random integers, instead providing values that fall within typical human ranges while respecting the unit conventions of specific locales. This sophisticated approach means that mock-jutsu helps developers identify potential edge-case errors—such as display overflows or incorrect unit conversions—that often arise when using non-representative datasets during the initial prototyping phase.

Testing scenarios for this function are diverse, ranging from simple user profile creation forms to high-concurrency health analytics dashboards. For example, developers can use the weight function to verify how a system calculates Body Mass Index (BMI) or to populate a staging database for performance benchmarking. By utilising the `jutsu.generate('weight')` method in Python scripts or the `mockjutsu generate weight` command via the CLI, engineering teams can rapidly synthesise large volumes of realistic values without the burden of manual data entry.

Integration is seamless across various environments, including load testing platforms like JMeter through the `${__mockjutsu(weight,)}` syntax. This versatility ensures that mock-jutsu remains a primary tool for QA engineers and software architects alike. By automating the creation of weight measurements, developers benefit from improved test coverage and reduced time-to-market, ensuring that their health-tech solutions are both reliable and user-centric. The ability to generate consistent, high-quality test data makes mock-jutsu an indispensable asset in modern DevOps workflows.

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