Integration tests are written in Tcl, a high-level, general-purpose, interpreted, dynamic programming language [[source](https://wiki.tcl-lang.org/page/What+is+Tcl)].
`runtest` is the main entrance point for running integration tests.
For example, to run a single test;
```shell
./runtest --single unit/your_test_name
# For additional arguments, you may refer to the `runtest` script itself.
Running with TLS requires the following preparations:
* Build Valkey is TLS support, e.g. using `make BUILD_TLS=yes`, or `make BUILD_TLS=module`.
* Run `./utils/gen-test-certs.sh` to generate a root CA and a server certificate.
* Install TLS support for TCL, e.g. the `tcl-tls` package on Debian/Ubuntu.
Additional tests
----------------
Not all tests are included in the `./runtest` scripts. Some additional entry points are provided by the following scripts, which support a subset of the options listed above:
*`./runtest-cluster` runs more extensive tests for Valkey Cluster.
Some cluster tests are included in `./runtest`, but not all.
*`./runtest-sentinel` runs tests of Valkey Sentinel.
*`./runtests-module` runs tests of the module API.
You can set a breakpoint and invoke a minimal debugger using the `bp` function.
```
... your test code before break-point
bp 1
... your test code after break-point
```
The `bp 1` will give back the tcl interpreter to the developer, and allow you to interactively print local variables (through `puts`), run functions and so forth [[source](https://wiki.tcl-lang.org/page/A+minimal+debugger)].
`bp` takes a single argument, which is `1` for the case above, and is used to label a breakpoint with a string.
Labels are printed out when breakpoints are hit, so you can identify which breakpoint was triggered.
Breakpoints can be skipped by setting the global variable `::bp_skip`, and by providing the labels you want to skip.
The minimal debugger comes with the following predefined functions.