An uninterruptible power supply, UPS, wherein the UPS is separately connected to a load and at least two battery packs (1, 2, 3...), the UPS is adapted to control a mains supply and the battery packs to jointly supply power to the load, and the UPS comprises a test unit and a determining unit; the test unit is configured to: perform a separate capacity test on each battery pack in the at least two battery packs, and obtain a battery capacity of the battery pack, wherein the separate capacity test comprises: measuring the battery capacity of each battery pack when the battery pack and the mains supply jointly supply power to the load, wherein in this case, another battery pack other than the battery pack does not discharge and has backup power; and wherein the UPS is further connected to at least two control circuits that are connected to the at least two battery packs in a one-to-one correspondence, each control circuit in the at least two control circuits is connected between the UPS and a battery pack corresponding to the control circuit, and the UPS is specifically configured to control, by using each control circuit, a battery pack connected to the control circuit to charge or discharge; wherein the control circuit comprises a DC/DC circuit; wherein the test unit is further configured to: when performing the separate capacity test on each battery pack, control a discharge voltage of a DC/DC circuit corresponding to the battery pack to be higher than a discharge voltage of a DC/DC circuit corresponding to the another battery pack; characterized in that the determining unit is configured to determine a total battery capacity of the at least two battery packs based on the battery capacity of each battery pack, and in that the test unit is specifically configured to: when performing the separate capacity test on each battery pack, obtain the battery capacity of the battery pack from a DC/DC circuit corresponding to the battery pack; wherein the DC/DC circuit corresponding to each battery pack detects a voltage and a discharge current of the corresponding battery pack, calculates the battery capacity of the battery pack based on the detected voltage and discharge current of the battery pack, and sends the battery capacity of the battery pack to the UPS; wherein when the mains supply is abnormal during the separate capacity test on each battery pack, all the battery packs are switched to a battery discharging state. the test unit is configured to: perform a separate capacity test on each battery pack in the at least two battery packs, and obtain a battery capacity of the battery pack, wherein the separate capacity test comprises: measuring the battery capacity of each battery pack when the battery pack and the mains supply jointly supply power to the load, wherein in this case, another battery pack other than the battery pack does not discharge and has backup power; and wherein the UPS is further connected to at least two control circuits that are connected to the at least two battery packs in a one-to-one correspondence, each control circuit in the at least two control circuits is connected between the UPS and a battery pack corresponding to the control circuit, and the UPS is specifically configured to control, by using each control circuit, a battery pack connected to the control circuit to charge or discharge; wherein the control circuit comprises a DC/DC circuit; wherein the test unit is further configured to: when performing the separate capacity test on each battery pack, control a discharge voltage of a DC/DC circuit corresponding to the battery pack to be higher than a discharge voltage of a DC/DC circuit corresponding to the another battery pack; characterized in that the determining unit is configured to determine a total battery capacity of the at least two battery packs based on the battery capacity of each battery pack, and when performing the separate capacity test on each battery pack, control a discharge voltage of a DC/DC circuit corresponding to the battery pack to be higher than a discharge voltage of a DC/DC circuit corresponding to the another battery pack; characterized in that the determining unit is configured to determine a total battery capacity of the at least two battery packs based on the battery capacity of each battery pack, and when performing the separate capacity test on each battery pack, obtain the battery capacity of the battery pack from a DC/DC circuit corresponding to the battery pack; wherein the DC/DC circuit corresponding to each battery pack detects a voltage and a discharge current of the corresponding battery pack, calculates the battery capacity of the battery pack based on the detected voltage and discharge current of the battery pack, and sends the battery capacity of the battery pack to the UPS; wherein when the mains supply is abnormal during the separate capacity test on each battery pack, all the battery packs are switched to a battery discharging state.