<commit_before>
# How do you run Navitia's tests suite:

## Requirements
 * You have already setup your environment and built Navitia following the [installation documentation](https://github.com/canaltp/navitia/blob/dev/install.rst).

## How to run the tests

From the your build directory, run the command:

```sh
# make test
```

This will trigger all unit and integration tests for the different modules (c++ and python).


## What's happening during a `make test`

To understand what's going on under the hood, enable cmake's verbose output:

```sh
# VERBOSE=1 make test
```

The first few lines should tell you that `ctest` is being invoked

```sh
Running tests...
/usr/bin/ctest --force-new-ctest-process
Test project /home/user/build/navitia/release
      Start  1: utils_test
```

This means that `make test` is an alias to `ctest`.


## How to run an individual test ?

`ctest` has some interesting options:
 * `-V` to enable verbose output
 * `-N` to disable the actual tests execution
 * `-R <regex>` to only run tests matching the regex

To get the actual command line used for `jormungandr_serpy` test for instance, you can run:

```sh
# ctest -V -N -R serpy$<commit_msg>Fix documentation<commit_after>
# How do you run Navitia's tests suite:

## Requirements
 * You have already setup your environment and built Navitia following the [installation documentation](https://github.com/canaltp/navitia/blob/dev/install.rst).

## How to run the tests

From the your build directory, run the command:

```sh
$ make test
```

This will trigger all unit and integration tests for the different modules (c++ and python).


## What's happening during a `make test`

To understand what's going on under the hood, enable cmake's verbose output:

```sh
$ VERBOSE=1 make test
```

The first few lines should tell you that `ctest` is being invoked

```sh
Running tests...
/usr/bin/ctest --force-new-ctest-process
Test project /home/user/build/navitia/release
      Start  1: utils_test
```

This means that `make test` is an alias to `ctest`.


## How to run an individual test ?

`ctest` has some interesting options:
 * `-V` to enable verbose output
 * `-N` to disable the actual tests execution
 * `-R <regex>` to only run tests matching the regex

To get the actual command line used for `jormungandr_serpy` test for instance, you can run:

```sh
$ ctest -V -N -R serpy$
{'fraction_non_alphanumeric': 0.10025273799494525, 'fraction_numerical': 0.0016849199663016006, 'mean_word_length': 3.9686192468619246, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5358766', 'n_tokens_mistral': 742, 'n_tokens_neox': 707, 'n_words': 322}