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

Add Test Cases

This tutorial shows you how to add basic tests cases in your application.

Overview

🎓 beginner 30 min. SAP Cloud Application Programming ModelBeginnerNode JsJavaSAP Business Technology PlatformSAP Fiori

You will learn

  • How to add dependencies.
  • How to add tests.
  • How to test the application.

Prerequisites

Prerequisites

You’ve configured the access to your application. Follow the steps in the Add Authorization tutorial that is part of the Develop a Full-Stack CAP Application Following SAP BTP Developer’s Guide tutorial group.

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 Full-Stack CAP Application Following the SAP BTP Developer’s Guide mission in the SAP Discovery Center.

Steps

Step 1 Add dependencies

You can create a CAP project in either Node.js or Java. You have to choose one way or the other and follow through. The tabs Node.js and Java provide detailed steps for each alternative way.

  1. In SAP Business Application Studio, go to your IncidentManagement dev space.

    Make sure the IncidentManagement dev space is in status RUNNING.

  2. From the root of the INCIDENT-MANAGEMENT project, choose the burger menu, and then choose TerminalNew Terminal.

  3. To add the required dependencies, run the following command:

    Shell
    npm add -D @cap-js/cds-test
Step 2 Add tests
+
Step 3 Test the application
+

Resources

Discussion

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

Submit detailed feedback Discuss in Community
Steps
Step 1 of 3
1. Add dependencies 2. Add tests 3. Test the application

Learn more →