Coder Social home page Coder Social logo

sap-samples / xf-application-mocks Goto Github PK

View Code? Open in Web Editor NEW
24.0 8.0 27.0 5.21 MB

Contains lightweight substitutes for SAP applications to ease the development and testing of extension and integration scenarios. In conjunction with SAP Business Technology Platform, kyma runtime, the efficient implementation of application extensions is supported without the need for real SAP applications being accessible during development.

License: Apache License 2.0

Dockerfile 6.62% JavaScript 93.38%
sample kubernetes kyma mocking sample-code sap-btp

xf-application-mocks's Introduction

XF-Application-Mocks

REUSE status

Contains lightweight substitutes for SAP applications to ease the development and testing of extension and integration scenarios based on Varkes. Together with SAP Business Technology Platform, Kyma Runtime, it allows for efficient implementation of application extensions without the need to access the real SAP applications during development.

Description

The SAP Business Technology Platform, Kyma Runtime is designed to easily extend and mash up different SAP applications and third-party APIs. To demo SAP Business Technology Platform, Kyma Runtime functionality, you can use a dummy application for integration rather than a full-blown application setup.

A smart and lightweight mock application allows you to save installation time, maintenance effort, and resources. Use its user-friendly interface to:

  • Successfully simulate requests or Events sent from an external system to SAP Business Technology Platform, Kyma Runtime, and returned responses.
  • Testing functionality in or on top of the SAP Business Technology Platform, Kyma Runtime without worrying about the dependencies.

The application mocks in this repository provide dummy implementations for most of the SAP Customer Experience applications. They are not bound to SAP Business Technology Platform, Kyma Runtime scenarios and can be operated standalone. All mocks are built with the API-driven approach in mind.

Requirements

The application mocks are NodeJS projects based on Varkes libraries and Express web framework. To run them, you require a Docker-based container infrastructure, like pure Docker, Kubernetes or SAP Business Technology Platform, Kyma Runtime.

Installation

Each application mock holds detailed installation instructions in a README file:

Usage

To run the mocks using Kyma as the runtime environment, run the following kubectl command to set up a namespace:

kubectl create namespace mocks
kubectl label namespace mocks env=true

and to deploy the mock on SAP Business Technology Platform, Kyma Runtime

kubectl apply -n mocks -f https://raw.githubusercontent.com/SAP/xf-application-mocks/main/commerce-mock/deployment/kyma.yaml
kubectl apply -n mocks -f https://raw.githubusercontent.com/SAP/xf-application-mocks/main/commerce-mock-lite/deployment/kyma.yaml
kubectl apply -n mocks -f https://raw.githubusercontent.com/SAP/xf-application-mocks/main/marketing-mock/deployment/kyma.yaml
kubectl apply -n mocks -f https://raw.githubusercontent.com/SAP/xf-application-mocks/main/c4c-mock/deployment/kyma.yaml

Known issues

The application mocks based on the @varkes/odata-mock (currently the marketing and c4c mocks) do not support any relations between the model definitions provided in the related EDMX files. A solution supporting the full EDMX specification will be provided soon.

Support

If you find an issue or want to submit an idea, open a Github Issue. Also, feel free to contribute by creating a pull request.

License

Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.

xf-application-mocks's People

Contributors

a-thaler avatar abbi-gaurav avatar arifc avatar bszwarc avatar btbernard avatar dependabot[bot] avatar jcawley5 avatar lilitgh avatar mado0803 avatar nachtmaar avatar suleymanakbas91 avatar usmankamal avatar valentinvieriu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xf-application-mocks's Issues

Unable to register SAP Marketing Cloud APIs on local Kyma

I have setup the connection between Kyma (v1.7 - local) and XF-Application-Mocks for SAP Marketing Cloud following the documentation of this repo (https://github.com/SAP/xf-application-mocks/blob/master/marketing-mock/README.md)

image

Problem - On clicking Register All button, only event is getting successfully registered and none of the APIs are registering.

Error - Problem while creating API: Kyma application API responded with status 502 { "code": 502, "error": "Determining API spec for service with ID 0ed3161a-c18f-4e33-b9da-908c7dd9d824 failed, Fetching API spec from http://localhost:10000/sap/opu/odata/sap/API_MKT_CONTACT_SRV/$metadata failed, Get http://localhost:10000/sap/opu/odata/sap/API_MKT_CONTACT_SRV/$metadata: dial tcp 127.0.0.1:10000: connect: connection refused" }

Capture2

I think the SAP Marketing Cloud - Events getting successfully registered gives the clue that connection between both systems is configured properly. But I'm unable to figure out why the same host is bad gateway for registration of APIs ๐Ÿค”
Any help/hint would be nice.

HTTP Error 502 on deployed mocked applications.

Dear team,
while following the Deploy Commerce Mock Application in the Kyma Runtime Tutorial at this link
https://developers.sap.com/tutorials/cp-kyma-mocks.html at Step 3 after deploying succesfully the 2 resources, when trying accessing the URL generated with format https://commerce.*******.kyma.shoot.live.k8s-hana.ondemand.com , I get an error page with HTTP ERROR 502.
This applies both to commerce-mock and to c4c-mock.
Could you please assist?
Thanks,
Alex

Provide oauth support as implemented in SAP Commerce cloud

Description
To provide the same experience when it comes to secure access, the commerce mock must be enhanced to support the authentication mechanisms used in SAP Commerce cloud.

Referring to the example, https://github.com/kyma-project/examples/tree/master/call-ec

following OAuth related URLs should be supported. But I believe there could be more stuff as the example seems to be outdated.

REACT_APP_OAUTH2_ISSUER=https://commerce.gaurav-demo-call-ec.cluster.extend.sap.cx/authorizationserver
REACT_APP_OAUTH2_JWKS_URI= https://commerce.gaurav-demo-call-ec.cluster.extend.sap.cx/authorizationserver/.well-known/jwks.json
REACT_APP_OAUTH2_AUTHORIZE_URL=https://commerce.gaurav-demo-call-ec.cluster.extend.sap.cx/authorizationserver/oauth/authorize

Provide Getting Started Guide

The documentation as part of the service catalog is not sufficient for new users. As a new Kyma user I need a propper getting started guide to get one of the default application mocks (commerce, c4c etc.) running.

Minimal Content:

  • Installation
  • How to register at app connector
  • How to get to and use the varkes UI

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.