Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 

A new hands-on tutorial is now available to accompany the Devtoberfest session UI5 Middleware FE Mockserver in Practice — Setup, Use Cases, Live Coding. It’s a guided, step-by-step journey showing how to use @sap-ux/ui5-middleware-fe-mockserver productively with Fiori Elements and beyond covering setup, data strategies, actions, multi-service scenarios, tenant isolation, offline E2E testing with wdi5, and recording real backend traffic for offline replay.

Why this tutorial matters

The mockserver lets you develop and test Fiori apps locally and offline with metadata-accurate data, predictable scenarios, and action implementations without waiting on backend availability. The tutorial distills best practices into small exercises you can run immediately.

What you’ll learn (exercise overview)

ExerciseFocusKey Takeaways
1. Basic Setup – Generated DataZero-config mock data from metadataStart fast; remove backend proxy for true offline; draft simulation
2. Custom JSON DataPredictable datasetsStable testing scenarios; relationships; consistent IDs and referential keys
3. JavaScript LogicDynamic data + actionsImplement getInitialDataSet and executeAction; validations; latency simulation
4. Multiple ServicesBookshop + ReviewsMicroservices-style config with distinct metadata and datasets
5. Cross-Service CommunicationService-to-service flowsTrigger operations across services (e.g., promotion creates review)
6. Context-Based IsolationTenant-specific dataUse ?sap-client= to switch tenants; optional tenant-aware logic
7. Error HandlingBusiness and system errorsReturn 400/404/422/500/501 with helpful messages for UI testing
8. Offline E2E Testingwdi5 + mockserverReliable CI-ready tests without backend dependency
9. Record Live ODataui5-middleware-odata-recorderCapture real backend traffic → generate mock datasets for offline replay

How to get started

The tutorial is available in the README and is designed to run locally in small, focused apps per exercise. You’ll find commands, file locations, and ready-to-run configurations.

Session context

This tutorial was introduced in the Devtoberfest session UI5 Middleware FE Mockserver in Practice — Setup, Use Cases, Live Coding, featuring live coding around configuration, data providers, offline mode, tenant-specific datasets with fallbacks, cross-service scenarios, and wdi5 integration for robust E2E tests. You can rewatch the session now.

Links

1 Comment
Labels in this area