postalref

Test Environment for Mailers

The Test Environment for Mailers, TEM, is a USPS test platform where mailers test their ability to submit electronic mailing information, such as Full-Service mailings. Mailers get their software approved in TEM before they move to production. Mailer Customer Acceptance Testing is a separate test environment for USPS Ship and USPS API users.

Updated October 31, 202622 sources

What it is

TEM is one of two environments USPS supports for mailing data, a test environment and a production environment. The production environment is for customers USPS has approved in TEM. TEM runs its own PostalOne! system, apart from the production PostalOne! system.

Mailers test eDoc, electronic documentation, in TEM. A mail owner or a mail service provider validates a Full-Service test mailing by submitting a single file. Vendors pass the test scenarios for each mail class their software handles, plus optional scenarios for other services.

Mailers using approved software are not required to test in TEM. They may still choose to test there. Traditional TEM certification can take weeks, and USPS offers a streamlined process to users of TEM-certified software.

TEM also prepares customers to use Mail.XML for these tasks:

  • Submit qualification reports.
  • Submit postage statements.
  • Make appointments with Facility Access and Shipment Tracking.
  • Request and receive Intelligent Mail information.

A preproduction environment opens typically one month before a release reaches TEM and production, with its own client download. Shipping Services has its own TEM, for customers testing files to certify files and labels or to upgrade file versions. There, customers use the same Mailer ID and login ID as in production.

How it works

Testing in TEM starts in the Business Customer Gateway, where every tester must be registered. The tester then submits a mailing and reads back the postage statement and reports TEM makes from it.

Testing a Full-Service mailing in TEM.

  1. Register in the Business Customer Gateway.
  2. Request the Manage Mailing Activity service.
  3. Once approved, log on and open Go to TEM under Electronic Data Exchange.
  4. Work with the PostalOne! Help Desk to validate the files and software and run the minimum test criteria.
  5. Submit the electronic mailing information to TEM.
  6. View the electronic postage statement and qualification reports in the test system.
  7. Compare the postage statement and qualification report with the Mail.XML file submitted.

Mail.dat files reach TEM by one of two transfer methods, manual or unattended batch. The PostalOne! Mail.dat Client has separate versions for TEM and production. The letters after the version number in its title bar show which environment it is talking to.

TEM using Mail.XML

TEM using Mail.XML serves Full-Service mailers who submit eDoc in Mail.XML. Mail.XML is an XML-based specification for web services. TEM's optional scenarios include pull and push subscription tests through Mail.XML messages for Full-Service data.

A mailer testing the Mail.XML pull and push methods prepares before entering production. It develops or buys Mail.XML software, and gets a signed certificate from a Certification Authority for the push method. It also gets USPS's schemata, the Web Services Description Language, WSDL, and the XML schema documents and templates, XSD.

The WSDL files are in Electronic Data Exchange, reached from Mailing Services on the Business Customer Gateway home page.

Mailer Customer Acceptance Testing

Mailer Customer Acceptance Testing, MCAT, is a USPS test environment where USPS Ship and USPS API users validate new and upcoming functionality before production. It tests structural, functional and integration updates without affecting live operations. MCAT deploys together with CAT, the Customer Acceptance Test environment, to keep USPS Ship, the USPS APIs and IV-MTR aligned.

MCAT does not support operational data such as scans, verifications, disputes and refunds. It does not support performance or load testing either. Load testing happens in TEM, by a service request through Email Us.

A user needs a CAT business account, either one it has or a new one from COP (CAT), the Customer Onboarding Portal.

Starting to mail in MCAT through USPS Ship.

  1. Create a USPS business account in the COP (CAT).
  2. Set up a payment account in the Enterprise Payment System.
  3. Verify USPS Ship enrollment for outbound and returns under Manage Locations.
  4. Enroll in data feeds.
  5. Upload a manifest in Parcel Data Exchange, choosing Test Environment for Mailers.
  6. View transaction data in EPS reports, USPS Ship Reports and IV-MTR data feeds.

API users validate their USPS API integrations in MCAT before moving to production. Some MCAT APIs need a service request through Email Us before a user can call them. All USPS APIs in MCAT share the base URL apis-cat.usps.com.

An API user creates an application on My Apps with the COP (CAT) account. The app generates a Consumer Key and a Consumer Secret. Every API call needs an OAuth token generated from them. Labels also need a payment authorization token.

The Labels API works in MCAT as it does in production. MCAT puts a watermark on every label image, and charges no postage to the mailer's live payment account.

Technical Specifications

Rules

