Abstract: Cross-layer runtime management (RTM) frameworks for embedded systems provide a set of standard application programming interfaces (APIs) for communication between different system layers (i.e., RTM, applications, and device) and simplify the development process by abstracting these layers. Integration of independently developed components of the system is an error-prone process that requires careful verification. In this letter, we propose a formal approach to integration testing through automatic generation of runtime assertions in order to test the implementation of the APIs. Our approach involves a formal model of the APIs developed using the Event-B formal method, which is automatically translated to a set of assertions and embedded in the existing implementation of APIs. The embedded assertions are used at runtime to check the correctness of the integration.