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.

Restriction: You cannot modify all the properties of the types in an XSD or a JSON schema.

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

Note:

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

  1. Log in to HCL OneTest Server and open the team space that contains your project.
  2. Open your project.
    The Overview page is displayed.
  3. Click Author > Data Fabrication.
    The Data Fabrication page is displayed.
  4. Click the Schemas tab.
  5. Click XSD/JSON from the Schemas menu.
    The Import XSD/JSON dialog box is displayed.
  6. Select the JSON or XSD file that you want to import.
  7. Provide a schema name with a brief description and keywords as Tags.
  8. 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 Schemas 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.