an ac power supply testing method upon booting a main board is provided . the testing method is applied to a main board , a microprocessor is in connection with the main board , and a relay is connected with the microprocessor , an ac power supply and a system power supply of the main board . the testing method includes steps of configuring a system power on / off time of the microprocessor ; counting down the system power on / off time ; determining the current state of the relay ; shutting off the relay and resuming executing step if the current state is on ; and executing a power supply testing upon booting if the current state is off .