Dynamic Data Generation
Tests that always use the same input miss bugs that only surface with varied data. BlinqIO lets you replace static values with dynamic expressions that generate fresh, realistic data on every run: no external scripts, no manual updates.
Faker.js Integration
BlinqIO includes built-in support for Faker.js. Replace any static parameter value with a Faker expression and the system generates a random, realistic value at runtime.
Syntax: {{faker.<module>.<method>}}
Common Faker Expressions
| Expression | Example output |
|---|---|
{{faker.person.firstName}} | Jessica |
{{faker.person.lastName}} | Thompson |
{{faker.internet.email}} | jessica.thompson@example.com |
{{faker.phone.number}} | (555) 482-3719 |
{{faker.company.name}} | Acme Solutions |
{{faker.commerce.price}} | 42.99 |
{{faker.internet.userName}} | jessica_t83 |
{{faker.location.city}} | Portland |
{{faker.lorem.sentence}} | Quick brown fox jumps over the lazy dog. |
To use a Faker expression, replace the static value in your test data parameter with the expression. The AI Recorder and the execution engine both resolve it automatically.
Date Expressions
Generate dates relative to today using natural language. This is especially useful for booking forms, scheduling tests, and date-range validations where hard-coded dates go stale.
Syntax: {{date:<natural language description>}}
Common Date Expressions
| Expression | Result (if today is 2026-04-02) |
|---|---|
{{date:today}} | 2026-04-02 |
{{date:tomorrow}} | 2026-04-03 |
{{date:yesterday}} | 2026-04-01 |
{{date:5 days from now}} | 2026-04-07 |
{{date:next monday}} | 2026-04-06 |
{{date:first day of next month}} | 2026-05-01 |
{{date:last business day of this month}} | 2026-04-30 |
Custom Output Formats
By default, dates are returned in YYYY-MM-DD format. Append >> followed by a format string to change the output:
| Expression | Output |
|---|---|
{{date:today >> dd/mm/yyyy}} | 02/04/2026 |
{{date:today >> mm/dd/yyyy}} | 04/02/2026 |
{{date:today >> dd}} | 02 |
{{date:today >> mm}} | 04 |
{{date:today >> yyyy}} | 2026 |
Relative Date Calculations
You can offset dates using + and - operators with days, months, or years:
| Expression | Meaning |
|---|---|
{{date:today + 30 days}} | 30 days from today |
{{date:today - 7 days}} | 7 days ago |
{{date:today + 3 months}} | 3 months from today |
{{date:today + 1 year}} | 1 year from today |
Concatenation
Combine multiple values into a single string using the + operator. This works with static strings, numbers, and Faker expressions.
| Example | Result |
|---|---|
"Order-" + "12345" | Order-12345 |
100 + 50 | 150 |
"User: " + 42 | User: 42 |
"Hello " + {{faker.person.firstName}} | Hello Jessica |
"test+" + {{faker.internet.email}} | test+jessica@example.com |
Custom JavaScript Evaluation
For logic that goes beyond simple expressions, wrap JavaScript code in ${}. The code executes at runtime and the return value replaces the expression.
Syntax: ${<javascript code>}
Examples
| Expression | Purpose |
|---|---|
${(149.99 * 0.08).toFixed(2)} | Calculate 8% tax on a price |
${"(" + "555" + ") " + Math.floor(Math.random()*900+100) + "-" + Math.floor(Math.random()*9000+1000)} | Generate a formatted phone number |
${new Date().getTime()} | Unix timestamp for unique IDs |
${Math.floor(Math.random() * 100)} | Random number between 0 and 99 |
${price > 100 ? "premium" : "standard"} | Conditional logic based on a variable |
Where Expressions Work
Dynamic expressions are supported across the platform, not just in form inputs:
| Location | Example use case |
|---|---|
| Form inputs | Fill a registration form with random names and emails |
| Assertions | Verify a date field shows today's date |
| API payloads | Send a unique email in a POST request body |
| Test data variables | Define a project-level variable with a Faker value |
| Element locators | Target an element whose ID includes a dynamic date |
| Validation rules | Assert that a calculated total matches an expression |
TOTP Automation
For applications that require time-based one-time passwords (two-factor authentication), BlinqIO can generate TOTP codes automatically.
Setup:
- Navigate to Test Data in the left sidebar.
- Click Add Test Data.
- Set the Data Type to
TOTP. - Paste the TOTP secret key as the value.
- Save.
Usage during recording:
When you reach a TOTP input field, use the project test data value you created. BlinqIO generates a fresh, valid code each time. The code is auto-regenerated on page refresh so you never need to manually copy from an authenticator app.
This eliminates the manual bottleneck of two-factor authentication in automated tests while keeping the secret key securely stored as project-level test data.
