Add Automated System Tests for CAP-Based Projects to Your CI/CD Pipeline
- How to create system tests with UIVeri5 using the UI5 Test Recorder for CAP-based projects on SAP Business Technology Platform
- How to create a CI/CD pipeline with project “Piper”
- How to add system tests as automated steps to your CI/CD pipeline
Prerequisites
- You use SAPUI5 in version 1.74 or higher.
- You have installed and configured a local Git client.
- You have installed Docker in version 18.09.6 or higher.
- You have installed Node.js in version 12.14.1 or higher.
- You have installed Visual Studio Code.
-
You have installed UIVeri5 using the following command:
npm install @ui5/uiveri5 -g
-
You have installed the
cds
development kit using the following command:
If you encounter any problems when installing thenpm install -g @sap/cds-dk
cds
development kit, have a look at this troubleshooting section. - Your Google Chrome version is up to date. See Update Google Chrome.
- If you are located in China, you’ve configured and downloaded the
chromedriver
that fits your Google Chrome version manually. Seechromedriver
.
Note
Please note that UIVeri5 is deprecated and will be removed or replaced soon. Even though existing tests will continue to work, we recommend that you remove the deprecated configurations. For more details, see GitHub.
What Is This Tutorial About?
In this tutorial, you’ll create and run automated system tests with UIVeri5 against a simple CAP-based sample application. Your sample application is a bookshop, which has basic functions for managing books such as creating and deleting books.
The tutorial consists of three main stages:

-
Clone the CAP-based sample application and manually go through your test scenario before starting to code it.
-
Create and run system tests with UIVeri5 that add a new book to your bookshop and check if it’s displayed in the list.
-
Automate your system tests by integrating them into a CI/CD pipeline.
About System Tests with UIVeri5
UIVeri5 is an SAP open-source JavaScript testing framework for SAPUI5 applications. It drives a real browser for your deployed app and simulates authentic user scenarios. System tests check both front-end and back-end and make sure that all pieces of an application work well together.
The following graphic shows the positioning of system tests with UIVeri5 compared to other testing methods and tools. The arrow shape illustrates the granularity of the methods: Compared to unit, component, or integration tests, system tests examine less details and focus on crucial workflows, instead.

For more information about testing with UIVeri5, have a look at these blogs:
About the SAPUI5 Test Recorder
The SAPUI5 Test Recorder is a tool that helps you create integration and system tests. You can use it in any SAPUI5 application to inspect its user interface, view the control properties, and get code snippets for OPA5 and UIVeri5 tests. As of version 1.74, it is part of the SAPUI5 framework.
For more information about the SAPUI5 Test Recorder, see Test Recorder.
About CI/CD with Project “Piper”
Project “Piper” is one of SAP’s solutions for continuous integration and delivery. It provides pre-configured Jenkins pipelines, which you can use in your own Jenkins master infrastructure and adapt according your needs. Project “Piper” consists of two different parts:
- A shared library, which contains the description of steps, scenarios, and utilities that are required to use Jenkins pipelines
- A set of Docker images that can be used to implement best practice processes
For more information about SAP solutions for CI/CD, see:
Congratulations!
You have successfully created different system tests with UIVeri5 for a CAP-based project and integrated them into a continuous integration and delivery pipeline.