Best way to test a USB wall charger for output current
You ask, "how can I measure the maximum current a power supply provides"?
This is an ill-posed question. A power supply can provide the maximum current that it is designed to, which is usually written on the power supply case. So you don't need to measure anything in the first place. This is maximum guaranteed, without overheating or dropping designated voltage level. However, you indeed can research if the particular PSU meets it's advertised specifications and measure all parameters using known loads and just measure output voltage.

Another misconception is expressed in your comment as "or whatever the charger thinks it's best". Chargers do not "think", they just "supply" whatever they can within the limit of their "advertised" capability, which they advertise via various "signatures" on D+/D- lines, many variants of explanations can be found here. It is a function of device (or your charging circuit) recognize the signature and to take the current that does not exceed "provider" capabilities. If your device can't recognize the charger's signature, it should limit its consumption to bare minimum of 500 mA.