# Testing Overview

In this section we are going to share some of the multiple tests that have been done in order to check that XdYe Smart Contracts are operating correctly.&#x20;

This way we can see how a Smart Contract can be tested through different functions and scripts.

Testing environment we have created for testing all XdYe structure is based on:

* Terminal containing Ganache-cli

```
> ganache-cli
```

* Terminal on project root for deploying Smart Contracts

```
> truffle migrate --reset
```

* Terminal on project root for running scripts for testing purposes

```
> node testingFileFromXdYe.js
```

Here we can see the environment:

* **Orange:** Ganache-CLI
* **Black:** Smart Contract Deployment
* **Purple:** Script Execution

<figure><img src="https://1716109615-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaLpsXqP00Znm3KwSX02Z%2Fuploads%2FYtp4mrhChErvH1IBnsyL%2FCaptura%20de%20pantalla%202022-08-31%20a%20las%2014.51.45.png?alt=media&#x26;token=91579e57-5d26-4d4b-a41d-16872fa66822" alt=""><figcaption><p>XdYe Local Testing Environment. </p></figcaption></figure>

{% hint style="info" %}
**Good To Know:** There is an extra terminal, which is used for running the front-end we are working at.&#x20;

For assuring everything works as desired we have developed a lot of tests and code variations, we have submitted those that are easy to understand. Avoiding complex testing.
{% endhint %}

Check out each testing we have done in order to test main functionalities for each contract:

{% content-ref url="factory-test" %}
[factory-test](https://rogercapone.gitbook.io/xdye-documentation/testing-smart-contracts/factory-test)
{% endcontent-ref %}

{% content-ref url="weth-test" %}
[weth-test](https://rogercapone.gitbook.io/xdye-documentation/testing-smart-contracts/weth-test)
{% endcontent-ref %}

{% content-ref url="router-test" %}
[router-test](https://rogercapone.gitbook.io/xdye-documentation/testing-smart-contracts/router-test)
{% endcontent-ref %}

{% content-ref url="xdye-token-test" %}
[xdye-token-test](https://rogercapone.gitbook.io/xdye-documentation/testing-smart-contracts/xdye-token-test)
{% endcontent-ref %}

{% content-ref url="masterchef-test" %}
[masterchef-test](https://rogercapone.gitbook.io/xdye-documentation/testing-smart-contracts/masterchef-test)
{% endcontent-ref %}

{% content-ref url="xdye-bar-test" %}
[xdye-bar-test](https://rogercapone.gitbook.io/xdye-documentation/testing-smart-contracts/xdye-bar-test)
{% endcontent-ref %}

{% content-ref url="xdye-maker-test" %}
[xdye-maker-test](https://rogercapone.gitbook.io/xdye-documentation/testing-smart-contracts/xdye-maker-test)
{% endcontent-ref %}

{% content-ref url="xdye-unlock-test" %}
[xdye-unlock-test](https://rogercapone.gitbook.io/xdye-documentation/testing-smart-contracts/xdye-unlock-test)
{% endcontent-ref %}

If you are interested on executing a test that checks all functionalities be sure to check out:

{% content-ref url="final-test" %}
[final-test](https://rogercapone.gitbook.io/xdye-documentation/testing-smart-contracts/final-test)
{% endcontent-ref %}
