Archive

With in-skill purchasing (ISP) now available in Alexa skills, you can sell premium content to enrich your voice experience. You can sell in-skill products as one-time purchases that unlock access to premium content or you can sell subscriptions that offer access to premium content for a period of time. No matter which in-skill product you build, it’s important to create a seamless customer experience and test your ISP to reduce friction in the certification process.

To help you prepare your ISP for testing and certification, check out the following 10 test cases below. To get started, set up the ISP sample skill from GitHub to your local environment:

Choosing Your Testing Environment

Test Simulator UI: This is a fast and straightforward testing environment. You can view the JSON I/O for request and response, which can help you quickly troubleshoot issues. You will be able to experience the entire purchase workflow from Test Simulator UI.

Command-Line Interface: Another option is to test from the Alexa Skills Kit (ASK) Command-Line Interface (CLI). The advantage is that you can write a script to automate the workflow. However, currently you are not able to use CLI to test the purchase workflow. For example, if you say, “Alexa, ask Premium Facts to buy the Science Pack” there will be an error message from JSON response. After you buy the ISP, you can use the CLI to test the rest of workflow. For instance, say, “Alexa, ask Premium Facts to tell me more about Science Pack” and the expected response should appear in the Alexa Developer Console.

Another important feature is that every time you purchase an entitlement from developer account, use “ask api reset-isp-entitlement <-i|--isp-id <isp-id>> <-g|--stage <stage>> [-p|--profile <profile>] [--debug]” to reset the purchase. For subscriptions, you can reset by saying “cancel subscription” and then subscribe again.

Devices: You should also test your ISP from an Alexa-enabled device to make sure it can handle required tasks in real-world scenarios. Use the beta testing feature in the Alexa Developer Console to invite customers to use the skill on their own devices for user acceptance testing.

Choosing Your Test Account

Test Using Your Developer Account:Using your developer account, should be able to cover all testing scenarios. As we mentioned earlier, you can test the purchase for multiple (endless) times using “ask api reset-isp-entitlement” to reset your ISP purchasing back to purchasable.

In order to test your ISP skill, your account needs to be a US account. You can check if it’s a US account by navigating to https://www.amazon.com/. Go to “Your Account,” click “Content and Devices,” “Settings,” and then “Country/Region Settings” to check the country. If the country is not United States, change it to US.

Test with Beta Test Accounts:You will mostly benefit from test accounts when your developer account can’t be configured as a US account. By sending out beta test invites to users’ US accounts, they will be able to test ISP. But in this scenario, the purchase can’t be reset because a user can only test once with the beta test account.

10 Test Cases for In-Skill Products

After choosing your testing environment and test accounts, it’s time to set up your test cases. You can follow this check list for functional tests and user experience tests before you submit your ISP skill for certification. Follow the below steps to create each test case, using this ISP sample skill as our example.

Test Case #1: Invoke the purchase suggestion (upsell) scenarios.

Steps:

Invoke the ISP with, “Alexa, open Premium Facts sample” and continue with the skill until the upsell scenario shows up.

Expected Result: The upsell message should clearly explain what it should provide to users. The upsell message is provided at the beginning of the sample skill with, “To hear about the premium categories for purchase, say 'What can I buy'.” When navigating through the free content, you should be able to reach the upsell scenario.

Expected Result: In the developer account, there will be an offer card and a purchase card, which will show up in the companion Alexa app or alexa.amazon.com. Find the receipt for your test purchase under your Amazon account digital orders. The information for the purchase should match with what you configured with your ISP. The receipt could be found only if you purchase the ISP from a live skill, but you can see the purchase card in both the developer console and live skill.

Test Case #5: Buy a product and start a flow that would prompt a purchase suggestion if the product had not been purchased.

Expected Result: You should be able to purchase using the invalid payment information when test developer stage skill from developer account or a beta test. If you use invalid payment information to purchase the in-skill product in a live skill, the purchase flow will provide an error message.

Test Case #7: Complete a scenario that would result in a purchase suggestion. Decline the suggestion.

Alexa should respond with, “Products available for purchase at this time are All Access, History Pack, and Space Pack. To learn more about a product, say 'Tell me more about' followed by the product name. If you are ready to buy say 'Buy' followed by the product name. So, what can I help you with?”

Respond with, “I don’t want to buy anything.”

Expected Result: There shouldn’t be any purchase suggestion in the response.

Test Case #8: Complete a scenario that would result in a purchase suggestion. Accept the suggestion, but decline the purchase prompt.