I initially thought there would be an option in the form settings itself, to choose whether to run it in test or live mode. But there doesn't seem to be such an option.
So where do I configure this? Is it a URL difference between live and test mode?
In Wordpress, when using shortcodes to embed the payment form, I saw that you can set the option in the shortcode itself, for example:
[civicrm component="contribution" id="3" mode="test" hijack="0"]