bicBankingLocale Aware

Mock Jutsu HOW-TO | UK

The bic function within the mock-jutsu library is a specialised tool designed to generate realistic Business Identifier Codes, commonly known as SWIFT codes. In the realm of financial software development, having access to high-quality mock data is essential for simulating international wire transfers and interbank communications. By utilising this function, developers can ensure their applications handle bank identification correctly without relying on sensitive, real-world production data, which is critical for maintaining security during the initial stages of the software development lifecycle.

Adhering strictly to the ISO 9362 standard, the bic generator produces alphanumeric strings that follow the mandatory eight or eleven-character format. Each generated value includes a four-character bank code, a two-character ISO country code, and a two-character location code. When an eleven-character string is produced, mock-jutsu appends a three-character branch code, providing a comprehensive dataset that mirrors actual financial infrastructure. This level of detail is crucial for testing validation logic and ensuring that database schemas are properly configured to store varying lengths of banking identifiers like the example DEUTDEDB.

Integrating this function into your workflow is seamless, whether you are working in a local development environment or a complex continuous integration pipeline. For Python developers, a simple call to jutsu.generate('bic') yields immediate results, while those performing performance or load testing can utilise the JMeter plugin syntax. The availability of a CLI command further enhances its utility for quick data seeding tasks and shell scripting. By incorporating these realistic strings into your test data suites, you can effectively verify payment routing logic, currency exchange modules, and cross-border transaction workflows with confidence.

Beyond technical accuracy, using mock-jutsu for banking identifiers offers significant compliance benefits. Since the generated bic values are synthetically created, engineering teams can work in non-production environments without the risk of exposing genuine financial records, thereby meeting strict data privacy regulations. This approach not only accelerates the development lifecycle by removing dependencies on external banking APIs but also provides a robust foundation for stress testing financial systems against a wide variety of global bank identifiers, ensuring your application is ready for the global market.

CLI Usage
mockjutsu generate bic --locale TRmockjutsu generate bic --locale DEmockjutsu bulk bic --count 10 --locale TRmockjutsu export bic --count 10 --format json --locale TRmockjutsu export bic --count 10 --format csv --locale TRmockjutsu export bic --count 10 --format sql --locale TR
Python API
from mockjutsu import jutsujutsu.generate('bic', locale='TR')jutsu.bulk('bic', count=10, locale='TR')jutsu.template(['bic'], count=5, locale='TR')
JMeter
${__mockjutsu_banking(bic,TR)}# JMeter Function: __mockjutsu_banking# Parameter 1: bic# Parameter 2: locale (TR/UK/US/DE/FR/RU)${__mockjutsu_banking(bic,DE)}
REST API
GET /generate/bic?locale=TR# → {"type":"bic","result":"...","status":"ok"}GET /bulk/bic?count=10&locale=TRPOST /template {"types":["bic"],"count":1,"locale":"TR"}

Parameters

Parameter Values Description
--locale TR|UK|US|DE|FR|RU Region / locale for locale-aware output

Other Languages