开发人员控制台
感谢您的访问。此页面目前仅提供英语版本。我们正在开发中文版本。谢谢您的理解。

Onboarding Process - Test Plan

Introduction

When integrating into the incentives API, we don’t dictate how or when you you need to complete tests as we know that every company has their own processes. Instead we’ve compiled a list of suggested test cases to be completed. This will help you develop a more robust integration with Amazon and ensure that your systems know how to react when you face any of the expected use cases.

The below test cases are split out by API operation. This helps you understand which set of test cases is right for you.

To help you with the testing processes we’ve created a page that contains test barcodes and phone numbers for testing on sandbox and production. This can be found here.

CreateGiftCard Test Cases

Test ID Test Name Test Case Detail Expected Result
1 Create a gift code Initiate a CreateGiftCard request for 100.00 value and handle the response received. You should receive a SUCCESS response. Your system should handle the SUCCESS response properly, based on the requirements.
2 Cancel a gift card Initiate a CancelGiftCard request for the creationRequestId created in test 1. You should receive a SUCCESS response. Your system should handle the SUCCESS response properly, based on the requirements.
3 Idempotency Initiate a CreateGiftCard request for 1000.00 and handle the response received. Send another CreateGiftCard request with the same creationRequestId. You should receive a SUCCESS response and the same gcId and claimCode.
4 Mock F2047 - CancelRequestArrivedAfterTimeLimit Mock a response from the Amazon System that returns an F200 Error as CancelRequestArrivedAfterTimeLimit. Your system should handle this response correctly and let the user know that the gift card cannot be canceled as it's past the 15 minute time limit.
5 Mock F3003 - InsufficientFunds Mock a response from the Amazon System that returns an F300 Error as InsufficientFunds. Your system should handle this response correctly, this should also raise an alert that you are unable to process orders due to not having funds in your account.
6 Mock F3009 - ActiveContractNotFound Mock a response from the Amazon System that returns an F300 Error as ActiveContractNotFound. Your system should handle this response correctly, this should also raise an alert that you are unable to process orders due to the contract being expired.
7 Mock F3005 - AccountHasProblems Mock a response from the Amazon System that returns an F300 Error as AccountHasProblems. Your system should handle this response correctly, this should also raise an alert that you are unable to process orders due to an account issue. You will need to contact Amazon using the Outage Management page to investgate. Non-Urgent Process.
8 Mock F3006 - OperationNotPermitted Mock a response from the Amazon System that returns an F300 Error as OperationNotPermitted. Your system should handle this response correctly, this should also raise an alert that you attempted to perform an action that was not allowed such as canceling a creationRequestId that has not yet been created.
9 Mock F4000 - SystemTemporarilyUnavailable Mock a response from the Amazon System that returns an F400 Error as SystemTemporarilyUnavailable. Your system should handle this response correctly, you should retry this transaction once between 30 seconds - 120 seconds after the initial F400 was returned. If you receive a second SystemTemporarilyUnavailable you should send a CancelGiftCard request. If the CancelGiftCard returns F300:OperationNotPermitted, no gift card has been created and you can close the transaction. If you receive any other error, you should notify Amazon using the Outage Management page. Non-Urgent Process.
10 Mock F5000 - GeneralError Mock a response from the Amazon System that returns an F500 Error as GeneralError. Your system should handle this response correctly, this should also raise an alert that Amazon is having system issues. You should reach out to Amazon using the Outage Management page. Urgent Process.

↑ Back to top

ActivateGiftCard Test Cases

