> For the complete documentation index, see [llms.txt](https://fermi-dex.gitbook.io/fermi-dex-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fermi-dex.gitbook.io/fermi-dex-docs/technical-overview/testing-locally.md).

# Testing Locally

## Core Orderbook Functionality

To test out the full functionality of Fermi DEX, you can simply follow the following steps. Below, we deep dive into each test and the steps it demonstrates.&#x20;

First, in a separate terminal, run the solana local validator:\
`solana local validator`

Next, in another terminal, enable logs. This is not mandatory but would better allow you to see the execution steps of different tests in real time.

`solana logs`

Finally, clone the repo and run the tests!

```
git clone https://github.com/cryptohariseldon/Fermi-orderbook/
yarn
anchor build
anchor test --skip-local validator
```

This executes 5 tests, providing broad coverage of all the essential functionalities in the lifecycle of a trade. In particular, you can see that the trade creation, and trade finalisation proceeds successfully by monitoring logs on the local validator, and/or checking values of the OpenOrdersPDA for each user involved, before and after finalisation.\ <br>

<figure><img src="/files/bYLXLXp1mIGAQxqqJKx2" alt=""><figcaption></figcaption></figure>

## UI Integration

To run your own version of the Fermi DEX UI, follow the following steps:\
First, clone the repo: <https://github.com/adarshzpatel/fermi-frontend>

First, run the development server: &#x20;

`npm run dev or yarn run dev`

Open [http://localhost:3000](http://localhost:3000/) with your browser to see the result.

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on <http://localhost:3000/api/hello>. This endpoint can be edited in `pages/api/hello.ts`

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

&#x20;
