Mercurial > hg > orthanc-tests
annotate README @ 190:40c167db0e11
Added tag Orthanc-1.5.0 for changeset 11719f19bd62
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 10 Dec 2018 16:25:59 +0100 |
parents | 48cc188ffb09 |
children | 192665e6113f |
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 | |
138 | |
19 | 139 Licensing |
140 ========= | |
141 | |
142 The integration tests are licensed under the GPLv3 license. The sample | |
143 DICOM images contained in the "Database" folder are the property of | |
144 their respective owners, as listed in the "Database/README.txt" file. | |
145 | |
146 We also kindly ask scientific works and clinical studies that make | |
147 use of Orthanc to cite Orthanc in their associated publications. | |
148 Similarly, we ask open-source and closed-source products that make | |
149 use of Orthanc to warn us about this use. You can cite our work | |
150 using the following BibTeX entry: | |
151 | |
135 | 152 @Article{Jodogne2018, |
153 author="Jodogne, S{\'e}bastien", | |
154 title="The {O}rthanc Ecosystem for Medical Imaging", | |
155 journal="Journal of Digital Imaging", | |
156 year="2018", | |
157 month="May", | |
158 day="03", | |
159 issn="1618-727X", | |
160 doi="10.1007/s10278-018-0082-y", | |
161 url="https://doi.org/10.1007/s10278-018-0082-y" | |
19 | 162 } |