Test ID Test Name Test Case Detail Expected Result
1 Activate a gift code Initiate a ActivateGiftCard request for 100.00 value and handle the response received. You should receive a SUCCESS response. Your system should handle the SUCCESS response properly, based on the requirements.
2 Status Check Send an ActivationStatusCheck request for a sandbox card number that has not been used before. You should receive a SUCCESS response with the card status of Activated.
3 Deactivate a gift card Initiate a ActivateGiftCard request for the activationRequestId created in test 1. You should receive a SUCCESS response. Your system should handle the SUCCESS response properly, based on the requirements.
4 Idempotency Initiate a ActivateGiftCard request for 1000.00 and handle the response received. Send another ActivateGiftCard request with the same ActivationRequestId. You should receive a SUCCESS response and the same gcId and claimCode.
5 Mock F2012 - DeactivationNotAllowed Mock a response from the Amazon System that returns an F200 Error as DeactivationNotAllowed. Your system should handle this response correctly and let the user know that the gift card cannot be canceled as it's past the 15 minute time limit.
6 Mock F3003 - InsufficientFunds Mock a response from the Amazon System that returns an F300 Error as InsufficientFunds. Your system should handle this response correctly, this should also raise an alert that you are unable to process orders due to not having funds in your account.
7 Mock F3009 - ActiveContractNotFound Mock a response from the Amazon System that returns an F300 Error as ActiveContractNotFound. Your system should handle this response correctly, this should also raise an alert that you are unable to process orders due to the contract being expired.
8 Mock F3005 - AccountHasProblems Mock a response from the Amazon System that returns an F300 Error as AccountHasProblems. Your system should handle this response correctly, this should also raise an alert that you are unable to process orders due to an account issue. You will need to contact Amazon using the Outage Management page to investgate. Non-Urgent Process.
9 Mock F3006 - OperationNotPermitted Mock a response from the Amazon System that returns an F300 Error as OperationNotPermitted. Your system should handle this response correctly, this should also raise an alert that you attempted to perform an action that was not allowed such as canceling a activationRequestID that has not yet been created.
10 Mock F4000 - SystemTemporarilyUnavailable Mock a response from the Amazon System that returns an F400 Error as SystemTemporarilyUnavailable. Your system should handle this response correctly, you should retry this transaction once between 30 seconds - 120 seconds after the initial F400 was returned. If you receive a second SystemTemporarilyUnavailable you should send a DeactivateGiftCard request. If you receive any other error, you should notify Amazon using the Outage Management page. Non-Urgent Process.
11 Mock F5000 - GeneralError Mock a response from the Amazon System that returns an F500 Error as GeneralError. Your system should handle this response correctly, this should also raise an alert that Amazon is having system issues. You should reach out to Amazon using the Outage Management page. Urgent Process.

↑ Back to top

LoadAmazonBalance Test Cases

You can verify some components of your integration using the Sandbox environment. However, complete end-to-end testing of your applications user experience can only be completed using the production API account.

While we offer a number of accounts that you can use for testing, which you can find here, you should create your own Amazon accounts for testing. Amazon accounts are region based so you’ll need to make sure you are going to the right page. Use the below links to help you pick the right login page.

US CA MX FR IT ES DE UK UAE
TR JP AU SA SE SG NL PL EG

Below is a quick overview of what tests can be completed within each environment.

Sandbox:

  • Simulate a response from the LoadAmazonBalance API by creating a "mock" request.

Production:

  • Use the Login with Amazon component to receive a valid customer.id value for an Amazon customer account.
  • Call the LoadAmazonBalance and VoidAmazonBalanceLoad endpoints.
  • Complete end-to-end testing of your application and user experience.

Login and Receive

