A communications device, adapted for performing online testing, which indicates a test is performed when a service is performed, comprising: a communications processing unit, configured to perform a function of the communications device; a collection unit, configured to collect a signal output by the communications processing unit when the communication processing unit performs a service; and a monitoring unit, configured to monitor the signal collected by the collection unit to locate a fault; wherein the communication device comprises at least two collection units and at least two communications processing units, wherein a first collection unit corresponds to a first communications processing unit, and a second collection unit corresponds to a second communications processing unit, and the monitoring unit is configured to compare signals collected by the at least two collection units to locate the fault; and wherein a signal collected by the first collection unit is a first signal, and a signal collected by the second collection unit is a second signal, the monitoring unit is configured to calculate the first signal and the second signal to obtain a relative transmission modulation characteristic, and locate the fault according to the relative transmission modulation characteristic; wherein the communication device further comprises: a selection unit, configured to directly connect the at least two communications processing units that correspond to a loop to be monitored to implement the loop; wherein the selection unit is further configured to receive a control command of the monitoring unit and directly connect corresponding communication processing units according to the control command. a communications processing unit, configured to perform a function of the communications device; a collection unit, configured to collect a signal output by the communications processing unit when the communication processing unit performs a service; and a monitoring unit, configured to monitor the signal collected by the collection unit to locate a fault; wherein the communication device comprises at least two collection units and at least two communications processing units, wherein a first collection unit corresponds to a first communications processing unit, and a second collection unit corresponds to a second communications processing unit, and the monitoring unit is configured to compare signals collected by the at least two collection units to locate the fault; and wherein a signal collected by the first collection unit is a first signal, and a signal collected by the second collection unit is a second signal, the monitoring unit is configured to calculate the first signal and the second signal to obtain a relative transmission modulation characteristic, and locate the fault according to the relative transmission modulation characteristic; wherein the communication device further comprises: a selection unit, configured to directly connect the at least two communications processing units that correspond to a loop to be monitored to implement the loop; wherein the selection unit is further configured to receive a control command of the monitoring unit and directly connect corresponding communication processing units according to the control command.