Skip to content

Commit 2544775

Browse files
committed
Add minimal docs about testing
1 parent 537c930 commit 2544775

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ More details can be found at:
2121
2. [How to run fractal-server](docs/fractal_server.md)
2222
3. [Deployment examples](docs/examples.md)
2323
3. [Project structure](docs/structure.md)
24+
3. [Tests](docs/tests.md)
2425
4. [Dependencies](docs/dependencies.md)
2526
5. [JSON Schemas for WorkflowTask arguments](docs/json_schemas.md)
2627
6. [CHANGELOG](CHANGELOG.md)

docs/tests.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Testing
2+
3+
## Unit tests
4+
5+
Unit tests are performed via [vitest](https://vitest.dev), via the `test` script defined in `package.json`. Current tests are in the `__tests__` folder.
6+
7+
8+
## End-to-end testing
9+
10+
This is not yet implemented in an automated way (tracked in
11+
https://github.com/fractal-analytics-platform/fractal-web/issues/8), and for
12+
the moment it needs to be done manually.
13+
14+
### Local `fractal-server` instance
15+
16+
The `lib/fractal-server` folder includes basic instructions to get a local
17+
instance of `fractal-server` running.
18+
19+
### Remote `fractal-server` instance
20+
21+
One could also test a local `fractal-web` instance with a remote `fractal-server` one.
22+
If SSH access is possible, then a command like
23+
```
24+
REMOTE_PORT=8010
25+
LOCAL_PORT=8000
26+
REMOTE_USER=...
27+
REMOTE_HOST_IP=...
28+
29+
ssh $REMOTE_USER@$REMOTE_HOST_IP -L $LOCAL_PORT:$REMOTE_HOST_IP:$REMOTE_PORT -N
30+
```
31+
should work and forward the remote port `REMOTE_PORT` to the `LOCAL_PORT` on
32+
localhost, so that `fractal-web` can use it from the local machine. Note that
33+
the required details for the `ssh -L` command may be different in each specific
34+
case, depending for instance on the `fractal-server` configuration (e.g the
35+
`--bind` argument of `gunicorn`), or on whether an additional proxy is needed
36+
to reach the remote host.

0 commit comments

Comments
 (0)