Mercurial > hg > orthanc-tests
annotate README @ 449:06eea14c5906 Orthanc-1.10.0
upgrade year to 2022
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 22 Feb 2022 11:45:59 +0100 |
parents | 09ebdee8eda2 |
children | 0d7c0bbe6c90 |
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 | |
445
09ebdee8eda2
added test for /attachments/../info
Alain Mazy <am@osimis.io>
parents:
294
diff
changeset
|
125 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
|
126 # 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
|
127 |
09ebdee8eda2
added test for /attachments/../info
Alain Mazy <am@osimis.io>
parents:
294
diff
changeset
|
128 |
22 | 129 Use the flag "--help" to get the full list of arguments. These |
130 arguments will notably allow you to specify the network parameters | |
131 of your remote instance of Orthanc. | |
132 | |
133 | |
134 (Option 2b) With Docker: | |
135 | |
136 # sudo docker pull jodogne/orthanc-tests | |
137 # ./Start.sh | |
138 | |
139 Note that you will have to grant root access for Docker. | |
140 | |
141 | |
294
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
142 (Option 2c) On Windows: |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
143 |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
144 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
|
145 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
|
146 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
|
147 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
|
148 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
|
149 |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
150 # bash |
445
09ebdee8eda2
added test for /attachments/../info
Alain Mazy <am@osimis.io>
parents:
294
diff
changeset
|
151 # 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
|
152 |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
153 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
|
154 and the orthanc package as well. |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
155 |
192665e6113f
instruction to run on Windows (with WSL)
Alain Mazy <alain@mazy.be>
parents:
176
diff
changeset
|
156 |
22 | 157 |
19 | 158 Licensing |
159 ========= | |
160 | |
161 The integration tests are licensed under the GPLv3 license. The sample | |
162 DICOM images contained in the "Database" folder are the property of | |
163 their respective owners, as listed in the "Database/README.txt" file. | |
164 | |
165 We also kindly ask scientific works and clinical studies that make | |
166 use of Orthanc to cite Orthanc in their associated publications. | |
167 Similarly, we ask open-source and closed-source products that make | |
168 use of Orthanc to warn us about this use. You can cite our work | |
169 using the following BibTeX entry: | |
170 | |
135 | 171 @Article{Jodogne2018, |
172 author="Jodogne, S{\'e}bastien", | |
173 title="The {O}rthanc Ecosystem for Medical Imaging", | |
174 journal="Journal of Digital Imaging", | |
175 year="2018", | |
176 month="May", | |
177 day="03", | |
178 issn="1618-727X", | |
179 doi="10.1007/s10278-018-0082-y", | |
180 url="https://doi.org/10.1007/s10278-018-0082-y" | |
19 | 181 } |