testing

Test RevenueCat Android integrations using Test Store and mockk.

45|Updated Jun 2, 2026
One-click install
npx skills add https://github.com/RevenueCat/play-billing-skills --skill testing-revenuecat
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/RevenueCat/play-billing-skills/tree/main/revenuecat/testing
Command: npx skills add https://github.com/RevenueCat/play-billing-skills --skill testing-revenuecat

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mockk, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill addresses the need for a streamlined testing environment for RevenueCat Android integrations, using the Test Store for most scenarios and mockk for unit testing, without relying on the Google Play sandbox for daily iterations.

Core Features & Use Cases

  • Test Store Usage: Provides a testing environment that mimics real-world behavior with Success, Fail, and Cancel outcomes for transactions.
  • Mockk-based Unit Testing: Enables mockable BillingService interface for unit testing ViewModels and other components without direct interaction with Purchases.
  • CI Integration: Includes a GitHub Actions CI pattern for continuous testing on every code push.

Quick Start

Initialize the test environment using the test API key and configure the BillingService for mocking, then run unit tests with the GitHub Actions workflow.

Frequently Asked Questions about testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test RevenueCat Android billing integrations without the Google Play sandbox?

Test RevenueCat Android integrations using a Test Store environment and mockk. This setup mimics real-world transaction behaviors, allowing you to bypass the Google Play sandbox for daily development and continuous integration workflows.

How does the Test Store environment handle different transaction outcomes?

The Test Store environment mimics real-world behavior by providing configurable Success, Fail, and Cancel outcomes for transactions, enabling comprehensive unit testing of your billing logic without actual purchases.

How do I unit test ViewModels that interact with RevenueCat Purchases?

You can unit test ViewModels by utilizing a mockable BillingService interface with mockk. This allows you to isolate components and test logic without direct interaction with the Purchases object.

Can I use GitHub Actions for continuous testing of RevenueCat integrations?

Yes, you can integrate continuous testing using a provided GitHub Actions CI pattern. This allows you to automatically run unit tests on every code push to ensure billing integration stability.

Do I need a specific API key to start testing RevenueCat with mockk?

Yes, setting up the test environment requires a RevenueCat Test Store API key. You must initialize the environment with this key and configure the BillingService for mocking before running tests.

What are the limitations of using the Test Store for Android billing tests?

While the Test Store handles most scenarios by mimicking real-world behaviors, complex edge cases might still require the actual Google Play sandbox. It is primarily designed to eliminate sandbox dependency for daily iterations.