Is there any way to test a breaker?

that motor is going to spike more than the 15 amps that its rated for when it initially goes under load. 20 amp breaker is prob the minimum breaker you can run with that set up. with out actually checking it i would say the breaker has a bad heater in it.i would replace it
I agree, it will probably spike higher than the full 20 amps at re-start. A "slow-blow" breaker like this:

IMG_1246.PNG

Probably need to buy two and link their switches together if you buy this specific one. Without doing more research to see if this is specifically made. Look for "high magnetic" in the circuit breaker description. Plus get the one that fits your panel (I.e. Square D, GE, etc.).

If you have your compressor plugged into an extension cord, don't! Plug it directly into the wall with the shortest cord possible.