If you have an electric water heater with a reset switch that keeps going off, it usually indicates a problem with the heating element or thermostat. The heating element can be tested using an ohm meter. This is done by disconnecting the wires from the element and putting the ohm meter on the leads.
This should only be done by a trained service technician. The wires that are attached to the heating element and thermostat contain high-voltage electricity and pose a risk of serious injury or death. You should not attempt to work on these components unless you are trained and experienced in working with electricity and have knowledge of lock-out tag-out procedures.
As a general rule, you should replace the thermostat and heating elements at the same time. Before you spend the money on replacement parts and labor, you should consider the age of your water heater. Most water heaters have a usable life of 10 to 15 years. If your unit is more than 10 years old, it may make more sense to replace it. You can usually offset the cost of purchase and installation within a few years through lower utility bills.