Software-in-the-Loop (SIL) testing is an approach used for verification and validation in the energy sector. However, there is no comprehensive overview of the application, potential, and challenges of SIL within this sector. Therefore, this paper conducts a thorough scoping review of the existing literature within the scope of SIL and related in-the-loop approaches in the energy sector. A total of 88 full-text articles from four significant databases ACM, IEEE Xplore, Scopus, and Web of Science are analyzed and categorized to map the purpose, methods, architecture, interoperability and protocols, technologies, challenges, and limitations. The results present a grand perspective of in-the-loop across several domains followed by an analysis of SIL in the energy sector. The application domains carry characteristics from complex systems, systems-of-systems, cyber-physical systems, critical systems, real-time systems, and sociotechnical systems. The energy sector and the automotive industry are amongst the most applied domains. Within energy- and electricity systems, hardware-based in-the-loop paradigms are mostly applied for testing low-level signaling, and SIL is used for control strategy testing, optimization, dispatching, and experimentation. The examined SIL architectures have distributed-, real-time, and closed-loop properties, and are constrained by specialized simulation power hardware. Future research should address how to systematically develop SIL testing environments with guiding principles to support application development for the future digitalized energy system. [ABSTRACT FROM AUTHOR]