**WARNING: Lithium Ion cells **
While this question relates to non-rechargeable AA cells it is possible that someone may seek to extend the advice to testing other small cells.
In the case Of LiIon rechargeable cells (AA, 18650, other) this can be a very bad idea in some cases.
Shorting Lithium Ion cells as is test 2 is liable to be a very bad idea indeed.
Depending on design, some LiIon cells will provide short circuit current of many times the cell mAh rating - eg perhaps 50+ amps for an 18650 cell, and perhaps 10's of amps for an AA size LiIon cell.
This level of discharge can cause injury and worst case may destroy the call, in some uncommon cases with substantial release of energy in the form of flame and hot material.
AA non-rechargeable cells:
1) Ignore the funny answers
Generally speaking, if a battery is more than 1 year old then only Alkaline batteries are worth keeping. Shelf life of non-Alkaline can be some years but they deteriorate badly with time. Modern Alkaline have got awesome - still a majority of charge at 3 to 5 years.
Non brand name batteries are often (but not always) junk.
Heft battery in hand. Learn to get the feel of what a "real" AA cell weighs. An Eveready or similar Alkaline will be around 30 grams/one ounce. An AA NiMH 2500 mAh will be similar. Anything under 25g is suspect. Under 20g is junk. Under 15g is not unknown.
2) Brutal but works
Set multimeter to high current range (10A or 20A usually). Needs both dial setting and probe socket change in most meters.
Use two sharpish probes.
If battery has any light surface corrosion scratch a clean bright spot with probe tip. If it has more than surface corrosion consider binning it. Some only Alkaline cells leak electrolyte over time, which is damaging of gear and annoying (at least) to skin.
Press negative probe against battery base. Move slightly to make scratching contact. Press firmly. DO NOT slip so probe jumps off battery and punctures your other hand. Not advised. Ask me how I know.
Press positive probe onto top of battery. Hold for maybe 1 second. Perhaps 2. Experience will show what is needed. This is thrashing the battery, decreasing its life and making it sad. Try not to do this often or for very long.
Top AA Alkaline cells new will give 5-10 A. (NiMH AA will approach 10A for a good cell).
Lightly used AA or ones which have had bursts of heavy use and then recovered will typically give a few amps.
Deader again will be 1-3A.
Anything under 1 A you probably want to discard unless you have a micropower application.
Non Alkaline will usually be lower. I buy ONLY Alkaline primary cells as other "quality" cells are usually not vastly cheaper but are of much lower capacity.
Current will fall with time. Very good cell will fall little over 1 to maybe 2 seconds. More used cells will start lower and fall faster. Well used cells may plummet.
I place cells in approximate order of current after testing. The top ones can be grouped and wrapped with a rubber band. The excessively keen may mark the current given on the cell with a marker. Absolute current is not the point - it serves as a measure of usefulness.
3) Gentler - but works reasonably well.
Set meter to 2V range or next above 2V if no 2V range.
Measure battery unloaded voltage.
New unused Alkaline are about 1.65V. Most books don't tell you that.
Unused but sat on the shelf 1 year + Alkaline will be down slightly. Maybe 1.55 - 1.6V
Modestly used cells will be 1.5V+
Used but useful may be 1.3V - 1.5V range
After that it's all downhill. A 1V OC cell is dodo dead. A 1.1V -.2V cell will probably load down to 1V if you look at it harshly. Do this a few times and you will get a feel for it.
4) In between.
Use a heavyish load and measure voltage. Keep a standard resistor for this.
SOLDER the wires on that you use as probes. A twisted connection has too much variability.
Resistor should draw a heavy load for battery type used.
100 mA - 500 mA is probably OK.
Battery testers usually work this way.
5) Is this worth doing?
Yes, it is. As well as returning a few batteries to the fold and making your life more exciting when some fail to perform, it teaches you a new skill that can be helpful in understanding how batteries behave in real life and the possible effect on equipment. The more you know the more you get to know and this is one more tool along the path towards knowing everything :-). [The path is rather longer than any can traverse, but learning how to run along it can be fun].