Before every flight, SpaceX do a static fire test where the rocket is placed on the launch pad and the first stage engines are fired. That's an opportunity to test the gimbaling system.
According to the Falcon 9 user manual, the gimbaling system doesn't seem to be tested during the launch countdown (where you'd have a few seconds to do the tests between ignition and release):
Engine ignition occurs shortly before liftoff, while the vehicle is held down at the base via hydraulic clamps. The flight computer evaluates engine ignition and full-power performance during the prelaunch hold-down, and, if nominal criteria are satisfied, the hydraulic release system is activated at T- 0.