UI5 testing

The screens under test are generated from annotations rather than written by hand, so a test cannot start from a control the developer named: the Test Recorder's own documentation warns that automatically generated ids start with a double underscore and are unsuitable for tests. The question here is which published test function stands for the part of the generated app a journey is about.

Showing artifacts, examples and content with confirmed Fiori elements applicability. View All UI5

Overview

SAP SHIPSby design

An OPA test library for Fiori elements OData V4 applications, published as sap.fe.test: its test functions are what a journey calls, instead of locating the generated controls itself, and the project's own configuration file creates the pre-configured JourneyRunner the journeys run through.

Not covered: At OData V4 applications generated by Fiori elements, which is the library's stated scope, and at OPA's restrictions, which hold for a generated screen as for a hand-written one. The framework's mock server mimics OData V2, so the data a generated OData V4 app is tested against does not come from it.

THE COMMUNITY ADDS

wdi5 drives the generated app in a real browser and can initialise SAP's own test library inside its tests, which its documentation scopes to wdi5 after 0.9.1 and SAPUI5 after 1.88.0; a separate selector set for generated controls, and a recorder that writes the journey, sit beside it.

Artifacts2

2 of 2 artifacts
ArtifactSignals
Packages2
wdi5-fe-selectorswdi5 selectors for locating controls in Fiori Elements apps
Signals
Archived+1
wdio-ui5-serviceEnd-to-end testing for UI5 on WebdriverIO with UI5 control selectors
Signals
Functional boundary

Tasks4Beta

Shown workingCoversNot assessed
Get test code for a Fiori elements screen without writing selectors by hand1 covers

A test addresses the controls of a generated list report or object page without a developer working out locators for ids the framework generated.

Covers getting to the code or the locator. What the test then asserts, and running it, are other tasks.

Coverswdi5-fe-selectorsAnswers the same outcome without recording anything: a set of wdi5 selectors for the controls Fiori elements generates, so a hand-written test takes the locator from the set instead of deriving it from a generated id.

Remaining work: Install it beside wdi5 and use its selectors in the tests you write; it supplies locators and not the journey.

Open artifact →

Run a UI5 app's tests with no backend behind itNot assessed

The application under test answers its own service calls from mock data, so the tests run with no backend reachable.

Covers standing in for the service. Writing the tests is a different task, and so is keeping mock data in step with a model that changes.

Run a UI5 project's existing QUnit and OPA5 pages unattendedNot assessed

The test pages a project already has run from one command, with nobody opening them in a browser tab, and the run leaves a report a pipeline can read.

Covers executing pages that exist. Writing them is a different task, and so is what serves the application while they run.

Test a UI5 app that is already deployed, from a pipeline1 shown working

A test reaches the application a user would open — deployed, served by somebody else, possibly behind a login — and the run happens in a pipeline rather than on a developer's machine.

Covers reaching and driving a deployed application. What the tests assert, and how the application got deployed, are not part of it.

Shown workingwdio-ui5-serviceOpens the baseUrl its configuration names in a real browser, waits for the redirect to the authentication provider and supplies the credentials, with the provider chosen by configuration rather than written into the tests. Tests start through WebdriverIO's own command line, so a pipeline step is what runs them.

Conditions: The login is one the authentication page covers — SAP Cloud IdP, SAP Cloud Identity Services, Office 365, a custom provider or basic authentication — and does not require a second factor, which that page states is not supported

Remaining work: Put the credentials where the pipeline can hand them to the configuration, and keep the test code itself free of the login: the documentation states no changes in the test code are needed for using authentication.

Open artifact →

Seen working1

ArtifactSignals
Samples1
ui5-fe-mockserver-tutorialTen exercises on the Fiori elements mock server middleware
No license

Details

Coverage
Comparison properties2

These are the questions used to compare what the artifacts do. Values come from their documentation and may apply to a particular ecosystem or runtime. Each recorded value in the comparison opens its statement and sources.

Test levelCode coverage
For your agent