To quickly run a main or test function at the caret, press &shortcut:ShowIntentionActions; and select the Run intention action.