Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readme: improve core and tests doc #6109

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ You'll need:
- Java 17
- Python >= 3.9 (For generating example / test files)
- Install the `python/railjson_generator` library using poetry:

```sh
poetry --directory=../python/railjson_generator install
```
Expand All @@ -47,7 +48,7 @@ You'll need:
gradlew.bat processTestResources shadowJar

# Run as service
java -jar build/libs/osrd-all.jar api --url http://localhost:8090/ -p 8080
java -jar build/libs/osrd-all.jar api --editoast-url http://localhost:8090/ -p 8080

# Check that an infra can be loaded
java -jar build/libs/osrd-all.jar load-infra --path RAILJSON_INFRA
Expand All @@ -67,3 +68,17 @@ gradlew.bat processTestResources shadowJar
java -jar build/libs/osrd-all.jar standalone-simulation --infra_path example/infra.json \
--sim_path example/simulation.json --res_path example/results.json
```

### Tests and tooling

To launch all the checks on core (tests and code quality), run:

```sh
./gradlew check
```

To launch tests only, run:

```sh
./gradlew test
```
2 changes: 2 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ To run tests `poetry run pytest` after starting docker containers (`docker compo

To run a list of specific tests, run `poetry run pytest -k test_name_1 test_name_2 ...`.

To setup end-to-end (e2e) tests, please see [front readme](../front/README.md#yarn-e2e-tests).

### Create new integration tests

To add a test, follow [pytest doc](https://docs.pytest.org/).
Expand Down
Loading