Skip to content

Latest commit

 

History

History
98 lines (65 loc) · 2.66 KB

File metadata and controls

98 lines (65 loc) · 2.66 KB

ICD-RxJS

Protocol-level integration tests for the CARTA backend, driven through the protobuf/WebSocket interface via RxJS (adapted from carta-frontend/src/services/BackendService.ts).

Prerequisites

  • Node.js (with npm)
  • A running carta-backend instance (local or remote)
  • Test images for the test stage you want to run

Build

Initialize submodules and install dependencies:

git submodule update --init --recursive
npm install

Then build the protobuf bindings (JavaScript + TypeScript definitions):

cd protobuf
./build_proto.sh

The script compiles the .proto files and symlinks the output to node_modules/carta-protobuf.

Configuration

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" }

Running tests

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.ts

To verify supported file formats:

npm test src/test/FILEINFO.test.ts

If 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.

Test images

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.

Documentation

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.

Setup (one-time)

Install Sphinx and extensions via conda:

conda create -n py312 python=3.12
conda activate py312
conda install sphinx sphinx-rtd-theme plantuml sphinxcontrib-plantuml

PlantUML must also be installed and available on your PATH for diagram rendering.

Build

cd docs
make clean && make html

Open the generated HTML:

open docs/build/html/index.html      # macOS
xdg-open docs/build/html/index.html  # Linux

Design documents

The original design documents for all tests are available on Google Drive (access permission may be required).