First of all, make sure your testing on a device and not in the Simulator.
Next, go to the App Store and sign out of your current account.
Then make the purchase in your app and it'll ask you to sign in, use your test account that you created in iTunes Connect.