The Generate Data task is a test data generation utility that helps you create realistic, structured sample data during test execution. Instead of maintaining static datasets that go stale, you describe the data you need, and Zia generates it for you on demand, using simple, scenario-based prompts.
This capability is powered by Zia, QEngine's AI assistant, which uses the AI model configured for your
portal under
Setup. Based on your
configuration, Zia can leverage Zoho GenAI, OpenAI, Google Gemini, or Anthropic to generate contextually relevant data. The task behavior and output format remain consistent regardless of which provider is active.
You can use this task to produce structured inputs such as form fields, grouped test data, or scenario-specific datasets. For example, data for a registration form, an employee onboarding workflow, or a multi-step checkout flow, enabling more meaningful and realistic test coverage.
How it works
You write a prompt based on the test case you are building, describing the fields, values, or constraints your scenario requires. Zia uses this to generate data that fits your test context directly.
You can provide this input as:
- A plain-text prompt describing the data you need. For example, “Generate form fields for a student picnic registration”.
- A reference file (JPG, JPEG, PNG, or PDF, up to 3 MB), such as a screenshot or document that Zia uses to infer the required fields and generate matching values. You can also pair a file with a prompt to specify additional constraints or formatting rules.
Zia processes your input and returns a JSON-formatted string containing the generated data. You store this output in a variable and reference it in subsequent test steps to populate form fields, simulate user inputs, or drive complex test scenarios without relying on external data files.
The Generate Data task works across Web, Android, and iOS platforms, so you can use the same syntax and expect the same output behavior regardless of the application environment you are testing.
Prerequisite
2. Syntax
zia.generateData(<prompt>);
or
zia.generateData(<filename>,<prompt>);
Parameters | Description |
<prompt> | A natural language instruction describing the sample data you want Zia to generate. Optionally, when used with a file, the prompt acts as a directive, telling Zia how to interpret the file or what to extract from it.
Note: The maximum length the prompt can have is 3000 characters. |
<filename> | A reference to a file uploaded in your project's Files settings, used by Zia to model the generated data.
Referenced using the built-in files namespace as files.<user_defined_name>, where <user_defined_name> is the name you assigned when uploading the file.  Note: The supported formats for the file are jpg, jpeg, png, and pdf. And, their file size must be under 3 MB.  Security Tip: Avoid including personally identifiable information (PII) or confidential details in any content you upload, as it will be processed by the underlying language model. If you are using Zoho's GenAI model, your data will remain within your organization and will not be used for any external purposes. |