ERPClimb logoERPClimb
SAP Fiori Tools and Business Application Studio
Fiori & SAPUI5intermediate 5 min read

Fiori Tools Part 3: Mock Data, Preview Variants and Working Without a Back End

Preview · a free account unlocks the full lesson

Key takeaway

Develop and test Fiori apps even when the back end isn't ready: the Fiori elements mock server middleware, generated or hand-crafted mock data, preview with different configurations, and keeping mock and real metadata in sync.

Visual overview

Fiori Tools Part 3: Mock Data, Preview Variants and Working Without a Back End — learning sheetFlow: Service metadata → Mock server configuration → Mock data with edge cases → Preview variants → Real-service integration test. Key ideas: WHY MOCK DATA; MOCK SERVER MIDDLEWARE; BUILDING GOOD MOCK DATA; KEEPING METADATA IN SYNC. Watch out: Testing only with perfect mock data hides problems with real volumes and messy data.ERPClimb.com / FIORI / LESSON 14/14 / LEARNING SHEETFiori Tools Part 3: Mock Data, Preview Variants andWorking Without a Back End1 · HOW IT FLOWS1Servicemetadata2Mock serverconfiguration3Mock datawith edgecases4Previewvariants5Real-serviceintegrationtest2 · KEY IDEAS EXPLAINEDWhy Mock DataBack-end services are often unfinished or unstableduring UI development, and test systems may lackdata. A mock server lets UI developers work, demo…Mock Server MiddlewareFor Fiori elements and OData V4 projects, the mockserver middleware in the UI5 tooling servesrequests from a local metadata file and JSON data…Building Good Mock DataGenerate initial data with the tools, then addrealistic cases: long texts, missing optionalfields, many items, statuses that trigger…Keeping Metadata In SyncDownload the current service metadata whenever theback end changes, and regenerate or update mocks.A mismatch between mock and real metadata is a…3 · REMEMBER · WATCH OUTRememberThe Fiori tools mock server middleware serves OData requests fromlocal JSON data and metadata.Mock data can be generated or written to cover real cases, includingedge cases.Preview configurations run the app with mocks, the real service ordifferent settings.!Watch outTesting only with perfect mock datahides problems with real volumes andmessy data.4 · IN A REAL PROJECTA UI worked perfectly in demos with mock data but failed in integration testing because the real service hadrenamed two properties. The team added a step to refresh metadata from the back end at every sprint start andfail the build if mocks referenced unknown properties.Original ERPClimb learning sheet • Verify against your SAP release and edition

Explanation

Parts 1 and 2 built and configured apps; Part 3 makes development independent of back-end availability, using mock data.

Back-end services are often unfinished or unstable during UI development, and test systems may simply lack data. A mock server lets UI developers work, demo and test in parallel with back-end development, and it makes automated UI tests deterministic since the data doesn't shift under them.

For Fiori elements and OData V4 projects, the mock server middleware built into the UI5 tooling serves requests from a local metadata file plus JSON data per entity set, and it supports filtering, sorting, paging and draft flows to a large extent. Its configuration lives in a ui5-mock.yaml file, and preview configurations can run the app against mocks, the real service, or different settings as needed.

Free account

Create a free account to keep reading

You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.

  • Full explanation
  • Real project scenario
  • Common mistakes
  • Best practices
  • Interview angle

One tap with Google works too. Every topic keeps its first lesson open to everyone.

Keep exploring

Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.