annotate README @ 39:7412a437ab47

test
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 21 Aug 2015 15:01:05 +0200
parents 8f4b70c89467
children 6943b41eb239
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 Orthanc - A Lightweight, RESTful DICOM Server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 =============================================
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 General Information
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 ===================
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 This repository contains the integration tests that are used to
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 validate Orthanc before each official release, in complement to the
22
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
10 unit tests that are part of the Orthanc core repository. These
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
11 integration tests should be run by the package maintainers of the
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
12 various platforms supported by Orthanc.
19
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 General information about Orthanc can be found on its official
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 Website: http://www.orthanc-server.com/
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17
22
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
18 Quick-start: Running tests on the localhost
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
19 ===========================================
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
21 This section explains how to run the integration tests in the simplest
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
22 framework. First, install Orthanc. Then, open 2 command shells and
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
23 run the instructions that follow:
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
24
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
25 1. In the first command shell:
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
26
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
27 # python ./GenerateConfigurationForTests.py --force
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
28 # Orthanc IntegrationTestsConfiguration.json
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
29
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
30 2. In the second command shell:
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
31
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
32 # python ./Tests/Run.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
33
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
34
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
35
19
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 Running the tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 =================
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 The integration tests are written in Python and are started by the
22
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
40 "./Tests/Run.py" script. The tests will validate some "remote"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
41 instance of Orthanc (whose AET is "ORTHANC") that is assumed to be
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
42 running before the tests are started.
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
43
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
44 To test the DICOM protocol, a second, "local" instance of Orthanc is
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
45 automatically started by the integration tests (its AET is
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
46 "ORTHANCTEST"). This situation is depicted on the following
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
47 illustration:
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
48
19
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49
22
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
50 +--------------------------+ +-----------------------+
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
51 | Local computer | | Remote computer |
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
52 +--------------------------+ HTTP +-----------------------+
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
53 | | 5000 : 8042 | |
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
54 | Run.py <---> ORTHANCTEST <===============> ORTHANC |
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
55 | | 5001 : 4242 | |
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
56 +--------------------------+ DICOM +-----------------------+
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
57
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
58
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
59 Obviously, Orthanc must be installed both on the local and remote
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
60 computers.
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
61
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
62 NB: Of course, the "local" and "remote" computers are allowed be the
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
63 same computer.
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
64
19
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 1. Configure the remote Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 -------------------------------
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 To run the integration tests, you first have to create a configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 file for the remote instance of Orthanc. This is done by running the
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 "./GenerateConfigurationForTests.py" script on the *local*
22
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
73 computer. This script will try and autodetect the proper network
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
74 parameters. For instance (a help is available):
19
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 # ./GenerateConfigurationForTests.py --force
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 This will create the "./IntegrationTestsConfiguration.json"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 configuration file that must be copied to the remote computer. Then,
22
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
80 start Orthanc on the remote computer using this configuration file.
19
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 By default, the configuration file will use "ORTHANC" as the AET, 8042
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 as the HTTP port, and 4242 as the DICOM port. You can of course
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 adapt these parameters by editing the generated configuration file,
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 if you have special constraints or if the autodetection fails.
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88
22
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
89 2. Start the integration tests on the local computer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
90 ----------------------------------------------------
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
91
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
92 Once the remote instance of Orthanc is up and running, you can start
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
93 the integration tests. You have 2 possibilities: (a) use your local
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
94 computer as is, or (b) use Docker to have the best reproducibility.
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
95
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
96
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
97 (Option 2a) Without Docker:
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
98
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
99 # python ./Tests/Run.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
100
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
101 Use the flag "--help" to get the full list of arguments. These
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
102 arguments will notably allow you to specify the network parameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
103 of your remote instance of Orthanc.
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
104
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
105
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
106 (Option 2b) With Docker:
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
107
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
108 # sudo docker pull jodogne/orthanc-tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
109 # ./Start.sh
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
110
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
111 Note that you will have to grant root access for Docker.
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
112
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
113
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 19
diff changeset
114
19
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 Licensing
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 =========
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 The integration tests are licensed under the GPLv3 license. The sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 DICOM images contained in the "Database" folder are the property of
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 their respective owners, as listed in the "Database/README.txt" file.
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 We also kindly ask scientific works and clinical studies that make
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 use of Orthanc to cite Orthanc in their associated publications.
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 Similarly, we ask open-source and closed-source products that make
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 use of Orthanc to warn us about this use. You can cite our work
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 using the following BibTeX entry:
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 @inproceedings{Jodogne:ISBI2013,
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 author = {Jodogne, S. and Bernard, C. and Devillers, M. and Lenaerts, E. and Coucke, P.},
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 title = {Orthanc -- {A} Lightweight, {REST}ful {DICOM} Server for Healthcare and Medical Research},
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 booktitle={Biomedical Imaging ({ISBI}), {IEEE} 10th International Symposium on},
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 year={2013},
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 pages={190-193},
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 ISSN={1945-7928},
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 month=apr,
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 url={http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=6556444},
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 address={San Francisco, {CA}, {USA}}
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 }