The paper is focused on the development of the digital twin of the hydraulic control valve for continuous control of the oil flow – servovalve or control valve – and their use by the testing of the control system of the test rig for the measurement and evaluation of the characteristics of the valve. The structure of the mathematical model of the control valve enables to do the parameterisation for different types and sizes of the control valves only using the catalogue data delivered by the valve producers. In the next step the created and parameterized model is implemented into the dSpace MicroLabBox for the real time realisation of the digital twin. The MicroLabBox is equipped with the analogue inputs and outputs and allows the connection of the digital twin to the control system in the same way as the real servovalve. Finally, the characteristics of the valve are measured and evaluated using the HiL simulation of the digital twin. The digital twin of the servovalve allows the testing of the developed control system and software for the hydraulic test rig for the measurement of the valve characteristics without the need of the real valves different types.