The invention relates to a switching power supply with a testability function and a testing method thereof and belongs to the field of power supplies. The switching power supply with the testability function is used for solving the problems that during power failure, the manual testing process is complicated, the testing time is long, the maintenance support is difficult, the maintenance cost is high and the like caused due to the fact that the existing switching power supplies do not have testability. According to the switching power supply and the testing method thereof, the switching power supply is universal, eight test points are selected from the switching power supply, four test points are selected from the primary side of a transformer, four test points are selected from the secondary side of the transformer, eight voltages are processed and then are transmitted to a processor, judgment is carried out sequentially on TP4, TP5, TP1-TP2-TP3 (side by side in a group) and TP6-TP7-TP8 (side by side in a group), failure information is obtained easily and is displayed on a display, and then, maintenance personnel can quickly and accurately diagnose failure and isolate components and devices which are in failure, so that the workload of human judgment is reduced greatly.