Importing XSD or JSON files from the local file system
When you have an XSD or a JSON format file in your local file system, you can import the same files from the local file system into your HCL® OneTest™ Data project.
Before you begin
- You must have created a project.
- You must have an XSD or a JSON format file in your local file system.
About this task
XSD or JSON files are in schema format. To create a schema, you can import an existing schema that is in the XSD or JSON format from your local file system.
The following table shows the list of properties supported by JSON or XSD schema:
Properties | Read-only JSON schema | Editable JSON schema | XSD schema |
---|---|---|---|
JavaScript rules |
Yes |
Yes |
No |
Regular expression |
Yes |
Yes |
No |
Restrictions |
No |
Yes |
No |
Default values |
No |
Yes |
No |
If a schema that you import resembles the JSON structure, then that schema is represented as a read-only JSON schema. However, when a schema that you import resembles the JSON data, then that schema is represented as an editable JSON schema.
Procedure
- Log in to HCL OneTest™ Server and open the team space that contains your project.
-
Open your project.
The Overview page is displayed.
-
Click
. The Data Fabrication page is displayed.
- Click the Schemas tab.
-
Click XSD/JSON from the .
The Import XSD/JSON dialog box is displayed.
- Select the JSON or XSD file that you want to import.
- Provide a schema name with a brief description and keywords as Tags.
- Click OK and save the changes.
Results
You have successfully imported XSD or JSON files from the local file system.
What to do next
You must define the types in the schema. See Defining Types.
You can also perform the following actions:
- View the imported file listed under the tab.
- Use the Search field to search for any schema from the existing schemas.
- Sort the list of schemas by name, folder, and recently used schemas.