FedEx Test Environment and Virtualized Responses
On October 16, 2023 FedEx announced that they would no longer have a proper test environment. Instead they would "virtualize" the test API. This means that their test API will only respond with static pre-defined requests and respond with canned responses. It is essentially a unit test over the wire. Unfortunately, this doesn't allow you to test your application and business logic. You wont be able to test if your request would trigger an error in the production API since the entire test environment is fake/mocked. You cannot create a test from your application unless you carefully hand-craft the data elements to match their test.
Because of this, we recommend moving to FedEx's production environment as soon as possible and test in the production environment. To that end we have created some software that will run through all the FedEx mocked test requests to help you pass their API Certification process.
Simply run ./RocketShipIt -certify
and provide your credentials to run all the tests. The test request/responses will be output to local files for your review and potential submittal to FedEx.
As it is running it will output the tests it is doing with progress:
...
(47/326) wrote: out/International---US-CA-DROPOFF_AT_FEDEX_LOCATION-INTERNATIONAL_ECONOMY_FREIGHT-YOUR_PACKAGING---THIRD_PARTY-LABEL-PAPER_85X11_TOP_HALF_LABEL
.txt
(48/326) wrote: out/International---US-ES-DROPOFF_AT_FEDEX_LOCATION-INTERNATIONAL_ECONOMY-FEDEX_PAK-ELECTRONIC_TRADE_DOCUMENTS--SENDER-LABEL-PAPER_4X6
.txt
(49/326) wrote: out/International---US-CA-DROPOFF_AT_FEDEX_LOCATION-INTERNATIONAL_ECONOMY-YOUR_PACKAGING---SENDER-LABEL-PAPER_7X475
.txt
(50/326) wrote: out/International---US-CA-USE_SCHEDULED_PICKUP-INTERNATIONAL_PRIORITY-YOUR_PACKAGING---SENDER-LABEL-PAPER_85X11_TOP_HALF_LABEL
.txt
(51/326) wrote: out/International---US-KE-USE_SCHEDULED_PICKUP-FEDEX_INTERNATIONAL_PRIORITY-YOUR_PACKAGING---SENDER-LABEL-STOCK_4X6
.txt
(52/326) wrote: out/International---Negative-US-CN-USE_SCHEDULED_PICKUP-FEDEX_INTERNATIONAL_PRIORITY-YOUR_PACKAGING---SENDER-LABEL-STOCK_4X6
.txt
(53/326) wrote: out/International---Negative-US-MY-USE_SCHEDULED_PICKUP-FEDEX_INTERNATIONAL_PRIORITY-YOUR_PACKAGING---SENDER-LABEL-STOCK_4X6
...
Each test will be ran with a one second delay to avoid throttling that might occur.
Test files created from the tests containing the request/responses will be in the out
folder where you ran the command.
You will only need to submit a hand full of these. You don't need to give them all test cases.
If you mention you are using a thermal printer they will require you to print them out physically and scan them in with a flat-bed scanner (who has one of these anymore?). If you say laser printer you just need to provide the PDFs.
Note as of (Dec. 21 2023): Their certification process requires you to create up-to-date labels with a recent shipDatestamp but you can't since their test API returns static labels from Aug 2023. The labels returned from test will have an old date. Their certification department didn't get the October 16th announcement. Please remind them when you submit for certification.
Note as of (3/11/2024): FedEx has added some options that may help with certification and RocketShipIt specifically.
Additional -certify options
- List out all possible tests that can be ran:
-certify -certify-list
- Run a single test:
-certify -certify-test="Intra-CA---CA-CA-DROPOFF_AT_FEDEX_LOCATION-STANDARD_OVERNIGHT-YOUR_PACKAGING---SENDER-LABEL-PAPER_4X6"