Configuring the RESO Commander for Automated Web API Core Testing - RESOStandards/web-api-commander GitHub Wiki

Purpose

This guide is designed to assist in creating a Web API Core test configuration to be used during automated testing.

Getting Started

The RESO Commander provides automated testing of metadata, queries, and responses to ensure that providers are compliant with the Web API Core Endorsement.

Configuring the RESOScript File

In order to perform automated testing, an XML-based configuration file is required which contains parameters specific to the server being tested. This is known as a RESOScript.

A RESOScript contains Client Settings, Parameters, and Requests.

There is a Web API Core template that can be used for certification. Anything in this document marked as REQUIRED should be filled out prior to starting automated testing.

There is also a sample configuration file used for internal testing with some values provided that might also be helpful.

Client Settings

Client Settings define the following parameters:

ClientSetting Sample Value(s) Description
WebAPIURI https://api.server.com/OData OData Service Root
AuthenticationType authorization_code, client_credentials OAuth2 Auth Type
BearerToken e340eu0onoethuu OAuth2 authorization_code
ClientIdentification yourUserName OAuth2 client_id
ClientSecret yourSecret OAuth2 client_secret
TokenURI https://api.server.com/token OAuth2 token_uri
ClientScope read, write Optional OAuth2 scope

As a side note, client settings will be converted to parameters in the near future. Keep an eye out for changes by watching the repository.

Parameters

In the parameters section, you will fill some additional information regarding the resource, fields, and values to be used for testing.

You don't have to fill in all of the parameters. For instance, in the Sample Field Values section, defaults have been chosen that should already work for testing. If they don't for some reason you may change them accordingly.

Parameter Sample Value(s) Description
EndpointResource Property, Member, Office, Member, InternetTracking DD 1.7 Resource
KeyField ListingKey Resource Key Field Name
KeyValue 'abc123' Key value for testing
IntegerField BedroomsTotal Integer field for testing
IntegerValueLow 0 Integer value for testing
IntegerValueHigh 9 Integer value for testing
DecimalField ListPrice Decimal field for testing
DecimalValueLow 0.00 Decimal value for testing
DecimalValueHigh 1234567.89 Decimal value for testing
SingleValueLookupField PropertyType Single Enumerated Field
SingleValueLookupNamespace PropertyEnums.PropertyType Local namespace for EnumType
SingleLookupValue Residential Sample value for EnumType
MultipleValueLookupField Appliances Multiple Enumeration field
MultipleValueLookupNamespace PropertyEnums.Appliances Local namespace for EnumType
MultipleLookupValue1 Refrigerator Sample value for EnumType
MultipleLookupValue2 Stacked Sample value for EnumType
DateField ListingContractDate Date type field name
TimestampField ModificationTimestamp Datetime type field name

Requests

There is also a section containing requests which contain sample requests to be used during automated testing. Please don't change this section as it will affect the test results. It has been provided for reference. The RESO Commander uses its own copy of these requests during certification.

Automated Acceptance Testing

Once the RESOScript file is configured, you may run the automated testing tool, as outlined in Commander README.

Make sure that you have configured your local environment before you begin testing. You may also use Docker if you prefer.

Web API Core Requirements

The RESO Web API Core Specification may be found here.

Within this document, there is a section on Certification which shows each of the queries used for Web API Core certification.

Please contact RESO Development if you have any questions.