Google Play has already implemented a sandbox for testing subscriptions and purchases. You must publish your application in beta and a few hours after test users (added to the Google Play Developer Console) can make test purchases (they are not charged) in your application. They can even make purchases by subscription. A test subscription is automatically renewed every day (until it is canceled from Google Play), regardless of the duration of the subscription. Please note that the test user (Google account) must have a valid credit card added to the Google Wallet account in order to make trial purchases (which are not charged). When making a purchase, the purchase confirmation dialog clearly states that this is a test purchase and you wonβt pay.
source share