immich/docs/docs/developer/testing.md
Carsten Otto 9f318a9338
Some checks are pending
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
Docker / Build and Push (., cpu, server/Dockerfile, immich-server, linux/amd64,linux/arm64) (push) Waiting to run
Docker / Build and Push (machine-learning, armnn, machine-learning/Dockerfile, immich-machine-learning, linux/arm64, -armnn) (push) Waiting to run
Docker / Build and Push (machine-learning, cpu, machine-learning/Dockerfile, immich-machine-learning, linux/amd64,linux/arm64) (push) Waiting to run
Docker / Build and Push (machine-learning, cuda, machine-learning/Dockerfile, immich-machine-learning, linux/amd64, -cuda) (push) Waiting to run
Docker / Build and Push (machine-learning, openvino, machine-learning/Dockerfile, immich-machine-learning, linux/amd64, -openvino) (push) Waiting to run
Docs build / build (push) Waiting to run
Static Code Analysis / Run Dart Code Analysis (push) Waiting to run
Test / Server (push) Waiting to run
Test / CLI (push) Waiting to run
Test / CLI (Windows) (push) Waiting to run
Test / Web (push) Waiting to run
Test / End-to-End Tests (push) Waiting to run
Test / Mobile (push) Waiting to run
Test / Machine Learning (push) Waiting to run
Test / ShellCheck (push) Waiting to run
Test / OpenAPI Clients (push) Waiting to run
Test / TypeORM Checks (push) Waiting to run
fix(docs): update documentation (#11655)
update documentation
2024-08-08 23:03:43 +00:00

743 B

Testing

Server

Unit tests

Unit are run by calling npm run test from the server/ directory. You need to run npm install (in server/) before once.

End to end tests

The e2e tests can be run by first starting up a test production environment via:

make e2e

Before you can run the tests, you need to run the following commands once:

  • npm install (in e2e/)
  • make open-api (in the project root /)

Once the test environment is running, the e2e tests can be run via:

cd e2e/
npm test

The tests check various things including:

  • Authentication and authorization
  • Query param, body, and url validation
  • Response codes
  • Thumbnail generation
  • Metadata extraction
  • Library scanning