In order to reduce automotive development times and costs, particular development tasks are rescheduled to earlier program phases (frontloading) by applying hardware-in-the-loop (HiL) tests. However, there is a shortage of studies considering HiL tests for function developments considering the thermal behavior of electric drives. This article shall be a first step toward closing this gap. A real-time co-simulation of a battery electric vehicle and a driver model are developed and connected to an electric traction machine at a laboratory test bench. A thermal derating function is designed and calibrated at this test setup.In particular, linear derating functions with different gradients are implemented and tested for high load performances during a track race, and the trade-off between energy demand and the lap time is determined. Larger gradients of thermal derating functions lead to shorter lap times and higher energy demands. Thus, for this case study, an increase of the gradient of the thermal derating function by a factor of two results in a lap time improvement of 2.3% and a higher energy demand of 4.7%. The test results demonstrate how HiL setups offer a favorable testing scenario to calibrate thermal derating functions of electrified powertrains in early development phases.