> For the complete documentation index, see [llms.txt](https://docs.dnscontrol.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dnscontrol.org/developer-info/test-a-branch.md).

# Test a branch

Instructions for testing DNSControl at a particular PR or branch.

Assumptions:

* `/THE/PATH` -- Change this to the full path to where your dnsconfig.js and other files are located.
* `INSERT_BRANCH_HERE` -- The branch you want to test. The branch associated with a PR is listed on <https://github.com/DNSControl/dnscontrol/branches>.

### Using Docker

Using Docker assures you're using the latest version of Go and doesn't require you to install anything on your machine, other than Docker!

```shell
docker run -it -v /THE/PATH:/dns golang
git clone -b INSERT_BRANCH_HERE --single-branch https://github.com/DNSControl/dnscontrol.git
cd dnscontrol
go install
```

```shell
cd /dns
dnscontrol preview
```

If you want to run the integration tests, follow the [Integration Tests](/developer-info/integration-tests.md) document as usual. The directory to be in is `/go/dnscontrol/integrationTest`.

```shell
cd /go/dnscontrol/integrationTest
go test -v -args -verbose -profile INSERT_PROVIDER_NAME -start 1 -end 3
```

Change `INSERT_PROVIDER_NAME` to the name of your provider (`BIND`, `ROUTE53`, `GCLOUD`, etc.)

### Not using Docker

Step 1: Install Go

<https://go.dev/dl/>

Step 2: Check out the software

```shell
git clone -b INSERT_BRANCH_HERE --single-branch https://github.com/DNSControl/dnscontrol.git
cd dnscontrol
go install
```

```shell
cd /THE/PATH
dnscontrol preview
```

Step 3: Clean up

`go install` put the `dnscontrol` program in your `$HOME/bin` directory. You probably want to remove it.

```shell
rm -i $HOME/bin/dnscontrol
```


---

# 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:

```
GET https://docs.dnscontrol.org/developer-info/test-a-branch.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.
