<commit_before>Extension test module
=====================

This module is a valid Ontrack extension, used to test the extension
mechanism itself.

### Local test

While this extension is tested by Ontrack pipeline at build time, it is 
also important to be able to test this extension locally.

#### From the IDE

To launch the extension:

**TODO** Check the Postgres database container.

```bash
cd ontrack-extension-test
./gradlew ontrackRun
```

#### Integration tests from the IDE

#### Integration tests on command line

In order to reproduce what happens in the Ontrack pipeline, follow this procedure.

Start by building the extension:

```bash
# Version to test
export ONTRACK_VERSION=3.34.3
# Building and testing the extension locally
cd ontrack-extension-test
./gradlew \
    -PontrackVersion=${ONTRACK_VERSION} \
    clean \
    build
```

This will build a Docker image with name: `nemerosa/ontrack-extension-test:${ONTRACK_VERSION}`.

Then, launch the test environment, which comprises:

* the Ontrack application itself
* a Postgres database as backend

```bash
cd ontrack-acceptance/src/main/compose
docker-compose --file docker-compose-ext.yml up -d ontrack postgresql selenium
```

To launch the tests:

```bash
cd ontrack-acceptance/src/main/compose
docker-compose --file docker-compose-ext.yml up -d ontrack-acceptance
```

The test results will be available in `ontrack-acceptance/src/main/compose/build`.<commit_msg>#504 Refreshing the documentation - local acceptance tests<commit_after>Extension test module
=====================

This module is a valid Ontrack extension, used to test the extension
mechanism itself.

### Local test

While this extension is tested by Ontrack pipeline at build time, it is 
also important to be able to test this extension locally.

#### From the IDE

To launch the extension:

**TODO** Check the Postgres database container.

```bash
cd ontrack-extension-test
./gradlew ontrackRun
```

#### Integration tests from the IDE

#### Integration tests on command line

In order to reproduce what happens in the Ontrack pipeline, follow this procedure.

Start by building the extension:

```bash
# Version to test
export ONTRACK_VERSION=3.34.3
# Building and testing the extension locally
cd ontrack-extension-test
./gradlew \
    -PontrackVersion=${ONTRACK_VERSION} \
    clean \
    build
```

This will build a Docker image with name: `nemerosa/ontrack-extension-test:${ONTRACK_VERSION}`.

Then, launch the test environment, which comprises:

* the Ontrack application itself
* a Postgres database as backend

```bash
cd ontrack-acceptance/src/main/compose
docker-compose --file docker-compose-ext.yml up -d ontrack postgresql selenium
```

To launch the tests:

```bash
cd ontrack-acceptance/src/main/compose
docker-compose --file docker-compose-ext.yml up ontrack_acceptance
```

The test results will be available in `ontrack-acceptance/src/main/compose/build`.

When done, all services can be stopped and destroyed using:

```bash
cd ontrack-acceptance/src/main/compose
docker-compose --file docker-compose-ext.yml down
```
{'fraction_non_alphanumeric': 0.0999026921829387, 'fraction_numerical': 0.0035679532922478106, 'mean_word_length': 4.526881720430108, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '7567065', 'n_tokens_mistral': 937, 'n_tokens_neox': 866, 'n_words': 347}