# Testing integration with external services

Integration tests are very important because **the application communicates with many external systems** e.g. CRM or payment systems. If the integration does not work properly, it results in business errors, data loss, or incorrect operation of the entire process.

## Integration testing methods

### Mocks

* are simulations of responses from external systems,
* the ability to test different response scenarios,
* tests can be independent of service availability.

### Input data tests

* validation of the correctness of the sent requests (e.g. JSON, XML structure).

### Output data tests

* checking whether the system correctly processes data returned from outside,
* error and exception handling.

### Unit tests in scripts

Learn more: [Script unit tests](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/scriptcode/testy-jednostkowe-skryptow).
