The coordinates function in the mock-jutsu library serves as a cornerstone for developers who require high-fidelity location-based test data. By generating realistic latitude and longitude pairs, this utility enables engineering teams to simulate geographic positioning without the privacy risks or complexities associated with real-world user data. Whether you are building a mapping service, a logistics platform, or a weather application, having access to accurate coordinates in a standardized decimal degree format is essential for validating spatial logic and database integrity during the development lifecycle.
Under the hood, mock-jutsu adheres to the WGS84 geographic coordinate system, ensuring that every generated pair follows the global standard used by GPS and modern web technologies. Each coordinate consists of a latitude ranging from -90 to 90 and a longitude ranging from -180 to 180, typically represented as a comma-separated string like 39.925533,32.866287. This precision allows for rigorous testing of distance-calculation algorithms, geofencing triggers, and boundary-box queries, ensuring that your application handles diverse global locations with consistent accuracy and performance.
One of the primary benefits of using mock-jutsu for generating coordinates is its seamless integration across various environments. Developers can quickly produce mock data using the command-line interface with "mockjutsu generate coordinates" or programmatically via the Python API using "jutsu.generate('coordinates')". For performance testers, the JMeter integration allows for the injection of dynamic location test data into load tests using the syntax "${__mockjutsu(coordinates,)}". This versatility ensures that your data remains consistent whether you are performing a quick manual check or running a massive distributed stress test.
Beyond simple data generation, utilizing high-quality mock data for coordinates empowers teams to identify edge cases early, such as handling the Prime Meridian or the Antimeridian. It also facilitates the creation of realistic user movement patterns for mobile app testing. By automating the creation of location strings, mock-jutsu removes the manual overhead of sourcing datasets, allowing developers to focus on building robust features. Ultimately, this function provides the reliable, repeatable, and scalable foundation needed to ship location-aware software with confidence.
mockjutsu generate coordinates --locale TRmockjutsu generate coordinates --locale DEmockjutsu bulk coordinates --count 10 --locale TRmockjutsu export coordinates --count 10 --format json --locale TRmockjutsu export coordinates --count 10 --format csv --locale TRmockjutsu export coordinates --count 10 --format sql --locale TR# --mask: regulation-compliant output (PCI DSS / GDPR / KVKK)mockjutsu generate coordinates --locale TR --maskmockjutsu bulk coordinates --count 5 --locale TR --maskfrom mockjutsu import jutsujutsu.generate('coordinates', locale='TR')jutsu.bulk('coordinates', count=10, locale='TR')jutsu.template(['coordinates'], count=5, locale='TR')# mask=True: regulation-compliant outputjutsu.generate('coordinates', locale='TR', mask=True)jutsu.bulk('coordinates', count=5, locale='TR', mask=True)${__mockjutsu_location(coordinates,TR)}# JMeter Function: __mockjutsu_location# Parameter 1: coordinates# Parameter 2: locale (TR/UK/US/DE/FR/RU)${__mockjutsu_location(coordinates,DE)}# Add 'mask' keyword to get a regulation-compliant masked value${__mockjutsu_location(coordinates,TR,mask)}GET /generate/coordinates?locale=TR# → {"type":"coordinates","result":"...","status":"ok"}GET /bulk/coordinates?count=10&locale=TRPOST /template {"types":["coordinates"],"count":1,"locale":"TR"}# mask=true: regulation-compliant outputGET /generate/coordinates?locale=TR&mask=trueGET /bulk/coordinates?count=5&locale=TR&mask=true| 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…) |