Test Suite for Integrators

Contents

In order to help testing the services implemented by the carriers, Mercado Envíos developed a tool for running tests during early stages of development.

This tool executes a set of tests which reproduces the different scenarios that ussualy take place in production environment and allows minimizing errors, maximizing quality of the final product and reducing development times.

As it is implemented on Docker, it can be easily executed by the carrier in any environment during any stage of development.

Docker Installation

Mercado Envíos test suite relies on Docker to be executed. Docker can be installed from:


Note:
If you have Windows or Mac OS, we recommend using the last verions of each operating system (Windows 10 and Mac OS High Sierra) to run Docker natively and avoid using hipervisors or virtualization software like VirtualBox.

Running the Test App

Once Docker is installed, you can download and execute the Testing App by running the following command:

docker run -d --name cit -p 8090:8090 -p 8091:8091 mercadolibre/carrier-integration-tests
Nota:
If you have Mac M1 use the following command:
docker run -d --name cit -p 8090:8090 -p 8091:8091 mercadolibre/carrier-integration-tests:latest-m1

When accessing to localhost:8090 you will see as follows:

All variables can be completed in the UI, but there is also the possibility to complete them by command:

docker run -d --name cit -p 8090:8090 -p 8091:8091 -e SITE_ID=MLA -e SERVICE_ID=1024 -e SERVICE_NAME=examplecarrier mercadolibre/carrier-integration-tests
VariableDescription
SITE_IDMLA for Argentina, MLB for Brazil, MLC for Chile, MCO for Colombia, MLM for México y MLU for Uruguay
SERVICE_IDNumeric value provided by Mercado Libre for each service
SERVICE_NAMEThe name of the service, usually the company name

Other variables:

VariableDescription
CARRIER_CLIENT_IDIdentify Mercado Libre as the client
CARRIER_CONTRACTIdentify the contract for each service
CARRIER_ACCOUNTSimilar to contract, identify different accounts of Mercado Libre
CARRIER_USERUser for Mercado Libre
CARRIER_PASSWORDPassword for Mercado Libre
SERVICE_LOGISTICRepresents the operation type of the shipment. valid values are: drop_off, cross_docking o fulfillment.

After executing the application, you can verify its status by running the following command:

docker ps -a

Once the system is running, it could be accessed from any browser at: localhost:8090

Run the following command to stop the application:

docker stop cit

To run it again:

docker start cit

Updating the Test App

In order to update the application, the previous container must be removed before donwloading the new image. The following commands show how to do that:

docker stop cit docker rm cit docker pull mercadolibre/carrier-integration-tests:latest docker run -d --name cit -p 8090:8090 -p 8091:8091 -e SITE_ID=MLA -e SERVICE_ID=1024 -e SERVICE_NAME=examplecarrier mercadolibre/carrier-integration-tests
Note:
Periodic update of the application is recommended to always get the latest version.

Example

The following video shows how to install docker and run the application from Linux: