SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Test the Extended Incident Management Application with the Business Partner API

Learn how to test the extended Incident Management application with a local mock server.

Overview

🎓 intermediate 30 min. SAP Cloud Application Programming ModelIntermediateNode JsSAP Business Technology Platform

You will learn

  • โœ”How to increase your development speed by running and testing your implementation in a local environment.
  • โœ”How to set up and use a local mock server for running your development tests for the extended Incident Management application.
Created by June 17, 2024
Contributors

Prerequisites

Prerequisites

OUT OF MAINTENANCE

This tutorial is no longer maintained. For an up-to-date version and support with any issues, refer to the Develop a Side-by-Side CAP-Based Extension Application Following the SAP BTP Developer’s Guide mission in the SAP Discovery Center.

Steps

Step 1 Create mock data for the new entities
โ€”

Since you already have a SQLite in-memory database that was automatically created in the previous step, let’s now fill it in with some test data.

  1. Navigate to the Incident Management application project and create a new folder data in the srv/external folder.

  2. In the data folder, create a new file API_BUSINESS_PARTNER-A_BusinessPartner.csv and add the following data to it:

    CSV
    BusinessPartner;FirstName;LastName;BusinessPartnerName;BusinessPartnerIsBlocked;
    1004155;Daniel;Watts;Daniel Watts;false
    1004161;Stormy;Weathers;Stormy Weathers;false
    1004100;Sunny;Sunshine;Sunny Sunshine;true
  3. In the data folder, create a new file API_BUSINESS_PARTNER-A_BusinessPartnerAddress.csv and add the following data to it:

    CSV
    BusinessPartner;AddressID;
    1004155;123
    1004161;345
    1004100;456
  4. In the data folder, create a new file API_BUSINESS_PARTNER-A_AddressEmailAddress.csv and add the following data to it:

    CSV
    AddressID;EmailAddress;Person;OrdinalNumber
    123;test@demo.com;Williams;123
    345;testjohn@demo.com;Smith;222
    456;testhencry@demo.com;johnson;333
  5. In the data folder, create a new file API_BUSINESS_PARTNER-A_AddressPhoneNumber.csv and add the following data to it:

    CSV
    AddressID;PhoneNumber;Person;OrdinalNumber
    123;+44-555-123;Daniel;123
    345;+01-555-688;Stormy;222
    456;+01-555-789;Sunny;333
Step 2 Run and test the Incident Management application locally
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 2
1. Create mock data for the new entities 2. Run and test the Incident Management application locally

Learn more →