bad battery detecting
You can connect a load on u r battery that can draw an appriciable current i.e. for a 12V 7Ah battery try to draw a current between 5-15A. If there is a large dip in the voltage across the load then the battery is not ok. Considering a 12,5 to 12,8 open voltage, at load this sould not fall below 12,3 to 12,6 according to initial voltage. (This is just an example and values are not based on manufacturers data) Usually faulty batteries could measure less than 12V at such loads.
Simillarly you can operate with other battery voltages.
Carry an experiment with good battery and use the results as an approximate reference. Certainly, this method will give a rough result since the load is connected for a short period, usually anything less than 10 secs.
You will not get an indication of the capacity of the battery but only on its approximate condition.