SAP Cloud Platform Extension Factory Mocks with Varkes
SAP Cloud Platform Extension Factory is a powerful platform to extend your SAP solutions. It can tie together a diverse array of applications, whether SAP or 3rd party services. When developing services or functions in SAP Cloud Platform Extension Factory powered by Kyma, you may not have these applications connected. You can use mocks instead by leveraging the Varkes framework. Once you are ready to test with the live application, simply bind your services to the appropriate application instance.
Design & Features
Varkes implements a lightweight API Server based on NodeJS. It also provides an Application Connector library that implements the process needed to register an application add-on in Kyma. Further, it provides a UI Cockpit to view the API and Events for your application and a test framework to invoke APIs and trigger events to be handled by services and functions running in Kyma.
The two types of service classes in the Kyma Application Connector framework: Event (AsyncApi) and API. There are two API types supported, OpenAPI and OData. Varkes contains implementations of both types. Follow the respective links for details.
- Varkes can be deployed as a service within Kyma itself. That way you don't have to host the Varkes API server separately from your Kyma cluster.
- SAP has created mocks specifically for the SAP Commerce Cloud, SAP Marketing Cloud, SAP Sales Cloud and SAP Service Cloud (c4c-mock) applications so you can develop and test Kyma based services and functions without having a live SAP C/4HANA Cloud application subscription connected.
The following blog articles describe how to set up and use these mocks:
You can use Varkes to mock your own application. You just need to clone one of the examples and add your own API and Event definitions. Varkes is a simple, lightweight yet powerful framework to streamline your development in Kyma / Extension Factory and can be used to build new application connector add-ons as well.