Without the right testing equipment it can be very difficult to test a battery. The easiest method is to measure the specific gravity by using a hydrometer and to measure the voltage using a digital multimeter, if you test a lot of batteries you may need to buy a good load tester.
First you must fully charge the battery (see chart). Check the battery voltage after removing any surface charge, it should read above 12.65 volts for a fully charged battery, if your battery is measuring 10.5 volts after charging it typically indicates a shorted or faulty cell. If you can check every cell in the battery with a hydrometer, the cell readings should all be the same, a fully charged cell reads 1.265 – 1.280, if there is more than 0.05 points different it indicates a faulty battery. Readings below 1.225 indicate the battery needs to be charged before load testing.
If the battery is sealed it should have a built in hydrometer telling the charge of one cell, you may get a good reading in that cell but the problem may be in one of the other cells.
Once the battery is charged you need to use a load tester. A good load tester is very expensive so it may be better to get a professional to test it.