> For the complete documentation index, see [llms.txt](https://docs.liquidapps.io/liquidapps-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.liquidapps.io/liquidapps-documentation/working-with-zeus-sdk/zeus-basics/basic-eosio-contract/contract-unit-test.md).

# Contract/Unit Test

To test a basic EOSIO contract without DAPP Network services, run the following:

This will create your new working directory, create your `zeus-box.json` (`package.json`), install the necessary `zeus_boxes` (`node_modules`) dependencies, create the example contract and unit test, compile the contract, start the local environment, and run the example unit tests.

{% tabs %}
{% tab title="Contract" %}

```bash
# create dir
mkdir eosio-contract; cd eosio-contract
# create zeus-box.json/package.json default
zeus box create
# unbox unit testing associated boxes
zeus unbox seed-tests
# create your own contract
zeus create contract mycontract --template=simplecontract # if using an old cdt --legacy-cdt
# compile
zeus compile mycontract # if using an old cdt --legacy-cdt
# start local env and test
zeus test mycontract
```

{% endtab %}

{% tab title="Options" %}

```bash
zeus create contract <contractname>

generates an empty contract

Options:
  --version       Show version number                                  [boolean]
  --storage-path  path for persistent storage    [default: "/home/ubuntu/.zeus"]
  --rc-file       use rc file to load options from
                                     [default: "/home/ubuntu/.zeus/zeusrc.json"]
  --rc-ignore     ignore rc file                                [default: false]
  --verbose, -v                                                 [default: false]
  -h, --help      Show help                                            [boolean]
  --chain                                                       [default: "eos"]
  --language                                                    [default: "cpp"]
  --template                                          [default: "emptycontract"]
  --legacy-cdt    unbox cmake files using cdt version < 3.0.0   [default: false]

Examples:
  zeus create contract testcontract --chain=eos --language=cpp
  --template=emptycontract
```

{% endtab %}
{% endtabs %}

Files created:

* `./contracts/eos/mycontract/mycontract.cpp`  basic of basic contracts with a simple action
* `./test/mycontract.spec.js` basic unit test


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.liquidapps.io/liquidapps-documentation/working-with-zeus-sdk/zeus-basics/basic-eosio-contract/contract-unit-test.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
