tcknIdentity

Mock Jutsu HOW-TO | EN

The tckn function within the mock-jutsu library provides developers and QA engineers with a robust solution for generating realistic Turkish Identification Numbers. When building or testing applications tailored for the Turkish market, developers often encounter strict validation rules for identity fields that can halt the testing process if the data is not formatted correctly. Using mock-jutsu ensures that the generated test data passes these complex front-end and back-end checks, allowing for seamless integration testing and UI verification without the need for manual data entry.

Technical accuracy is the cornerstone of the tckn generator. Unlike simple random number generators that produce arbitrary strings, this tool strictly adheres to the official Turkish ID standards, which utilize a specific Modulo 10 and Modulo 11 checksum algorithm. Every generated value consists of 11 digits, where the first digit is never zero, and the final two digits serve as mathematical checksums calculated from the preceding numbers. By incorporating these specific constraints, mock-jutsu provides mock data that is technically valid according to standard verification logic, making it perfect for bypassing form validation scripts and database constraints during the software development lifecycle.

For modern engineering teams, the tckn function unlocks various critical testing scenarios, ranging from simple user registration flows to complex financial transaction processing and KYC (Know Your Customer) simulations. In a landscape governed by strict data protection laws like GDPR and KVKK, using actual citizen IDs for testing purposes is a significant compliance risk. Mock-jutsu effectively mitigates this risk by providing synthetic yet valid alternatives. Whether you are populating a staging database with thousands of records or simulating high-traffic load tests in JMeter, this function ensures your system handles identity verification smoothly under any condition.

Integration is designed to be effortless across different environments, catering to diverse developer workflows. Whether you prefer the speed of the command-line interface for quick samples, the flexibility of the Python library for automated test suites, or the performance monitoring capabilities of the JMeter plugin, the tckn utility is readily available. By automating the creation of valid identity markers, mock-jutsu empowers teams to focus on core logic rather than data preparation. This efficiency significantly reduces the time-to-market for localized software and ensures that all edge cases involving identity validation are thoroughly addressed before production deployment.

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

Parameters

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

Other Languages