---
title: StoreKit Test
framework: StoreKit Test
role: collection
role_heading: Framework
platforms: [iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+, tvOS 14.0+, visionOS 1.0+, watchOS 7.4+]
path: storekittest
---

# StoreKit Test

Create and automate tests in Xcode for your app’s subscription and Apple In-App Purchase transactions, and SKAdNetwork implementations.

## Overview

Overview The StoreKitTest framework makes StoreKit testing in Xcode available for automation. Use this framework to write unit tests and continuous integration tests. Use SKTestSession and SKAdTestSession to control the test environment. For testing Apple In-App Purchase transactions, use SKTestSession. Each instance of SKTestSession gives you access to the same settings you manually change for StoreKit testing in Xcode. Use this class to test a variety of Apple In-App Purchase scenarios, such as subscription renewals and Ask to Buy transactions, and maintain control over the transactions in the testing environment. For testing ad impressions and postbacks, use SKAdTestSession. Each instance of SKAdTestSession holds a set of test postbacks that you create and can use in multiple unit tests. Ad networks that use SKAdNetwork APIs can use this class to validate the ad impressions that they sign, and test receiving postbacks on their server. Advertised apps can test their conversion value updates. Testing StoreKit in iOS, watchOS, or tvOS apps requires Xcode 12 or later running on macOS 10.15 or later. Testing StoreKit in a macOS app requires Xcode 12 or later running on macOS 11 or later. note: Session 10659 : Introducing StoreKit testing in Xcode

## Topics

### StoreKit transaction testing

- [Setting up StoreKit Testing in Xcode](xcode/setting-up-storekit-testing-in-xcode.md)
- [SKTestSession](storekittest/sktestsession.md)
- [SKTestTransaction](storekittest/sktesttransaction.md)

### StoreKit transaction testing errors

- [SKTestErrorDomain](storekittest/sktesterrordomain.md)
- [SKTestError](storekittest/sktesterror.md)

### Ad impression and postback testing

- [Testing and validating ad impression signatures and postbacks for SKAdNetwork](storekittest/testing-and-validating-ad-impression-signatures-and-postbacks-for-skadnetwork.md)
- [SKAdTestSession](storekittest/skadtestsession.md)
- [SKAdTestPostback](storekittest/skadtestpostback.md)
- [SKAdTestPostbackResponse](storekittest/skadtestpostbackresponse.md)
- [SKAdTestPostbackVersion](storekittest/skadtestpostbackversion.md)

### Ad impression and postback errors

- [SKAdTestErrorDomain](storekittest/skadtesterrordomain.md)
- [SKAdTestError](storekittest/skadtesterror.md)

### Structures

- [StoreKitAppStoreSyncAPI](storekittest/storekitappstoresyncapi.md)
- [StoreKitAppTransactionAPI](storekittest/storekitapptransactionapi.md)
- [StoreKitLoadProductsAPI](storekittest/storekitloadproductsapi.md)
- [StoreKitManageSubscriptionsAPI](storekittest/storekitmanagesubscriptionsapi.md)
- [StoreKitOfferCodeRedeemAPI](storekittest/storekitoffercoderedeemapi.md)
- [StoreKitPurchaseAPI](storekittest/storekitpurchaseapi.md)
- [StoreKitRefundRequestAPI](storekittest/storekitrefundrequestapi.md)
- [StoreKitSubscriptionStatusAPI](storekittest/storekitsubscriptionstatusapi.md)
- [StoreKitVerificationAPI](storekittest/storekitverificationapi.md)

### Enumerations

- [SKTestFailures](storekittest/sktestfailures.md)

### Protocols

- [FailableStoreKitAPI](storekittest/failablestorekitapi.md)
- [SKTestFailure](storekittest/sktestfailure.md)
