Mock Servers
A mock server is a standalone application that is spin next to the development system and allows other systems to send the requests to it and responds with the pre-defined set of data. In general words, this is a replacement for the real API that we want to avoid calling. The main use cases are:
...
Receives calls from test code
Replies with fake responses, initialised by test code
Triggered from unit test code
Why use Mock Servers
A mock API server is useful during development and testing when live data is either unavailable or unreliable. While designing an API, you can use mock APIs to work concurrently on the front and back-end, as well as to gather feedback from developers.
...
To test your own API while developing and before making that API live on the server of your organisation.
To get feedback and bugs quicker.
For checking the dependencies in your API before it is available to everyone.
For QA engineers to use this for testing/isolating external dependencies and integration testing.
By front end developers to use it before actual endpoints are available. This is done while designing the UI so that you don’t need to wait for the time till actual endpoints are developed. It saves a lot of time.
For engineers to develop prototype of their idea to present it to the investors for funding.
Test Servers
Test servers are used for integration tests, in which ILS test server(s) receive and send real API calls as if they are real live systems, but without modifying a production ILS ensuring that the connections between systems are working properly.
...
Receives ILS calls from integration test code
Replies with valid responses
Maintains internal database of test data, initialized by the test suite
Basic Setup
Mock servers are located on the client network. For mock servers to work, Gateway and CIRC server should be working. Mock servers are running in the Docker containers.
...
Hence below Mock servers are built:
PUL/CUL SIP2 Mock Server
SIP Server is a TCP/IP-based server that can also act as a messaging interface between SIP Server clients. Once connected the server receives SIP2 request messages from the client and using the instance parameters does the required database lookups, processing etc. and returns the appropriate response message. The parameters define how the data for each field in the response message is derived. When Request is placed to SIP2 server it will convert the request to string and while passing the response it will again convert string to the response
NYPL REST Mock Server
A mock API server imitates a real server by providing realistic responses to requests. Dynamic response can make your mock API more realistic. Responses can be static or dynamic, and simulate the data the real API would return, matching the schema with data types, objects, and arrays. The data can be randomly generated based on the type of field and requirements you determine. For getting the request and sending the response it uses RESTful API Services.
LAS Mock Server
Once a request message is placed to the request queue from SCSB-CIRC, the request message will then be consumed by mock Server. After doing some internal processing, Mock Server will respond by sending a response message to the response queue.Later,SCSB-CIRC will consume the response message.
...