--- last_review: "2025-01-01" last_reviewer: "-" documented_code: [ ] --- ```{tags} how-to ``` # Testing the server code :::{note} This page has been migrated from the old documentation, and has not yet been fully revised. There might be inconsistencies or errors when using with current LinkAhead versions. ::: % TODO: Issue: https://gitlab.indiscale.com/caosdb/src/linkahead-docs/-/issues/92 Whether developing new features, refactoring code or fixing bugs, the server code should be thoroughly tested for correct and incorrect behaviour, on correct and incorrect input. ## Writing tests Tests go into `src/test/java/caosdb/`, the files there can serve as examples for writing tests. ## Running tests with Maven - Automatic testing can be done with `make test` or, after compilation, `mvn test`. - Tests of single modules can be started with `mvn test -Dtest=TestClass`. - Test of a single method `footest`: `mvn test -Dtest=TestClass#footest`