Test plan

To support your Shippo integration, we recommend developing a test plan. A test plan is a roadmap for testing how different parts of your application works with an integration. Use the test scenarios below as a framework to build your test plan.

Testing setup

Different integration types will be best structured as follows:

  • White Label
    • Two accounts should be established, one for production and one for testing. These are both best setup as accounts where many users can access the email such as an alias. This prevents problems with staff transitions and password resets. Individuals or teams can also use their own accounts as needed.
  • White Label Platform
    • A top level account will be set up and established as the parent account. This account is not generally used for rating and label generation but is the structure for tenant accounts. Tennant accounts should be used for testing and development purposes as this level is where production labels will be managed.
  • Gray Label
    • Because gray label integrations rely on Oauth for tracking and attribution there is no need for a strict account structure. Every account will be stand alone and linked to an integration by the Oauth registration process. It is best that testing for production purposes is performed by registering through Ouath just as a customer would. Please Note: Testing through Oauth will require a valid credit card for registration.

Testing scenarios

Below are examples of scenarios to consider when establishing a testing plan. Use this guide to test a new carrier integration. Based on Shippo's experience with API integrations, these are the minimum tests your integration must pass before deploying for production.

Not all tests will apply to the carrier or integration you are testing, review the test scripts and determine which ones apply to your business.

If you are preparing to release into production with this carrier, run these test scripts using a production account. Remember to void any labels created during testing to avoid being billed for them. For pre-production testing it is best to use the test mode API token to avoid being charged for shipments.

You will need the following:

  • Carrier Account Information or an activated Shippo carrier account
  • A list of all service levels you are supporting for the carrier.
  • Required shipping fields: a valid from address, a valid to address, parcel dimensions.
    • You will need to account for domestic and international addresses when applicable
  • An understanding of the capabilities integrated for the carrier. For example, not all carriers support manifests or custom’s functionality.

Suggested Tests

Validate an Address

Note

Address validation will not work with your test API token. You must use your live API token.

Test the ability to: Expected Result Test Result Notes/Saved ID
Validate a known valid address You should receive a positive response indicating the address is valid
Validate a known invalid address You should receive a negative response indicating the address is not valid

Add A Carrier

Test the ability to: Expected Result Test Result Notes/Saved ID
Add the carrier using the API You should receive a positive response indicating the carrier is added
Add the carrier to a Merchant account for the Platform API You should receive a positive response indicating the carrier is added

Get A List of Carriers

Test the ability to: Expected Result Test Result Notes/Saved ID
Retrieve a list of carriers for the Shippo account the new carrier was added to You should receive a positive response listing all the carriers for that account

Get A Rate

Test the ability to: Expected Result Test Result Notes/Saved ID
Get a rate for the carrier domestically without specifying a service level You should receive a positive response with rates for all the service levels appropriate to the carrier.
Get a rate for the carrier internationally without specifying a service level You should receive a positive response with rates for all the service levels appropriate to the carrier.
Get a rate for the carrier domestically with bad To address information You should receive a response with an error indicating the address failure
Get a rate for the carrier domestically with bad From address information You should receive a response with an error indicating the address failure

Purchase Label from Existing Rate

Test the ability to: Expected Result Test Result Notes/Saved ID
Purchase a label for the carrier domestically using the Rate Id from a previous test. You should receive a positive response with the label purchased. * save this label id for later use** save this label’s tracking number for later use
Purchase a label for the carrier internationally using the Rate Id from previous test You should receive a positive response with the label purchased.
Take care to note the proper customs information is returned in the response. * save this label id for later use
** save this label’s tracking number for later use

Purchase a Label in One Step

Test the ability to: Expected Result Test Result Notes/Saved ID
Purchase a label for the carrier domestically You should receive a positive response with the appropriate label. *save this label id for future use
Purchase a label for the carrier internationally You should receive a positive response with the appropriate label. *save this label id for future use
Purchase a label for the carrier domestically with bad To address information You should receive a response with an error indicating the address failure
Purchase a label for the carrier domestically with bad From address information You should receive a response with an error indicating the address failure

Refund a Label

Test the ability to: Expected Result Test Result Notes/Saved ID
Refund a label for the carrier domestically using the Label ID from a previous step. You should receive a positive response indicating the label has been canceled and refined.

Track a Label

Note

Tracking will not work with your test API token. You must use your live API token.

Test the ability to: Expected Result Test Result Notes/Saved ID
Track a label for the carrier domestically using the Rate Id from a previous test. You should receive a positive response with the tracking information.
Track a label for the carrier internationally using the Rate Id from a previous test. You should receive a positive response with the tracking information.

Schedule a Pickup

Test the ability to: Expected Result Test Result Notes/Saved ID
Schedule a pickup using a Label Id from a previous step. You should receive a positive response with the scheduled pickup information.
Because there is no programmatic way to cancel a pickup in the API if this is done in production, follow the carrier's directions to cancel.
Track a label for the carrier internationally using the Rate Id from a previous test. You should receive a positive response with the tracking information.

Manage Batch Shipping

Test the ability to: Expected Result Test Result Notes/Saved ID
Create a batch. You should receive a positive response with the batch information. Save the Batch Id for later use.
Retrieve a batch. You should receive a positive response with the batch information.
Add a shipment to a batch using the shipment id from a previous step. Perform this twice so the batch has more than one shipment. You should receive a positive response with the shipment added to the batch.
Remove a shipment from a batch using a shipment from the previous step You should receive a positive response with the shipment removed from the batch.
Purchase a batch. You should receive a positive response with the batch purchase information.

Test Carrier Service Levels

Test Result Test Result Notes/Saved ID
Create a rate for each service level that will be used for this carrier. Repeat as many times as necessary to test all service levels. You should receive a positive response with the shipment for each service level.

Create a Manifest

Test Result Test Result Notes/Saved ID
Create a manifest. You should receive a positive response with the manifest information.

Create a Webhook

Test Result Test Result Notes/Saved ID
Create a webhook for tracking a shipment. You should receive a positive response with the webhook created and updates to tracked packages.
Cancel a label from a previous shipment. Your webhook should receive the update that the shipment is canceled.
Note

If you are testing in production, remember to cancel any labels that were purchased to avoid being charged.