# Running Unit Tests

Before deploying your Artinals modules or integrating them into a larger project, it’s essential to thoroughly test and verify their behavior. Rigorous testing helps catch logical errors, ensure compatibility across modules (ART20, SALE, and TRADE), and maintain the confidence of creators, traders, and collectors using your system. This section covers how to run unit tests, common issues you may encounter, and strategies for debugging using the built-in debug events.

### Running Unit Tests

**Command**:

```bash
sui move test
```

This command runs all unit tests defined in your Move modules. Properly designed test cases cover a wide range of scenarios, from minting and transferring NFTs to executing trades and managing deny lists. As you develop, continually run these tests to catch regressions early.

**Best Practices**:

* **Comprehensive Coverage**: Write tests that exercise core functionalities (minting, transferring, burning), edge cases (max supply reached, deny list full), and integration points (purchasing from SALE then trading on TRADE).
* **Modular Tests**: Keep ART20, SALE, and TRADE tests organized. For example, start with ART20 tests to ensure NFT logic is sound before adding SALE and TRADE scenarios.
* **Automate Testing**: Integrate tests into a continuous integration (CI) pipeline. Every code update should trigger `sui move test` to guarantee ongoing code quality.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.artinals.com/artinals-protocol/testing-and-troubleshooting/running-unit-tests.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