Test ID Test Name Test Case Detail Expected Result
1 Validate Login with Amazon module This process is testing Login with Amazon to make sure you've correctly implemented this module and you have an accetable userID being returned.
1. Validate successful login
2. Valid authorization token
3. Validate user.id is returned
For each account
1. Login is successful
2. Authorization token is provided
3. A unique user.id value is provided
2 Validate LoadAmazonBalance 1. Use your application UX workflow to invoke this method for a test account that you created in step (1) for a monetary value
2. Log into the Amazon account and select View the Gift Card Balance
3. Validate notification message displays on the confirmation email and matches the notificationMessage parameter inserted into the API request.
4. Validate email was sent to email address registered with amazon.com account
1. status = success is returned for each call to Load
2. Account gift card balance matches the loaded amount
3. Notification message matches provided message
4. Email message received5. Value specified in amount.value debited from account in the Incentives API Portal
3 Validate LoadAmazonBalance idempotency 1. Invoke the method multiple times with the same loadBalanceRequestId and user.id
2. Log into amazon account
3. View gift card balance
1. status = success returned for each call
2. The amount.value from the first call is applied but subsequent calls to the LoadAmazonBalance method were ignored
4 Validate VoidAmazonBalanceLoad 1. Use previously created loadBalanceRequestId to void a transaction
2. Log into amazon.com account for applicable user.id
3. Balance has been voided
4. Validate email was sent to email address registered with amazon.com account
5. Log into Incentives API Portal and view transaction
1. status = success is returned for each call to Void
2. Account gift card balance matches the loaded amount
3. Notification message matches provided message
4. Email message received
5. Funds specified in amount.value refunded back to account in Incentives API Portal
5 F2034 - Country Error When attemping to top-up across marketplace you will receive an F200: UndefinedAccountId this test case will ensure that logic is being applied.
1. Navigate to the Test Accounts page and pick another production account that is outside of the marketplace you are integrating within.
2. Attempt a loadBalanceRequestId using the accoiunt you have selected.
[Optional] Create another account in a different marketplace(s) and identify the user via Login with Amazon.
The expected result should be F200: UndefinedAccountId.
6 Mock F3003 - InsufficientFunds Mock a response from the Amazon System that returns an F300 Error as InsufficientFunds. Your system should handle this response correctly, this should also raise an alert that you are unable to process orders due to not having funds in your account.
7 Mock F3009 - ActiveContractNotFound Mock a response from the Amazon System that returns an F300 Error as ActiveContractNotFound. Your system should handle this response correctly, this should also raise an alert that you are unable to process orders due to the contract being expired.
8 Mock F3005 - AccountHasProblems Mock a response from the Amazon System that returns an F300 Error as AccountHasProblems. Your system should handle this response correctly, this should also raise an alert that you are unable to process orders due to an account issue. You will need to contact Amazon using the Outage Management page to investgate. Non-Urgent Process.
9 Mock F3006 - OperationNotPermitted Mock a response from the Amazon System that returns an F300 Error as OperationNotPermitted. Your system should handle this response correctly, this should also raise an alert that you attempted to perform an action that was not allowed such as canceling a loadBalanceRequestID that has not yet been created.
10 Mock F4000 - SystemTemporarilyUnavailable Mock a response from the Amazon System that returns an F400 Error as SystemTemporarilyUnavailable. Your system should handle this response correctly, you should retry this transaction once between 30 seconds - 120 seconds after the initial F400 was returned. If you receive a second SystemTemporarilyUnavailable you should send a CancelGiftCard request. If you receive another error, you should notify Amazon using the Outage Management page. Non-Urgent Process.
12 Mock F5000 - GeneralError Mock a response from the Amazon System that returns an F500 Error as GeneralError. Your system should handle this response correctly, this should also raise an alert that Amazon is having system issues. You should reach out to Amazon using the Outage Management page. Urgent Process.

↑ Back to top

Phone Factor Test Script

Test ID Test Name Test Case Detail Expected Result
1 Validate LoadAmazonBalance [Direct to Account] Load Valid Amount with a verified number. This should be attempted using the Local Number Format and the E164 format. Load should succeed as it is between the expected range, and will be automatically added to the associated Amazon account.
2 Validate LoadAmazonBalance [Direct to Receipt] Load Valid Amount using a nonverified mobile phone number Load should succeed with a claim code printed on a receipt as the phone number is non-verified
3 Validate VoidAmazonBalance Void the transaction from Test #1 Void should succeed
4 Validate LoadAmazonBalance - Cross Country Load Valid Amount using a verified phone number that is not in the same country. There a number provided within the Test Accounts page. Load attempt should respond with a PARTIAL_SUCCESS result, as number is not valid for that nation
5 Mock F3003 - InsufficientFunds Mock a response from the Amazon System that returns an F300 Error as InsufficientFunds. Your system should handle this response correctly, this should also raise an alert that you are unable to process orders due to not having funds in your account.
6 Mock F3009 - ActiveContractNotFound Mock a response from the Amazon System that returns an F300 Error as ActiveContractNotFound. Your system should handle this response correctly, this should also raise an alert that you are unable to process orders due to the contract being expired.
7 Mock F3005 - AccountHasProblems Mock a response from the Amazon System that returns an F300 Error as AccountHasProblems. Your system should handle this response correctly, this should also raise an alert that you are unable to process orders due to an account issue. You will need to contact Amazon using the Outage Management page to investgate. Non-Urgent Process.
8 Mock F3006 - OperationNotPermitted Mock a response from the Amazon System that returns an F300 Error as OperationNotPermitted. Your system should handle this response correctly, this should also raise an alert that you attempted to perform an action that was not allowed such as canceling a loadBalanceRequestID that has not yet been created.
9 Mock F4000 - SystemTemporarilyUnavailable Mock a response from the Amazon System that returns an F400 Error as SystemTemporarilyUnavailable. Your system should handle this response correctly, you should retry this transaction once between 30 seconds - 120 seconds after the initial F400 was returned. If you receive a second SystemTemporarilyUnavailable you should send a CancelGiftCard request. If you receive another error, you should notify Amazon using the Outage Management page. Non-Urgent Process.
9 Mock F5000 - GeneralError Mock a response from the Amazon System that returns an F500 Error as GeneralError. Your system should handle this response correctly, this should also raise an alert that Amazon is having system issues. You should reach out to Amazon using the Outage Management page. Urgent Process.

↑ Back to top

Barcode Test Script

Test ID Test Name Test Case Detail Expected Result
1 Validate LoadAmazonBalance Using the Test Accounts provided, attempt to LoadAmazonBalance. LoadAmazonBalance should return SUCCESS
2 Validate VoidAmazonBalance Void the transaction from Test #1 VoidAmazonBalance should return SUCCESS
3 Validate LoadAmazonBalance - Cross Country Load Valid Amount using an AccountID that is not in the same country. There a number provided within the Test Accounts page. LoadAmazonBalance attempt should respond with a PARTIAL_SUCCESS result, as number is not valid for that nation
4 Validate ValidateAccountForAmazonBalanceLoad Using the Test Accounts provided, attempt to validate that an account is ready to be topped up using the ValidateAccountForAmazonBalanceLoad operation. [Optional] Attempt a number of AccountIDs across multiple locations and statuses to see what respons is returned. ValidateAccountForAmazonBalanceLoad should return SUCCESS.
5 Mock F3003 - InsufficientFunds Mock a response from the Amazon System that returns an F300 Error as InsufficientFunds. Your system should handle this response correctly, this should also raise an alert that you are unable to process orders due to not having funds in your account.
6 Mock F3009 - ActiveContractNotFound Mock a response from the Amazon System that returns an F300 Error as ActiveContractNotFound. Your system should handle this response correctly, this should also raise an alert that you are unable to process orders due to the contract being expired.
7 Mock F3005 - AccountHasProblems Mock a response from the Amazon System that returns an F300 Error as AccountHasProblems. Your system should handle this response correctly, this should also raise an alert that you are unable to process orders due to an account issue. You will need to contact Amazon using the Outage Management page to investgate. Non-Urgent Process.
8 Mock F3006 - OperationNotPermitted Mock a response from the Amazon System that returns an F300 Error as OperationNotPermitted. Your system should handle this response correctly, this should also raise an alert that you attempted to perform an action that was not allowed such as canceling a loadBalanceRequestID that has not yet been created.
9 Mock F4000 - SystemTemporarilyUnavailable Mock a response from the Amazon System that returns an F400 Error as SystemTemporarilyUnavailable. Your system should handle this response correctly, you should retry this transaction once between 30 seconds - 120 seconds after the initial F400 was returned. If you receive a second SystemTemporarilyUnavailable you should send a CancelGiftCard request. If you receive another error, you should notify Amazon using the Outage Management page. Non-Urgent Process.
10 Mock F5000 - GeneralError Mock a response from the Amazon System that returns an F500 Error as GeneralError. Your system should handle this response correctly, this should also raise an alert that Amazon is having system issues. You should reach out to Amazon using the Outage Management page. Urgent Process.

↑ Back to top


Next


Last updated: Sep 17, 2021