While working on End-to-End 4G/5G Network Slicing Service-Orchestration integration/testing activities, we often use several API calls on various Network Domain (Core, Transport...etc) Controller Elements like: NSMF, NSSMF, CNSSMF, RNSSMF...etc. These API calls work as an important bridge between the client and the Network Domain Controllers, perform various operations on Network Elements through GET/POST/DELETE...etc methods.
But what happens when you do not have a Real Network Domain Controller or Not readily available for some reason during your testing or customer Demo/PoCs?
- Here comes to your aid the magical feature of Mock-Server/Simulator - A Mocking Framework, that mimics the RESTful and SOAP based requests and responses for the desired APIs like: EDENNET, NFMP, VPRN and PGW...etc, which allows you to perform the essential operations on Network Elements for your testing/Demo/PoCs.
This guide includes step-by-step instructions, so that you have a comfortable experience in the RESTful and SOAP based Simulator. Without further ado, let’s get started by discussing all the what(s), why(s) & how(s) about REST & SOAP Simulators!
A java based light-weight server for mocking your RESTful and SOAP based APIs over HTTP or HTTPS With having a browser-based Dashboard Console - for live monitoring of logs, requests, and responses to help on easy tracking or quick debugging.
A Mock-Server is a java based mocking framework that can support for mocking your RESTful and SOAP based service/APIs over HTTP or HTTPS. The Concept: The concept is very simple:
- You or any external system send a Request to Mock-Server, the Mock-Server matches the incoming request with a configured Expectation (method, header, end-point, body) and an Action (response) is taken accordingly for matched/unmatched Request.
- In addition, it provides a GUI based Dashboard-Console for live-monitoring, Filtering and Tracing the detailed Requests, Responses and logs in a pretty Rich format - helps for easy tracking and quick debugging.
- A light-weight server (jetty) must be always up and running in the backened - i.e. readily available for mocking any REST or SOAP based APIs.
- An Expectation needs to be configured - contains a Request Matcher (method, header, end-point, body).
- An Action needs to be configured - for the success or error response.
- Capable to Receive any Request payload of any type (JOSN,XML..etc).
- Must be Verified and Matched the Request against the configured Expectations
- Return the desired Response if a request matches an expectation else error respone(404).
- Allows to Configure the Request & Expectations.
- Allows to mimic the EDENNET, NFMP, VPRN as RESTful based and PGW as SOAP based APIs.
- Allows easy tweaking for any new API integration.
- Must have a GUI based Dashboard Console: For live monitoring of logs, requests and responses to help on easy tracking and quick debugging.
- Easily launched from CLI or integrated with Kubernates pod.
A generic Mocking Framework, that mimics the RESTful based any service requests and responses for the APIs: EDENNET, NFMP, VPRN over HTTP(S) to perform an essential operation.
Download & unzip the required REST-Simulator package i.e. RestSimulator_100.zip into it. From 'config' directory of unzipped REST-Simulator package, Edit/Update the 'restmock.properties',
Configure Host and Port, save as below:
Run 'startRestSimulator.sh' or 'startRestSimulator.bat' script
- Make sure REST-Mock is successfully installed, up and running on your linux-vm or windows box.
- The Dashboard Console can be launched in any browser using the URL: http(s)://:/restmock/dashboard
- For example if REST-Simulator is running on localhost on port 8081 use: http://localhost:8081/restmock/dashboard
A Mocking Framework, that mimics the SOAP based service requests and responses for the PGW APIs over HTTP(S) to perform an essential operation.
Download & unzip the simulator package: SOAPSimulator_100.zip. Edit/Update the 'soapmock.properties'
Run 'startSoapSimulator.sh' script: