Here I am documenting how to run the functional tests for status go. There are not the primary focus of the status-go-codex integration, but they let us to understand the dev env and the build system better in general. I am first presenting the step-by-step instructions to run everything manually from the command line, but because it is quite a lot of details, you may skip ahead to [[#Using development scripts to run the functional tests]] and study the scripts if you want to learn the details.
> I performed all those tests on Arch Linux ([Omarchy](https://omarchy.org/) distribution).
### Step by step instructions to run functional tests manually without a script
Then make sure the dependencies are in place - you do not need to do this if you did it already and you did not introduce any new python dependencies - it does not harm to do though and it runs instantly:
Notice, that if you have some simple test that does not need status go container, you can just run something like`pytest -k test_logging`.
### Using development scripts to run the functional tests
To keep things easy and clean, it is easier to use a script. For development I created simplified, more robust version of the original script in `_assets/scripts/run_functional_tests.sh`. First, to get the tests run faster I extracted building of the status-go image into `_assets/scripts/build_status_go_docker.sh`
```bash
$ _assets/scripts/build_status_go_docker.sh
```
> The scripts should be run from the top level directory so that the right docker files are used.
Then I removed the coverage data (not so important in the development), and included explicit waiting for the docker services before running the tests. This way, it is easier to see which tests actually need a "rerun" and which just failed because docker services were not ready yet (which is very much observable with the original script). The name of the new script is `_assets/scripts/run_functional_tests_dev.sh`. The new script takes one optional parameter. This can be either:
- module name
-`Test` class name
-`Test` function name
- and *parameterized*`Test`.
You can easily find those name by looking at the typical Phyton test file:
```python
# File: test_wakuext_messages_transactions.py ← Module Name
import pytest
class TestTransactionsChatMessages: # ← Test Class Name
You can target each of those tests by calling and giving as argument:
> I am skipping the prefix in the examples below. The scripts should be run from the top level directory, e.g.: `./_assets/scripts/run_functional_tests_dev.sh ...`
When running the script without any arguments, you will be warned that all tests will be run, showing you the expected number of tests and also here you will have an option to stop:
```bash
❯ ./_assets/scripts/run_functional_tests_dev.sh
Using existing virtual environment
Installing dependencies
Discovering tests to be run...
No test pattern provided. This will run all 272 tests!