This paper describes a uniform Hardware-In-the-Loop (HiL) test rig for the different types of Electronic Braking System (EBS). It is applied to both modular testing and integrated testing.This test rig includes a vehicle dynamic model, a real-time simulation platform, an actual brake circuit and the EBS system under test.Firstly, the vehicle dynamic model is a highly parameterized commercial vehicle model. So it can simulate different types of commercial vehicle by different parameter configurations. Secondly, multi-types of brake circuit are modeled using brake components simulation library. So, it can test the EBS control unit independently without the influence of any real electro-pneumatic components. And a software EBS controller is also modeled. So it can test the algorithm of EBS offline. Thirdly, all real electro-pneumatic components without real gas inputted are connected to the real-time test platform through independent program-controlled relay-switches. So it can help to test the electro-pneumatic module independently without the influence of EBS control unit and real gas. Fourthly, all real components of the brake system with real gas driven are connected to the real-time platform through program-controlled relay-switches. So the integrated system can be tested. Finally top-level GUI is designed to let the test rig run at the right configuration and right connection for a specific test application.