I'm only a user of this component and not affiliated with JoomDonation in anyway.
However, I do what you're wanting to do by having my payment gateway(s) of choice setup in the MembershipPro>Payment Plugins section.
For e.g.
Then make sure that they're configured with your actual payment gateway provider(s) account details, that you will find in your / their website / account.
In your chosen payment gateway 'Plugin' within MembershipPro in your Joomla backend, for this example I use GoCardless but most payment plugins are similar in this 'live or demo parameters' regard, see the red highlighted area of the below screenshot;
Then make sure your membership pro actual membership plan that you want to test, has the 'Recurring Option' enabled and set to your requirements;
For e.g.
said payment options chosen and that your payment gateway with the provider is set to sandbox / test, most have this option in your account with them.
For e.g.
Next you can test your membership plan and check all is as it should be. Unless you set your membership plan length to say 1 day, you would have to wait however long to whatever you have it setup as, after initial test subscription which you could wait weeks or a month etc. It's then easy enough to change subscription plan length back to your actual desired length for live use once all your testing checks out.
I take it you already know the URL to your membership plan in question, as of course you would need this to then once it's published test it out to make sure the above is met?
I hope the above is of some help, if not apologies but it works for me.
Regards,