Mercurial > hg > orthanc-tests
annotate README @ 579:5d157c486568
fix auth test startup sequence
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 11 Sep 2023 09:04:17 +0200 |
parents | ee71526e11ed |
children | 8aa101e126d0 |
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 | |
564 | 20 For python2.7 tests, you need the following package |
21 # pip2 install easywebdav httplib2 pillow pydicom==1.4.1 pynetdicom==1.5.6 | |
22 | |
23 For python3 tests, you need the following package | |
24 # pip3 install httplib2 pillow pydicom pynetdicom | |
174 | 25 |
26 You also need DCMTK and Dicom3Tools | |
175 | 27 # sudo apt-get install -y dicom3tools dcmtk libgdcm-tools |
19 | 28 |
22 | 29 Quick-start: Running tests on the localhost |
30 =========================================== | |
31 | |
32 This section explains how to run the integration tests in the simplest | |
33 framework. First, install Orthanc. Then, open 2 command shells and | |
34 run the instructions that follow: | |
35 | |
36 1. In the first command shell: | |
37 | |
38 # python ./GenerateConfigurationForTests.py --force | |
39 # Orthanc IntegrationTestsConfiguration.json | |
40 | |
41 2. In the second command shell: | |
42 | |
43 # python ./Tests/Run.py | |
44 | |
176
48cc188ffb09
strip trailing 0 char that appears with some findscu versions
am@osimis.io
parents:
175
diff
changeset
|
45 to run a single test: |
48cc188ffb09
strip trailing 0 char that appears with some findscu versions
am@osimis.io
parents:
175
diff
changeset
|
46 |
48cc188ffb09
strip trailing 0 char that appears with some findscu versions
am@osimis.io
parents:
175
diff
changeset
|
47 # 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
|
48 |
174 | 49 To test the worklist plugin |
50 --------------------------- | |
51 | |
52 1. In the first command shell: | |
53 | |
54 # python ./GenerateConfigurationForTests.py --force --plugins /home/.../libModalityWorklists.so | |
55 # Orthanc IntegrationTestsConfiguration.json | |
56 | |
57 2. In the second command shell: | |
58 | |
456 | 59 # python ./Plugins/Worklists/Run.py |
174 | 60 |
22 | 61 |
62 | |
19 | 63 Running the tests |
64 ================= | |
65 | |
66 The integration tests are written in Python and are started by the | |
22 | 67 "./Tests/Run.py" script. The tests will validate some "remote" |
68 instance of Orthanc (whose AET is "ORTHANC") that is assumed to be | |
69 running before the tests are started. | |
70 | |
71 To test the DICOM protocol, a second, "local" instance of Orthanc is | |
72 automatically started by the integration tests (its AET is | |
73 "ORTHANCTEST"). This situation is depicted on the following | |
74 illustration: | |
75 | |
19 | 76 |
22 | 77 +--------------------------+ +-----------------------+ |
78 | Local computer | | Remote computer | | |
79 +--------------------------+ HTTP +-----------------------+ | |
80 | | 5000 : 8042 | | | |
81 | Run.py <---> ORTHANCTEST <===============> ORTHANC | | |
82 | | 5001 : 4242 | | | |
83 +--------------------------+ DICOM +-----------------------+ | |
84 | |
85 | |
86 Obviously, Orthanc must be installed both on the local and remote | |
87 computers. | |
88 | |
89 NB: Of course, the "local" and "remote" computers are allowed be the | |
90 same computer. | |
91 | |
19 | 92 |
93 | |
94 1. Configure the remote Orthanc | |
95 ------------------------------- | |
96 | |
97 To run the integration tests, you first have to create a configuration | |
98 file for the remote instance of Orthanc. This is done by running the | |
99 "./GenerateConfigurationForTests.py" script on the *local* | |
22 | 100 computer. This script will try and autodetect the proper network |
101 parameters. For instance (a help is available): | |
19 | 102 |
103 # ./GenerateConfigurationForTests.py --force | |
104 | |
105 This will create the "./IntegrationTestsConfiguration.json" | |
106 configuration file that must be copied to the remote computer. Then, | |
22 | 107 start Orthanc on the remote computer using this configuration file. |
19 | 108 |
109 By default, the configuration file will use "ORTHANC" as the AET, 8042 | |
110 as the HTTP port, and 4242 as the DICOM port. You can of course | |
111 adapt these parameters by editing the generated configuration file, | |
112 if you have special constraints or if the autodetection fails. | |
113 | |
114 | |
115 | |
22 | 116 2. Start the integration tests on the local computer |
117 ---------------------------------------------------- | |
118 | |
119 Once the remote instance of Orthanc is up and running, you can start | |
120 the integration tests. You have 2 possibilities: (a) use your local | |
121 computer as is, or (b) use Docker to have the best reproducibility. | |
122 | |
123 | |
124 (Option 2a) Without Docker: | |
125 | |
126 # python ./Tests/Run.py | |
127 | |
445
09ebdee8eda2
added test for /attachments/../info
Alain Mazy <am@osimis.io>
parents:
294
diff
changeset
|
128 To run a single test with by fixing the Orthanc 0.8.6 executable path: |
09ebdee8eda2
added test for /attachments/../info
Alain Mazy <am@osimis.io>
parents:
294
diff
changeset
|
129 # python2 ./Tests/Run.py --orthanc /home/alain/Releases/Orthanc-0.8.6/Build/Orthanc Orthanc.test_peer_store_straight |
09ebdee8eda2
added test for /attachments/../info
Alain Mazy <am@osimis.io>
parents:
294
diff
changeset
|
130 |
456 | 131 To run a plugin test (no need for Orthanc 0.8.6) |
564 | 132 # python ./Plugins/DicomWeb/Run.py |
133 # python ./Plugins/DicomWeb/Run.py Orthanc.test_forwarded_headers | |
445
09ebdee8eda2
added test for /attachments/../info
Alain Mazy <am@osimis.io>
parents:
294
diff
changeset
|
134 |
22 | 135 Use the flag "--help" to get the full list of arguments. These |
136 arguments will notably allow you to specify the network parameters | |
137 of your remote instance of Orthanc. | |
138 | |
541 | 139 To run the IngestTranscoding tests: |
140 # rm -rf /tmp/OrthancTest && python ./Tests/CheckIngestTranscoding.py /home/alain/o/build/orthanc/orthanc | |
141 | |
22 | 142 |
143 (Option 2b) With Docker: | |
144 | |
145 # sudo docker pull jodogne/orthanc-tests | |
146 # ./Start.sh | |
147 | |
148 Note that you will have to grant root access for Docker. | |
149 | |
150 | |
294
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
151 (Option 2c) On Windows: |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
152 |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
153 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
|
154 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
|
155 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
|
156 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
|
157 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
|
158 |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
159 # bash |
445
09ebdee8eda2
added test for /attachments/../info
Alain Mazy <am@osimis.io>
parents:
294
diff
changeset
|
160 # python2 Tests/Run.py --force --dicom 4242 --rest 8042 --orthanc /home/alain/Releases/Orthanc-0.8.6/Build/Orthanc Orthanc.test_peer_store_straight |
294
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
161 |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
162 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
|
163 and the orthanc package as well. |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
164 |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
165 |
473
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
456
diff
changeset
|
166 NewTests |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
456
diff
changeset
|
167 ======== |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
456
diff
changeset
|
168 |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
456
diff
changeset
|
169 Check the README in the NewTests folder for more complex scenarios |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
456
diff
changeset
|
170 using python3 and a new test framework. |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
456
diff
changeset
|
171 |
22 | 172 |
574 | 173 Contributing |
174 ============ | |
175 | |
176 Instructions for contributing to the Orthanc project are included in | |
177 the Orthanc Book: | |
178 https://book.orthanc-server.com/developers/repositories.html | |
179 | |
180 | |
19 | 181 Licensing |
182 ========= | |
183 | |
184 The integration tests are licensed under the GPLv3 license. The sample | |
185 DICOM images contained in the "Database" folder are the property of | |
186 their respective owners, as listed in the "Database/README.txt" file. | |
187 | |
188 We also kindly ask scientific works and clinical studies that make | |
189 use of Orthanc to cite Orthanc in their associated publications. | |
190 Similarly, we ask open-source and closed-source products that make | |
191 use of Orthanc to warn us about this use. You can cite our work | |
192 using the following BibTeX entry: | |
193 | |
135 | 194 @Article{Jodogne2018, |
195 author="Jodogne, S{\'e}bastien", | |
196 title="The {O}rthanc Ecosystem for Medical Imaging", | |
197 journal="Journal of Digital Imaging", | |
198 year="2018", | |
199 month="May", | |
200 day="03", | |
201 issn="1618-727X", | |
202 doi="10.1007/s10278-018-0082-y", | |
203 url="https://doi.org/10.1007/s10278-018-0082-y" | |
19 | 204 } |