Mailers must work with the PostalOne! Help Desk to start the approval process for their software, and must be approved in the TEM environment prior to sending data transactions in the Production environment.

A mailer must start its software approval with the PostalOne! Help Desk. It must pass approval in TEM before it sends data to production.

Mailers must successfully complete testing Mail.dat in the Test Environment for Mailers (TEM), before files can be submitted in the Production Environment.

A mailer using Mail.dat must finish testing in TEM before it can submit files in production.

Customers wanting to test any of the electronic documentation (eDoc) methods, FAST, or Data Distribution in TEM must be registered in the Business Customer Gateway.

A customer must be registered in the Business Customer Gateway before it tests eDoc, FAST or Data Distribution in TEM.

When programming to create Mail.XML software, developers must use USPS-provided Web Services Description Language (WSDL) and XML schema document and templates (XSD).

A developer writing Mail.XML software must build it on the WSDL and XSD files USPS provides.

To access USPS Ship and USPS API services within MCAT, you must have either an existing CAT Business Account or create a new one through the Customer Onboarding Portal (CAT).

A USPS Ship or USPS API user must have a CAT business account to use MCAT. It can use one it already has or create one in COP (CAT).

Credentials are environment‑specific: Production/TEM credentials are not supported in MCAT, and MCAT credentials cannot be used in Production/TEM.

Production and TEM credentials cannot be used in MCAT. MCAT credentials cannot be used in production or TEM.

A token generated in MCAT cannot be used to call APIs in Production or in other environments.

An OAuth token made in MCAT cannot call APIs in production or in any other environment.

Mailers new to eDoc, Full-Service, FAST Mail.XML, and Data Distribution are advised to test in TEM.

USPS advises a mailer new to eDoc, Full-Service, FAST Mail.XML or Data Distribution to test in TEM.

What goes wrong

A computer can run several versions of the PostalOne! Mail.dat Client, one for each environment. USPS warns that care should be taken to process production jobs in the production environment.

WSDLs and XSDs are revised, replaced or made obsolete as the Mail.XML specifications develop. USPS asks developers to take care to use the correct WSDLs.

A tester reporting a problem with a Mail.XML test supplies the job ID it submitted. In MCAT, an OAuth request that returns any status other than 200 has failed. A token lasts 8 hours, so the user refreshes it as its lifespan requires. Paying for a label takes the PAYER and LABEL_OWNER roles.

Terms

Test Environment for MailersTEM, Testing Environment for Mailers, TEM (Testing Environment for Mailers)
The Test Environment for mailers (TEM) is a test platform designed to allow mailers to test their ability to submit electronic mailing information such as Full Service (FS) mailings to the Postal Service.
Production EnvironmentPROD, Production
This environment will be used by all customers that have been approved in the TEM environment by the USPS to start sending the transaction/messages.
Preproduction Environment
This environment will contain pre-release software and is intended for mailer testing software development testing with production data.
Product Tracking and Reporting Testing Environment for MailersPTR TEM
The Postal Service offers a Test Environment for Mailers (TEM) to support new and existing USPS customers who require testing of their electronic files as part of the file/label certification process or upgrading to new file versions for Shipping Services.
PostalOne!PostalOne! system
the information management system that provides an electronic linkage between a customer’s mailing information and the Postal Service’s business mail acceptance and induction processes. It produces postage statements and supporting documentation.
Mail.xml
Mail.XML is an XML-based DTAC specification for web services.
Mail.dat
Mail.dat is an industry-defined database structure consisting of files linked by key fields.
Web Services Description LanguageWSDL, Web Service Description Languages
WSDL (Web Services Description Language) is an XML-based language for describing Web services and how to access them.
XML Schema DefinitionXSD, XML schema document and templates
the USPS-provided schemata i.e., Web Services Description Language (WSDL) and XML schema document and templates (XSD) used to ensure conformity and standardization of data exchange between the PostalOne! system and customers.
PostalOne! System Help DeskPostalOne! Help Desk
to assist customers who may have questions or need assistance with a problem or technical issue with the PostalOne! System.
Mailer Customer Acceptance TestingMCAT
The objective of the Mailer Customer Acceptance Testing (MCAT) environment is to provide USPS Ship and USPS API users with a capability to validate new and upcoming functionality prior to production.

Contacts

Questions about TEM go to 1-800-522-9085 or postalone@usps.gov. The PostalOne! Help Desk works Monday through Friday, 8:00 a.m. to 5:00 p.m. CST, by email or telephone. For issues with a Mail.XML test, the Mailing & Shipping Solutions Center answers at 877-6720007.

Sources