handleSocial

Mock Jutsu HOW-TO | EN

The handle function within the mock-jutsu library is a specialized utility designed to generate realistic social media identifiers for modern application development. In today’s digital landscape, a handle serves as a primary user identity across platforms like X, Instagram, and GitHub. By utilizing this function, developers can instantly produce strings that mirror authentic user behavior, such as "@cooldev42" or "@tech_wizard." This capability is essential for building applications that require a social component, ensuring that the user interface looks and feels genuine during the prototyping and development phases.

Behind the scenes, mock-jutsu employs a sophisticated randomization algorithm that adheres to common social media naming conventions. The library ensures every handle begins with the mandatory "@" prefix, followed by a strategic combination of alphanumeric characters and underscores. This approach prevents the generation of nonsensical "garbage" text, instead providing high-quality mock data that passes standard validation checks. By mimicking the character limits and formatting styles of popular global networks, the handle function provides a seamless bridge between raw data generation and real-world application requirements.

For quality assurance engineers and developers, the handle function is an invaluable asset for creating robust test data. It is particularly useful when testing user profile pages, comment sections, or notification systems where visual consistency and layout integrity are paramount. Whether you are performing load testing on a new messaging API or verifying the character truncation logic in a mobile UI, having access to diverse and predictable handles allows for more comprehensive edge-case coverage. It effectively eliminates the need for tedious manual data entry, allowing teams to focus on identifying logic flaws rather than formatting dummy strings.

Integrating this function into your existing workflow is remarkably straightforward, regardless of your specific tech stack. Developers can invoke handle generation through the mock-jutsu CLI for quick data seeding, call it directly within Python scripts for complex backend logic, or use it as a custom function in JMeter for performance benchmarking. This cross-platform versatility ensures that your mock data remains consistent across the entire development lifecycle. By leveraging mock-jutsu, engineering teams can significantly accelerate their time-to-market while maintaining a high standard of data integrity throughout their testing environments.

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

Parameters

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

Other Languages