Protocol-level integration tests for the CARTA backend, driven through the protobuf/WebSocket interface via RxJS (adapted from carta-frontend/src/services/BackendService.ts).
- Node.js (with npm)
- A running carta-backend instance (local or remote)
- Test images for the test stage you want to run
Initialize submodules and install dependencies:
git submodule update --init --recursive
npm installThen build the protobuf bindings (JavaScript + TypeScript definitions):
cd protobuf
./build_proto.shThe script compiles the .proto files and symlinks the output to node_modules/carta-protobuf.
Edit src/test/config.json before running tests.
- Local testing — point to your local backend instance:
{ "serverURL": "ws://127.0.0.1:3002" } - Remote testing — point to a deployed server (for example):
{ "serverURL": "wss://carta.asiaa.sinica.edu.tw/socketdev" }
Run one test file at a time to avoid concurrency and I/O issues:
npm test src/test/ACCESS_WEBSOCKET.test.ts
npm test src/test/ACCESS_CARTA_DEFAULT.test.tsTo verify supported file formats:
npm test src/test/FILEINFO.test.tsIf a test fails, check the parameters in config.json — in particular, the server URL and timeout values (timeout.readfile, timeout.openfile) — to ensure they match your environment.
Download the test images from: https://carta.asiaa.sinica.edu.tw/images/
Each test stage lists the required images, packed into .tgz archives. Use the Download all files link or copy the wget command from the page.
The test documentation is built with Sphinx using the Read the Docs theme. A hosted copy is available at https://carta.asiaa.sinica.edu.tw/icd-test-docs/index.html.
Install Sphinx and extensions via conda:
conda create -n py312 python=3.12
conda activate py312
conda install sphinx sphinx-rtd-theme plantuml sphinxcontrib-plantumlPlantUML must also be installed and available on your PATH for diagram rendering.
cd docs
make clean && make htmlOpen the generated HTML:
open docs/build/html/index.html # macOS
xdg-open docs/build/html/index.html # LinuxThe original design documents for all tests are available on Google Drive (access permission may be required).