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>}}
If the Faker method takes arguments, include them in parentheses:
{{faker:string.numeric(5)}}{{faker:helpers.fake("{{person.firstName}}.{{person.lastName}}@example.com")}}
Common Faker Expressions
| Expression | Example output |
|---|---|
{{faker:person.firstName}} | Jessica |
{{faker:person.lastName}} | Thompson |
{{faker:internet.email}} | jessica.thompson@example.com |
{{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. |
{{faker:string.numeric(5)}} | 48237 |
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 |
Combining Values
Use one of these supported patterns when you need to build a value from multiple parts:
| Pattern | Example | Result |
|---|---|---|
| Plain text around tokens | Hello {{faker:person.firstName}} | Hello Jessica |
| Faker template generation | {{faker:helpers.fake("{{person.firstName}}.{{person.lastName}}@example.com")}} | jessica.thompson@example.com |
| JavaScript expression | ${"Order-" + 12345} | Order-12345 |
| JavaScript with existing test data | ${max - min} | 10 |
| JavaScript that returns a full string | ${"user" + Math.floor(Math.random() * 100) + "@example.com"} | user42@example.com |
Custom JavaScript Evaluation
For logic that goes beyond Faker or date expressions, wrap a JavaScript expression in ${}. BlinqIO evaluates it using a safe, constrained expression engine and replaces the expression with the returned value.
Syntax: ${<javascript code>}
Examples
| Expression | Purpose |
|---|---|
${(149.99 * 0.08).toFixed(2)} | Calculate 8% tax on a price |
${Math.floor(Math.random() * (65 - 55 + 1)) + 55} | Generate a random integer between 55 and 65 |
${max - min} | Use existing test data variables by name |
${Math.max({{min}}, {{max}})} | Mix ${...} with {{...}} tokens |
${({ min: 55, max: 65 }).min} | Read values from a plain object literal |
${price > 100 ? "premium" : "standard"} | Conditional logic based on a variable |
Supported JavaScript Features
- Numeric, string, boolean, and null literals
- Arithmetic, comparison, logical operators, and ternaries
- Plain arrays and plain object member access
Math.random,Math.floor,Math.ceil,Math.round,Math.min,Math.max, andMath.abs- Numeric
.toFixed(...) - Existing test data variables by identifier name, such as
${min}or${max - min}
Not Supported
These expressions are not available in BlinqIO's JavaScript evaluator:
Date.now()new Date()moment()- Arbitrary function calls outside the allowlisted helpers above
- Browser or Node globals such as
window,globalThis, orprocess
Where Expressions Work
Dynamic expressions are supported anywhere BlinqIO resolves test data values, including:
| 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 reusable project-level dynamic values |
| Generated step parameters | Replace static step input values with dynamic ones |
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.
