feat(OHIFv3):Add static e2e data (#2665)
This change wraps the E2E test data into a github repository, which is then included in the test builds as static data. That makes running the e2e tests as simple as: yarn test:e2e:server yarn test:e2e without any need to have docker etc installed/running.
This commit is contained in:
1 parent
72bb074f21
commit
0e2c31939c
14 files changed
+888
-108
No files matched your search
@@ -24,26 +24,14 @@ Running unit test will generate a report at the end showing the successful and
|
||||
unsuccessful tests with detailed explanations.
|
||||
|
||||
## End-to-end test
|
||||
|
||||
For running the OHIF e2e test you need to run the following steps:
|
||||
|
||||
- Create a mini-pacs for OHIF to access the images for testing. We download and
|
||||
run our lightweight implementation which provides a collection of DICOM
|
||||
studies ([source code][mini-pacs]).
|
||||
|
||||
```bash
|
||||
docker run -p 5985:5985 -p 5984:5984 -e USE_POUCHDB=true -e DB_SERVER=http://0.0.0.0 ohif/viewer-testdata:0.1-test
|
||||
```
|
||||
|
||||
Successful execution should be
|
||||
|
||||

|
||||
|
||||
- Open a new terminal, navigate to the OHIF project, and run OHIF with the
|
||||
dicom-server config
|
||||
e2e config. The test:data only needs to be run once and checks the data out.
|
||||
|
||||
```bash
|
||||
APP_CONFIG=config/dicomweb-server.js yarn start
|
||||
yarn test:data
|
||||
APP_CONFIG=config/e2e.js yarn start
|
||||
```
|
||||
|
||||
You should be able to see test studies in the study list
|
||||
@@ -53,7 +41,7 @@ For running the OHIF e2e test you need to run the following steps:
|
||||
- Open a new terminal inside the OHIF project, and run the e2e cypress test
|
||||
|
||||
```bash
|
||||
yarn run test:e2e
|
||||
yarn test:e2e
|
||||
```
|
||||
|
||||
You should be able to see the cypress window open
|
||||
@@ -67,6 +55,27 @@ For running the OHIF e2e test you need to run the following steps:
|
||||
|
||||

|
||||
|
||||
## Test Data
|
||||
The testing data is stored in two OHIF repositories. The first contains the
|
||||
binary DICOM data, at [viewer-testdata](https://github.com/OHIF/viewer-testdata.git)
|
||||
while the second module contains data in the DICOMweb format, installed as a submodule
|
||||
into OHIF in the `testdata` directory. This is retrieved via the command
|
||||
```bash
|
||||
yarn test:data
|
||||
```
|
||||
or the equivalent command `git submodule update --init`
|
||||
When adding new data, run:
|
||||
```
|
||||
npm install -g dicomp10-to-dicomweb
|
||||
mkdicomweb -d dicomweb dcm
|
||||
```
|
||||
to update the local dicomweb submodule in viewer-testdata. Then, commit
|
||||
that data and update the submodules used in OHIF and in the viewer-testdata
|
||||
parent modules.
|
||||
|
||||
All data MUST be fully anonymized and allowed to be used for open access.
|
||||
Any attributions should be included in the DCM directory.
|
||||
|
||||
## Testing Philosophy
|
||||
|
||||
> Testing is an opinionated topic. Here is a rough overview of our testing
|
||||
|
||||
Reference in new issue
Block a user