th_tinIntlIDs

Mock Jutsu HOW-TO | UK

The th_tin function is a specialised tool within the mock-jutsu library designed to provide developers and QA engineers with accurate Thai Tax Identification Numbers. In the context of international data requirements, generating high-quality mock data is essential for building robust applications that comply with local regulatory standards. This function specifically generates a 13-digit identifier used by the Revenue Department of Thailand to identify legal entities and businesses for tax purposes. Since the Thai government harmonised the TIN and PIN formats, this generator ensures that the output adheres to the standard 13-digit structure, providing a realistic foundation for any testing suite.

Under the hood, the th_tin generator produces strings that mirror the mathematical properties required for structural validation. While it serves as test data, the mock-jutsu implementation focuses on the structural integrity of the 13-digit sequence, which typically includes a check digit to prevent clerical errors. By using this function, developers can bypass the manual creation of dummy identifiers, which are often prone to formatting mistakes. Whether you are using the Python API with jutsu.generate('th_tin') or the command-line interface, the library delivers consistent results that facilitate seamless integration into automated workflows or JMeter performance tests via the custom plugin.

Utilising th_tin is particularly beneficial for quality assurance teams working on financial technology, e-commerce platforms, or enterprise resource planning systems targeting the Southeast Asian market. In these scenarios, having reliable mock data allows for the rigorous testing of input validation logic, database constraints, and API endpoints without the risk of exposing sensitive, real-world information. By integrating mock-jutsu into your CI/CD pipeline, you ensure that your software can handle Thai business identifiers correctly from the initial development phase through to final production staging, ensuring compliance with data protection principles.

Ultimately, the primary benefit of the th_tin function is the efficiency it brings to the development lifecycle. It eliminates the need for developers to research complex international ID formats, allowing them to focus on core application logic instead. By providing a standardised way to generate Thai business IDs, mock-jutsu helps teams maintain high data quality and avoid the pitfalls of using non-compliant or "garbage" data during the testing phase. This professional approach to data synthesis ensures that applications are not only functional but also ready for the complexities of the global digital economy.

CLI Usage
mockjutsu generate th_tinmockjutsu bulk th_tin --count 10mockjutsu export th_tin --count 10 --format jsonmockjutsu export th_tin --count 10 --format csvmockjutsu export th_tin --count 10 --format sql# --mask: regulation-compliant output (PCI DSS / GDPR / KVKK)mockjutsu generate th_tin --maskmockjutsu bulk th_tin --count 5 --mask
Python API
from mockjutsu import jutsujutsu.generate('th_tin')jutsu.bulk('th_tin', count=10)jutsu.template(['th_tin'], count=5)# mask=True: regulation-compliant outputjutsu.generate('th_tin', mask=True)jutsu.bulk('th_tin', count=5, mask=True)
JMeter
${__mockjutsu_intl_ids(th_tin)}# JMeter Function: __mockjutsu_intl_ids# Parameter 1: th_tin# Parameter 2: (not required for this function)# Add 'mask' keyword to get a regulation-compliant masked value${__mockjutsu_intl_ids(th_tin,mask)}
REST API
GET /generate/th_tin# → {"type":"th_tin","result":"...","status":"ok"}GET /bulk/th_tin?count=10POST /template {"types":["th_tin"],"count":1}# mask=true: regulation-compliant outputGET /generate/th_tin?mask=trueGET /bulk/th_tin?count=5&mask=true

Parameters

Parameter Values Description
--mask true | false Return a regulation-compliant masked value (PCI DSS, GDPR, KVKK…)

Other Languages