The invention discloses a test method and
system for starting and stopping trusted proxy services of DCS (
Distributed Control System) upper computers in batches, belonging to the technical field of industrial control, comprising the following steps: running a pre-configured
executable program by using a multi-thread mechanism, reading a protocol file in the pre-configured
executable program, and remotely connecting to each DCS upper computer in batches based on the protocol file; printing a process of connecting to each DCS upper computer and executing a command at a terminal in real time, and if a failure occurs, immediately returning failure reasons such as connection
timeout and incorrect reply of a connected target host; after the operation of the pre-configured
executable program is finished, returning the number of threads and a prompt that the operation of the threads is finished; and based on the real-time printing result and the returned prompt, checking the online state of each DCS upper computer, and verifying whether the batch
online and offline functions take effect or not. According to the method, the trusted
proxy service of the DCS upper computer is started and stopped in batches by one key, so that a large batch of equipment can be
online and offline at the same time at one time.