# sitetest: Run site tests using an isolated test schema

Source: https://zotonic.com/docs/3035/sitetest-run-site-tests-using-an-isolated-test-schema

URI: https://zotonic.com/id/3035

Language: en

Run site tests using an isolated test schema.

Syntax
------

```text
bin/zotonic sitetest <site_name>
```

Requirements and effects
------------------------

Requires a running node and a disposable testing environment; interrupts the selected site.

The runner stops the site, overrides its schema to `z_sitetest`, drops that schema, starts the site, and runs discovered `*_sitetest` EUnit modules. It then removes the override and restarts with the normal schema. Do not run concurrent tests sharing that database schema. Inspect failures and restoration of normal state.

Example
-------

```sh
bin/zotonic sitetest garden
```

Run commands from the Zotonic workspace root. Replace `garden` with your site name where applicable.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/3035?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/3035?language=en>)
