Mercurial > hg > orthanc-tests
annotate README @ 340:60775134a406
finalized webdav standalone tests
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 14 Oct 2020 17:57:38 +0200 |
parents | 192665e6113f |
children | 09ebdee8eda2 |
rev | line source |
---|---|
19 | 1 Orthanc - A Lightweight, RESTful DICOM Server |
2 ============================================= | |
3 | |
4 | |
5 General Information | |
6 =================== | |
7 | |
8 This repository contains the integration tests that are used to | |
9 validate Orthanc before each official release, in complement to the | |
22 | 10 unit tests that are part of the Orthanc core repository. These |
11 integration tests should be run by the package maintainers of the | |
12 various platforms supported by Orthanc. | |
19 | 13 |
14 General information about Orthanc can be found on its official | |
15 Website: http://www.orthanc-server.com/ | |
16 | |
174 | 17 Prerequisites: |
18 ============= | |
19 | |
20 You need Python2.7 installed with the following package | |
21 # pip2 install httplib2 Pillow | |
22 | |
23 You also need DCMTK and Dicom3Tools | |
175 | 24 # sudo apt-get install -y dicom3tools dcmtk libgdcm-tools |
19 | 25 |
22 | 26 Quick-start: Running tests on the localhost |
27 =========================================== | |
28 | |
29 This section explains how to run the integration tests in the simplest | |
30 framework. First, install Orthanc. Then, open 2 command shells and | |
31 run the instructions that follow: | |
32 | |
33 1. In the first command shell: | |
34 | |
35 # python ./GenerateConfigurationForTests.py --force | |
36 # Orthanc IntegrationTestsConfiguration.json | |
37 | |
38 2. In the second command shell: | |
39 | |
40 # python ./Tests/Run.py | |
41 | |
176
48cc188ffb09
strip trailing 0 char that appears with some findscu versions
am@osimis.io
parents:
175
diff
changeset
|
42 to run a single test: |
48cc188ffb09
strip trailing 0 char that appears with some findscu versions
am@osimis.io
parents:
175
diff
changeset
|
43 |
48cc188ffb09
strip trailing 0 char that appears with some findscu versions
am@osimis.io
parents:
175
diff
changeset
|
44 # python Tests/Run.py Orthanc.test_findscu_counters |
48cc188ffb09
strip trailing 0 char that appears with some findscu versions
am@osimis.io
parents:
175
diff
changeset
|
45 |
174 | 46 To test the worklist plugin |
47 --------------------------- | |
48 | |
49 1. In the first command shell: | |
50 | |
51 # python ./GenerateConfigurationForTests.py --force --plugins /home/.../libModalityWorklists.so | |
52 # Orthanc IntegrationTestsConfiguration.json | |
53 | |
54 2. In the second command shell: | |
55 | |
56 # python ./Tests/Run.py | |
57 | |
22 | 58 |
59 | |
19 | 60 Running the tests |
61 ================= | |
62 | |
63 The integration tests are written in Python and are started by the | |
22 | 64 "./Tests/Run.py" script. The tests will validate some "remote" |
65 instance of Orthanc (whose AET is "ORTHANC") that is assumed to be | |
66 running before the tests are started. | |
67 | |
68 To test the DICOM protocol, a second, "local" instance of Orthanc is | |
69 automatically started by the integration tests (its AET is | |
70 "ORTHANCTEST"). This situation is depicted on the following | |
71 illustration: | |
72 | |
19 | 73 |
22 | 74 +--------------------------+ +-----------------------+ |
75 | Local computer | | Remote computer | | |
76 +--------------------------+ HTTP +-----------------------+ | |
77 | | 5000 : 8042 | | | |
78 | Run.py <---> ORTHANCTEST <===============> ORTHANC | | |
79 | | 5001 : 4242 | | | |
80 +--------------------------+ DICOM +-----------------------+ | |
81 | |
82 | |
83 Obviously, Orthanc must be installed both on the local and remote | |
84 computers. | |
85 | |
86 NB: Of course, the "local" and "remote" computers are allowed be the | |
87 same computer. | |
88 | |
19 | 89 |
90 | |
91 1. Configure the remote Orthanc | |
92 ------------------------------- | |
93 | |
94 To run the integration tests, you first have to create a configuration | |
95 file for the remote instance of Orthanc. This is done by running the | |
96 "./GenerateConfigurationForTests.py" script on the *local* | |
22 | 97 computer. This script will try and autodetect the proper network |
98 parameters. For instance (a help is available): | |
19 | 99 |
100 # ./GenerateConfigurationForTests.py --force | |
101 | |
102 This will create the "./IntegrationTestsConfiguration.json" | |
103 configuration file that must be copied to the remote computer. Then, | |
22 | 104 start Orthanc on the remote computer using this configuration file. |
19 | 105 |
106 By default, the configuration file will use "ORTHANC" as the AET, 8042 | |
107 as the HTTP port, and 4242 as the DICOM port. You can of course | |
108 adapt these parameters by editing the generated configuration file, | |
109 if you have special constraints or if the autodetection fails. | |
110 | |
111 | |
112 | |
22 | 113 2. Start the integration tests on the local computer |
114 ---------------------------------------------------- | |
115 | |
116 Once the remote instance of Orthanc is up and running, you can start | |
117 the integration tests. You have 2 possibilities: (a) use your local | |
118 computer as is, or (b) use Docker to have the best reproducibility. | |
119 | |
120 | |
121 (Option 2a) Without Docker: | |
122 | |
123 # python ./Tests/Run.py | |
124 | |
125 Use the flag "--help" to get the full list of arguments. These | |
126 arguments will notably allow you to specify the network parameters | |
127 of your remote instance of Orthanc. | |
128 | |
129 | |
130 (Option 2b) With Docker: | |
131 | |
132 # sudo docker pull jodogne/orthanc-tests | |
133 # ./Start.sh | |
134 | |
135 Note that you will have to grant root access for Docker. | |
136 | |
137 | |
294
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
138 (Option 2c) On Windows: |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
139 |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
140 Easiest way to run the integration test under windows is actually |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
141 run the remote Orthanc and the python script under WSL and run the |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
142 orthanc under test on Windows (such that you can debug it). |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
143 Note that if Orthanc on Windows is not using the standard port, you |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
144 may specify them when starting the test as shown below |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
145 |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
146 # bash |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
147 # python Tests/Run.py --force --dicom 8567 --rest 8568 |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
148 |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
149 Note that you will have to install Linux prerequisites under WSL |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
150 and the orthanc package as well. |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
151 |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
152 |
22 | 153 |
19 | 154 Licensing |
155 ========= | |
156 | |
157 The integration tests are licensed under the GPLv3 license. The sample | |
158 DICOM images contained in the "Database" folder are the property of | |
159 their respective owners, as listed in the "Database/README.txt" file. | |
160 | |
161 We also kindly ask scientific works and clinical studies that make | |
162 use of Orthanc to cite Orthanc in their associated publications. | |
163 Similarly, we ask open-source and closed-source products that make | |
164 use of Orthanc to warn us about this use. You can cite our work | |
165 using the following BibTeX entry: | |
166 | |
135 | 167 @Article{Jodogne2018, |
168 author="Jodogne, S{\'e}bastien", | |
169 title="The {O}rthanc Ecosystem for Medical Imaging", | |
170 journal="Journal of Digital Imaging", | |
171 year="2018", | |
172 month="May", | |
173 day="03", | |
174 issn="1618-727X", | |
175 doi="10.1007/s10278-018-0082-y", | |
176 url="https://doi.org/10.1007/s10278-018-0082-y" | |
19 | 177 } |