Mock

The Mock service can mock API responses when API providers cannot provide expected response data. It can be used to substitute for unfinished modules in concurrent development or testing to improve the development or testing efficiency, or to simulate exceptions to increase the test coverage rate.

With Cloud Trace Service (CTS), you can record operations associated with Mock for future query, audit, and backtrack operations.

Table 1 Mock operations that can be recorded by CTS

Operation

Resource Type

Trace Name

Creating a service

service

addService

Updating a service

service

updateService

Deleting a service

service

deleteService

Copying an API

interface

copyInterface

Adding an API

interface

addInterface

Updating an API

interface

updateInterface

Deleting an API

interface

deleteInterface

Uploading an API

interface

uploadInterface

Adding an API rule

rule

addRule

Updating an API rule

rule

updateRule

Deleting an API rule

rule

deleteRule