The smart-grid era is characterized by a progressive penetration of distributed energy resources into the power systems. To ensure the safe operation of the system, it is necessary to evaluate the interactions that those devices and their associated control algorithms have between themselves and the pre-existing network. In this regard, Hardware-in-the-Loop (HIL) testing approaches are a necessary step before integrating new devices into the actual network. However, HIL is a device-oriented testing approach with some limitations, particularly considering the possible impact that the device under test may have in the power system. This paper proposes the Power System Hardware-in-the-Loop (PSHIL) concept, which widens the focus from a device- to a system-oriented testing approach. Under this perspective, it is possible to evaluate holistically the impact of a given technology over the power system, considering all of its power and control components. This paper describes in detail the PSHIL architecture and its main hardware and software components. Three application examples, using the infrastructure available in the electrical engineering laboratory of the University of Sevilla, are included, remarking the new possibilities and benefits of using PSHIL with respect to previous approaches.