You can add a single schema or a directory that contains multiple schemas to the Schema Library view after which you can apply the schema to messages in your tests. You can specify the type of schema to add or use HCL OneTest™ API to determine the type.
Before you begin
You must have opened the HCL OneTest™ API Architecture School perspective and selected the Schema Library view.
Adding a schema explicitly
Procedure
Click the arrow next to the Add button on the toolbar.
Select a schema category from the displayed list.
Only a subset
of categories and schema types is available when you add a schema.
Select a schema type from the category > subcategory that you want to add.
Results
You have explicitly added a schema to the Schema Library.
What to do next
You can select the category>subcategory and the schema to add. You can use the following table to find information about the tasks to add the different types of schema:
To add an XSD schema, specify a source file. You can validate the schema source file by clicking Analyze. See Analyzing schemas.
Adding a schema without explicitly specifying the type
Procedure
Click Add on the toolbar.
The Open dialog is displayed.
Select a file or a directory that contains multiple source files that contain the schema by performing the following steps:
Browse to the location where you have the schemas.
Open the folder to select a file or select the folder that contains multiple files.
Click Open.
Any of the following results can occur:
If the selected file has a supported type of file extension and the contents are correctly parsed, the schema is added under the recognized schema type to the Schema Library. You have no further action to perform.
If the selected files or directory contains file extensions that are either not recognized or can apply to multiple schema, any of the following dialog boxes can be displayed. You can perform the action as indicated:
dialog
Cause
Action
Unrecognized file extension
If the selected files cannot be recognized as any of the supported schema types by HCL OneTest™ API.
You must add the schemas explicitly by performing the following steps: