You can quickly create and populate a data repository from a request or response payload, which enables you to structure the data in the repository to match your scenarios. See About the Data Repository for additional information.
Creating Data Repositories from a Request Payload
- Create a test client, such as a Message Client, and click on the Request or Payload (REST Client) tab.
- Set the Input mode to Literal and enter your well-formed traffic.
- Switch the Input mode to the form matching your traffic. For example, if your traffic is JSON sent over REST, switch to Form JSON. Choose Yes if you are prompted to replace the content in the form view with the content from the literal view.
- Right-click the root node and choose Generate Data Repository Data Source.
- Complete the following fields when prompted:
- Host: The hostname or address of the data repository server.
- Port: The port number of the data repository server (default is
2424
). - Repository name: Specify a name of the repository to be generated. You can specify the name of an existing repository to update it with new data sets from the traffic.
- Username/Password: Specify the credentials, if necessary, to access the data repository server.
- Use SSL: Enable to use SSL to connect to the server.
- Dataset name: Specify a name to use for the data set. If you specify the name of an existing data set in an existing repository, the new data set will replace the existing set.
- Record type name: Specify a name to describe the structure of records on this repository.
- Click Validate to verify the connection settings.
- Click OK.
The new data repository will be created, structured, and populated with data from the request traffic.
Creating Data Repositories from a Response Payload
- Create a message responder, such as a JSON or SOAP Responder, and click the Response tab.
- Set the Input mode to Literal and enter your well-formed traffic.
- Switch the Input mode to the form matching your response traffic. For example, if your traffic is JSON, switch to Form JSON. Choose Yes if you are prompted to replace the content in the form view with the content from the literal view.
- Right-click the root node and choose Generate Data Repository Data Source.
- Complete the following fields when prompted:
- Host: The hostname or address of the data repository server.
- Port: The port number of the data repository server (default is
2424
). - Repository name: Specify a name of the repository to be generated. You can specify the name of an existing repository to update it with new data sets from the traffic.
- Username/Password: Specify the credentials, if necessary, to access the data repository server.
- Use SSL: Enable to use SSL to connect to the server.
- Dataset name: Specify a name to use for the data set. If you specify the name of an existing data set in an existing repository, the new data set will replace the existing set.
- Record type name: Specify a name to describe the structure of records on this repository.
- Click Validate to verify the connection settings.
- Click OK.
The new data repository will be created, structured, and populated with data from the response traffic.