Developers and manufacturers of Battery Management Systems (BMSs) require extensive testing of controller HW and SW, such as analog front-end (AFE) and performance of generated control code. In comparison with tests conducted on real batteries, tests conducted on hardware-in-the-loop (HIL) simulator may be more cost ant time effective, easier to reproduce and safer beyond the normal range of operation, especially at early stages in the development process or during fault simulation. In this paper a li-ion battery (LIB) electro-thermal multicell model coupled with an aging model is designed, characterized and validated based on experimental data, converted to C code and emulated in real-time with a dSpace HIL simulator. The BMS to be tested interacts with the emulated battery pack as if it was managing a real battery pack. BMS functions such as protection, measuring of current, voltage and temperature or balancing are tested on real-time experiments.