Ideally, all the reg breathing people mention above will be done on the surface with the second stage under water. If it's not then it's largely a waste of gas as inhaling through a reg with a torn diaphragm or an improperly seated exhaust valve will feel normal and give a false sense of security after the reg test - as the reg will still flood or breathe unacceptably wet once in the water.
For a diver having to do the pre-dive testing on a boat deck, testing against a closed tank valve is the only reliable way to go as it's the only way to test if the second stage is truly sealed with intact diaphragm, exhaust valve and case o-rings.
You can 1) connect the reg, inhale to do a vacuum check, then turn on the valve, and do the breathing test, or you can 2) pressurize the reg, turn off the tank valve, then breath it down.
My preference is to do the former, then shut the valve off and see if the reg holds pressure over several minutes. If the SPG reading drops, then the system has a leak somewhere - how big equating to how fast the SPG reading drops.
On the first dive of the trip, I'll also pressurize the reg with an IP gauge attached, check the swing during the breath test, then leave it pressurized a few minutes to ensue the IP is stable.