In the realm of financial software development, the accuracy of mock data is paramount for ensuring robust payment processing and accounting logic. The mock-jutsu library addresses this need through its dedicated currency function, a specialised tool within the Commerce category designed to produce authentic monetary identifiers. By generating realistic test data that mirrors real-world financial structures, developers can simulate complex transactions without the risks associated with using sensitive production information.
This function operates by retrieving localised currency details, providing both the ISO 4217 alphabetic code and the corresponding currency symbol. For instance, a call to the function might return a structured object containing the Turkish Lira as {code:TRY, symbol:TL}. The algorithm behind mock-jutsu ensures that these pairings remain consistent and accurate to international standards, allowing for seamless integration into databases or front-end components that require specific formatting. This adherence to global standards ensures that your application remains compliant with international financial protocols during the testing phase.
Integration is straightforward across various environments, making it a versatile choice for modern engineering teams. Python developers can invoke the tool using the jutsu.generate('currency') method, while those preferring command-line interactions can utilise the mockjutsu generate currency command. Furthermore, for performance engineers, the library provides a JMeter plugin via the ${__mockjutsu(currency,)} syntax. This cross-platform availability ensures that whether you are writing unit tests or conducting large-scale load testing, your currency mock data remains uniform and reliable.
The practical benefits of using mock-jutsu extend to a wide range of testing scenarios, particularly in e-commerce and fintech sectors. It is exceptionally useful for verifying multi-currency support in shopping carts, testing exchange rate conversion logic, and ensuring that UI components render various symbols correctly across different locales. By automating the generation of these details, developers can focus on refining core business logic, reducing the manual overhead of sourcing valid currency codes. Ultimately, this leads to faster development cycles and more resilient financial applications.
mockjutsu generate currency --locale TRmockjutsu generate currency --locale DEmockjutsu bulk currency --count 10 --locale TRmockjutsu export currency --count 10 --format json --locale TRmockjutsu export currency --count 10 --format csv --locale TRmockjutsu export currency --count 10 --format sql --locale TRfrom mockjutsu import jutsujutsu.generate('currency', locale='TR')jutsu.bulk('currency', count=10, locale='TR')jutsu.template(['currency'], count=5, locale='TR')${__mockjutsu_commerce(currency,TR)}# JMeter Function: __mockjutsu_commerce# Parameter 1: currency# Parameter 2: locale (TR/UK/US/DE/FR/RU)${__mockjutsu_commerce(currency,DE)}GET /generate/currency?locale=TR# → {"type":"currency","result":"...","status":"ok"}GET /bulk/currency?count=10&locale=TRPOST /template {"types":["currency"],"count":1,"locale":"TR"}| Parameter | Values | Description |
|---|---|---|
| --locale | TR|UK|US|DE|FR|RU | Region / locale for locale-aware output |