Your staging environment needs 50 Brazilian user profiles by Thursday. The localization team is testing the Brazil launch, and the test plan calls for realistic seed data — profiles with valid CEP postal codes, correctly formatted phone numbers, and CPF numbers that pass the check digit algorithm.
You start with what you have. You find a CPF generator online and generate 50 numbers. You dump them into a spreadsheet. Now you need names. You copy 50 names from a name generator — but it’s giving you English names, so you switch to a Brazilian name generator and get 50 Portuguese names. They go into column B. Addresses: you find a Brazilian address generator, but it only outputs one at a time with no batch option. You generate 30 manually before giving up and writing a script that randomizes street numbers and picks from a hardcoded list of 8 street names.
Phone numbers: you know Brazilian mobile numbers start with +55 and then an area code, but mobiles use a 9-digit subscriber number (the ninth digit was added in 2012), while landlines use 8 digits. Your script generates 10-digit numbers for all of them. Half your phone numbers are technically invalid.
Three hours in, you have a CSV. You run the database seed script. It fails on row 47 — a CPF with an invalid check digit. You fix it. It fails on row 183 — a CEP postal code that doesn’t correspond to a real Brazilian region. You fix it. It fails on row 312 — a phone number with only 8 digits where the format requires 9. You fix it. You re-run the import. It passes, but when the localization team starts testing, they notice phone numbers with wrong digit counts, CEPs that don’t map to real regions, and addresses that mix formats from different countries.
The data is structurally valid enough to import. It’s not internally consistent enough to test with. And you just spent four hours building it.
DataHub generates 50 format-validated Brazilian profiles in a single batch operation. Every CPF passes the check digit algorithm. Every phone number follows the correct Brazilian mobile format with a valid area code. Every CEP uses a real Brazilian postal code format. The output exports as a single CSV or JSON file, ready to pipe directly into your seed script. The import succeeds on the first run because every row was validated before it left DataHub.
This post goes deep on the three things Post #02 didn’t cover: the country-specific format rules that make generated data pass real validation, the batch generation workflow for seeding databases at scale, and the export options that get data out of Test Nexus and into your pipeline.
Country-Specific Format Rules: Why “Valid” Isn’t Enough
A test data generator that produces structurally valid data solves half the problem. A generator that produces country-appropriate data — where the phone number follows the country’s actual mobile format, where the postal code uses real regional ranges, where the national ID format includes valid check digits — solves the whole problem.
DataHub maintains format rule sets for each supported country. These rules go deeper than “correct number of digits.” Here’s what that means in practice for four countries you’re likely testing:
Brazil
CPF (Cadastro de Pessoas Físicas):
11 digits in the format XXX.XXX.XXX-DD, where the last two digits (DD) are check digits calculated from the first nine using a specific modular arithmetic formula (weights of 10 through 2 for the first check digit, 11 through 2 for the second). DataHub doesn’t just generate 11 random digits — it computes the check digits so the number passes the same validation algorithm your app’s backend uses.
Phone numbers:
Brazilian phone number formatting changed in 2012 when mobile numbers gained a ninth digit. DataHub generates mobile numbers in E.164 format with the correct 9-digit structure and a valid Brazilian area code (e.g., 11 for São Paulo, 21 for Rio, 61 for Brasília). Example: +5511987654321 — country code +55, area code 11, mobile prefix 9, followed by 8 digits. All generated numbers are validated using Google’s libphonenumber library.
CEP (Código de Endereçamento Postal): Brazilian postal codes follow regional ranges. DataHub generates addresses with real CEP codes drawn from its bundled Brazilian address database, ensuring your address validation logic sees the same patterns real Brazilian addresses exhibit.
Names: DataHub generates culturally appropriate Brazilian names from its bundled database of 50 first names, 50 middle names, and 50 last names — producing names like “Miguel Eduardo Silva” or “Alice Vitoria Santos” that reflect real Brazilian naming patterns, including accent characters (ã, é, ç) that exercise your app’s character handling and encoding logic.
Australia
TFN (Tax File Number): 9 digits (formatted as XXX XXX XXX) with a weighted checksum. The weights are 1, 4, 3, 7, 5, 8, 6, 9, 10 — the sum of each digit multiplied by its corresponding weight must be divisible by 11. DataHub generates 8 random digits and computes the 9th so the checksum passes, producing TFNs that satisfy the same validation algorithm used by the Australian Taxation Office.
Phone numbers:
DataHub generates Australian mobile numbers in E.164 format: +614XXXXXXXX (the 04 domestic prefix becomes +614 internationally). All generated numbers are validated using Google’s libphonenumber library to ensure correct digit count and valid area codes.
Postcodes: Australian postcodes map to specific states. DataHub generates addresses with real postcodes and suburb names drawn from its bundled Australian address database, providing high-fidelity test data for location-based services.
Address format:
Australian addresses use the format [Unit/Level], [Street Number] [Street Name], [Suburb] [State] [Postcode]. Urban addresses frequently include unit numbers. DataHub generates addresses in this format with suburb names that correspond to the correct postcode range.
Spain
Spain is notable for having three distinct national ID types, making it an excellent test case for apps that handle multiple document formats.
DNI (Documento Nacional de Identidad):
8 digits plus a control letter. The letter is calculated by dividing the 8-digit number by 23 and looking up the remainder in the sequence TRWAGMYFPDXBNJZSQVHLCKE. For example, if the number is 12345678, the remainder of 12345678 ÷ 23 is 14, and position 14 in the sequence is Z, giving 12345678Z. DataHub generates DNIs where the control letter is mathematically correct.
NIF (Número de Identificación Fiscal): Spain’s tax ID uses the same 8-digit + letter format as the DNI, with the same modulo 23 check letter algorithm. DataHub generates valid NIF numbers for tax-related form testing.
NIE (Número de Identidad de Extranjero): Foreign resident ID with a prefix letter (X, Y, or Z) followed by 7 digits and a control letter. The prefix maps to a number (X→0, Y→1, Z→2), which is prepended to the 7 digits to form an 8-digit number, then the same modulo 23 algorithm determines the check letter. DataHub generates NIEs with valid prefixes and mathematically correct check letters.
Phone numbers:
DataHub generates Spanish mobile numbers in E.164 format: +346XXXXXXXX (mobiles always start with 6). All numbers are validated using Google’s libphonenumber library.
Postal codes: Spanish postal codes are 5 digits. The first two digits indicate the province (01 = Álava, 08 = Barcelona, 28 = Madrid, 41 = Seville). DataHub generates addresses with valid Spanish postal codes from its bundled dataset.
Chile
RUT (Rol Único Tributario): 8 digits plus a check digit that can be 0–9 or K. The check digit is calculated using modulo 11 with weights cycling through 2, 3, 4, 5, 6, 7. DataHub generates RUTs with valid check digits, including the K variant when the modulo result dictates it.
Phone numbers:
DataHub generates Chilean mobile numbers in E.164 format: +569XXXXXXXX (all Chilean mobiles use area code 9). Validated using Google’s libphonenumber library.
RUN vs RUT: The RUN (Rol Único Nacional) uses the same format as RUT but is for natural persons rather than taxpayers. For testing purposes, the format and validation algorithm are identical. DataHub generates valid numbers for both.
Individual vs. Batch: Two Ways to Generate
Test Nexus provides two distinct ways to work with IDs and cards, depending on your testing needs.
1. DataHub (The Profile Workflow)
Use DataHub when you need complete identities. It generates a single record with name, address, phone, and multiple IDs that all belong to the same person. It’s optimized for:
- Seeding databases via batch CSV/JSON export.
- Filling out multi-screen onboarding forms.
- Testing localization with country-specific profiles.
2. IDs & Cards (The Standalone Toolkit)
Use the standalone IDs & Cards module when you need direct validation or individual data types. It supports 56 distinct types (compared to DataHub’s subset) and includes features like:
- Rich Validation: Enter any value to see detailed error messages explaining check digit failures or structural errors.
- 8 Card Brands: Access Discover, Diners Club, and Maestro, which are not available in DataHub profiles.
- Banking Identifiers: Dedicated generators for IBAN, SWIFT/BIC, LEI, and ISIN.
- Favorites & History: Save your most common test cards for instant retrieval.
| Feature | DataHub Profiles | IDs & Cards Tool |
|---|---|---|
| Primary Goal | Complete test identities | Individual data validation |
| Card Brands | 5 (Visa, MC, Amex, JCB, UnionPay) | 8 (adds Discover, Diners, Maestro) |
| Total Types | ~15 fields per profile | 56 standalone data types |
| Validation UI | Generation only | Rich validation with error messages |
| Animation | Flat profile display | 3D card flip animation |
Growing Country Coverage
DataHub currently supports country-specific ID format rules for 38 countries, with culturally appropriate names and addresses available for approximately 190 countries. Each country’s ID support includes:
- National ID format with check digit algorithms
- Phone number structure (mobile, landline, and country-specific area codes)
- Valid postal code formats and regional ranges
- Address format conventions (street naming, unit numbering, line ordering)
- Payment card types used in that market
If you’re testing for a country that doesn’t yet have full ID support, DataHub still generates culturally appropriate names and addresses from its bundled database of ~190 countries, along with structurally valid phone numbers. The country-specific ID rules add validated national identifiers — matching check digit algorithms, regional variants, and format conventions — that make the data pass your app’s full validation stack.
Batch Generation: Up to 50 in One Operation
Single-profile generation is covered in Post #02. Here’s how DataHub handles scale.
Configuring a Batch
A batch generation request specifies:
- Country — which country’s format rules to apply
- Quantity — how many profiles to generate (choose from 10, 20, or 50 per batch — default: 10)
Each profile in the batch is complete — name, email, phone, address, password, and all available IDs (national, payment, and banking) for the selected country.
How Batch Generation Works
DataHub generates all profiles locally using bundled data and algorithms:
- Speed: Up to 50 profiles in seconds. No network call, no API latency — the algorithm runs locally on the device.
- Cost: Zero tokens. Batch 10 profiles, batch 50 — the cost is the same: free.
- Consistency: Every profile passes format validation. Check digits are computed, phone numbers follow correct country formats, and addresses use real postal codes. No row-by-row debugging.
- Variety: Each profile is unique. Names, addresses, phone numbers, and ID numbers are all different across the batch. You’re not getting 50 copies of the same person.
Names are drawn from a bundled database of ~190 countries, so they’re culturally appropriate — Brazilian profiles get Brazilian names, Japanese profiles get Japanese names. Addresses follow each country’s local format conventions. For database seeding, what matters most is that the CEP follows valid Brazilian format and the CPF check digits are correct — and DataHub ensures both.
Country-Level Consistency
When you generate a batch for Brazil, DataHub draws from its bundled address database for Brazilian addresses. Every profile gets a culturally appropriate name, a correctly formatted phone number with a valid area code, a real CEP postal code, and a CPF with valid check digits.
A batch of 50 Brazilian profiles gives you 50 unique profiles that all pass Brazilian format validation — ready for database import without row-by-row debugging.
Export: Getting Data Out of Test Nexus
Generated data is only useful if it can leave Test Nexus and enter your testing pipeline. DataHub exports to four formats, each designed for a different integration point.
JSON Export
[
{
"firstName": "Lucas",
"middleName": "Eduardo",
"lastName": "Silva",
"country": "Brazil",
"email": "LucasEduardo-BR-test-4523-@mailinator.cc",
"phone": "+556198742315",
"governmentIds": [
{ "type": "CPF", "number": "382.916.547-20" },
{ "type": "CNPJ", "number": "12.345.678/0001-95" }
],
"financialIds": [
{ "type": "Visa", "value": "4532-XXXX-XXXX-0366" }
]
},
{
"firstName": "Alice",
"middleName": "Vitoria",
"lastName": "Santos",
...
}
]
Best for: API testing (import into Postman collections), JavaScript/Python test scripts that parse JSON natively, NoSQL database seeding (MongoDB, Firestore), and any pipeline that expects structured data.
CSV Export
"First Name","Middle Name","Last Name","Country","Email","Phone","Government IDs","Financial IDs"
"Lucas","Eduardo","Silva","Brazil","LucasEduardo-BR-test-4523-@mailinator.cc","+556198742315","CPF: 382.916.547-20; CNPJ: 12.345.678/0001-95","Visa: 4532-XXXX-XXXX-0366"
"Alice","Vitoria","Santos","Brazil","AliceVitoria-BR-test-7891-@mailinator.cc","+552197531482","CPF: 714.258.903-61","Visa: 4111-XXXX-XXXX-1111"
Best for: Spreadsheet review, data pipeline tools (Pandas, dbt), and quick imports. For SQL database seeding, you may want to parse the concatenated ID columns into separate fields during import.
XML Export
For systems that expect XML input, SOAP-based test scenarios, or legacy enterprise integrations.
TSV Export
Tab-separated values for quick spreadsheet imports, shell script processing, and systems where comma-delimited data conflicts with field content.
Export Scope
You can export all profiles in your database, or filter first using the country dropdown and search bar, then export only the filtered subset. This is useful when you’ve generated profiles for multiple countries but only need to seed one country’s data at a time.
Export Workflow
- Generate your batch (any quantity)
- Optionally filter by country or search query
- Tap Export → Choose JSON, CSV, XML, or TSV → Choose All or Filtered
- Save to Downloads to keep the file on your device, or Share to send it directly to another app (email, Slack, Drive, ADB push)
All generated profiles are stored in Test Nexus’s AES-256 encrypted local databases on the device, and never transmitted to any server.
From there, the exported file enters your existing pipeline. A typical database seeding flow:
DataHub → Export CSV → ADB push to laptop → psql COPY → Staging DB seeded
Or without a laptop, using Test Nexus Terminal:
DataHub → Export CSV → SFTP upload to staging server → SSH: psql COPY → Staging DB seeded
The second path never leaves the phone. Generate the data, upload it to the server via SFTP, run the import command via SSH. Zero laptop.
The Full Pipeline: Seed 50 Brazilian Profiles Without a Laptop
Here’s the opening scenario resolved end-to-end, entirely on one device:
Step 1: Generate the data (30 seconds)
- Open DataHub → Select Brazil
- Generate 50 profiles in a single batch
- Each profile has valid CPFs, correctly formatted phone numbers, and real Brazilian addresses
- Export as CSV:
brazil_seed_50.csv
Step 2: Upload to staging (30 seconds)
- Open Test Nexus Terminal → SFTP to staging server
- Upload
brazil_seed_50.csvto/tmp/seed/
Step 3: Import to database (30 seconds)
- Switch to SSH session
- Run:
\COPY users (first_name, middle_name, last_name, country,
email, phone, government_ids, financial_ids)
FROM '/tmp/seed/brazil_seed_50.csv'
WITH (FORMAT csv, HEADER true);
- 50 rows imported. Zero errors. Every CPF valid. Every phone number in correct format. Every name culturally appropriate.
Step 4: Verify (15 seconds)
SELECT COUNT(*) FROM users
WHERE created_at > CURRENT_DATE;
count
-------
50
50 profiles with valid CPFs, correctly formatted phone numbers, and properly structured Brazilian addresses.
Total time: under 2 minutes. Compare to the hours-long spreadsheet assembly from the opening. The difference isn’t marginal — it’s an order of magnitude.
Supported Data Types: Quick Reference
| Category | Examples | Validation |
|---|---|---|
| Payment cards | Visa, Mastercard, Amex, JCB, UnionPay | Luhn algorithm, correct BIN prefix, valid length, matching expiry + CVV |
| National IDs | CPF (Brazil), DNI/NIF/NIE (Spain), RUT (Chile), Aadhaar (India), SSN (USA), TFN (Australia), and 32 more | Country-specific check digit algorithms |
| Phone numbers | Mobile and landline per country | Correct country format, valid area code, correct digit count, 9-digit mobile format for Brazil |
| Addresses | Street, number, complement, neighborhood, city, state, postal code | Real postal codes from bundled database, format follows country convention |
| Generated from name fields | Format valid, domain plausible | |
| Names | First, middle, surname per country convention | Culturally appropriate names from bundled database of ~190 countries |
| Bank identifiers | IBAN (12 EU countries + Turkey), ABA Routing (US), Sort Code (UK), BLZ (Germany), BSB (Australia), IFSC (India), Transit Number (Canada), CLABE (Mexico) | Country-specific structure with valid formats |
Country-specific IDs across 38 countries, with names and addresses available for approximately 190 countries.
Get Started
DataHub is available immediately after installing Test Nexus. No tokens required. No internet connection needed.
- Open DataHub → Select your target country
- Set quantity — choose from 10 (default), 20, or 50 profiles per batch
- Generate — complete profiles with all available IDs, created instantly on the device
- Export — JSON, CSV, XML, or TSV, ready for your pipeline
🚀 Seed your staging database with 50 valid, internally consistent profiles in under 2 minutes. DataHub generates the data, validates every field, and exports in the format your pipeline expects. Download Test Nexus →
What’s Next
- Post #09 — Token System: what’s free, what uses tokens, and how rewarded ads work