Finding battery capacity
Lithium-Ion batteries are very dangerous and need to be handled with care. They are sensitive to over-charging, over-discharging, current (while charging or discharging) above what they are rated for, temperature, mechanical force (eg. puncture), trickle charging... just to name a few. Their immediate failure mode is to catch fire.

Even if they have built-in protection circuitry, it is always best to have a solid understanding of the risks and safety precautions involved.

Also, with respect to charging, there are specific profiles that must be followed. Parameters will be given by the battery manufacturer for constant current and constant voltage levels required. A compatible charge circuit is absolutely required. Unless you have in-depth experience with this, just buy a reputable one, pre-made. Absolutely do not simply apply 5V and monitor your battery!

For discharging, if you are trying to characterize these batteries, use a known resistance and measure the voltage drop. Be sure that the resistor used is of a sufficient power rating. You can then calculate the current drawn. It will decrease as the battery voltage decreases. Plot a graph of Battery Voltage as a function of Time, with constant resistance.

Better yet, you could apply a constant-current load to your battery, and again plot the Battery Voltage as a function of Time. Both methods work, but I prefer the constant-current method.

To re-iterate, you should really do some research on Lithium-Ion battery safety before you continue with any of this experimentation!

Try looking online. Places like Battery University are great resources.

Be careful, don't burn down your house.