Tags

3 pages

OCC

Integration tests for SAP Commerce OCC controllers

OCC controllers in SAP Commerce are rarely covered by tests that run them with their real configuration. For that reason a misconfigured data mapper or a broken controller mapping shows up only after the server is started and a real request is sent. SAP Commerce already ships test support, which runs this whole chain inside a JUnit test, and below is a recipe for using it.

Server-Sent Events - real world implementation

In SAP Commerce, frontend applications often retrieve the latest data by periodically requesting updates from the server. For instance, this could involve checking for new notifications every few seconds or refreshing a page every 30 seconds to display the most recent content. While straightforward to implement, this approach has notable drawbacks, including increased server load, unnecessary network traffic, and a suboptimal user experience due to update delays.