This explains in detail how the battery tests are carried out and what equipment is used during the testing of a battery cell, essentially you need a whole lot of equipment to safely test the utmost limits of
batteries.
How is the test done and how to read the charts
The short version is that there is a
device that holds the battery in constant contact of a set of leads, those leads are hooked up to a series of devices that both monitor results and provide an electrical load to the battery cell and can graph the outcome in comparison to other
batteries. With testing equipment such as what is linked in that article you would be able to find the limits of a battery that has an unknown amp rating, you would start small with say a 1A load and ramp it up slowly until the battery started to show poor performance or got too hot during that specific loaded test.