Mercurial > hg > orthanc-tests
comparison README @ 22:8f4b70c89467
readme
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 22 Jun 2015 16:29:08 +0200 |
parents | 952eed8b6880 |
children | 6943b41eb239 |
comparison
equal
deleted
inserted
replaced
21:2a29bcff60a7 | 22:8f4b70c89467 |
---|---|
5 General Information | 5 General Information |
6 =================== | 6 =================== |
7 | 7 |
8 This repository contains the integration tests that are used to | 8 This repository contains the integration tests that are used to |
9 validate Orthanc before each official release, in complement to the | 9 validate Orthanc before each official release, in complement to the |
10 unit tests that are part of the Orthanc repository. These integrations | 10 unit tests that are part of the Orthanc core repository. These |
11 tests should be run by the package maintainers of the various | 11 integration tests should be run by the package maintainers of the |
12 platforms supported by Orthanc. | 12 various platforms supported by Orthanc. |
13 | 13 |
14 General information about Orthanc can be found on its official | 14 General information about Orthanc can be found on its official |
15 Website: http://www.orthanc-server.com/ | 15 Website: http://www.orthanc-server.com/ |
16 | |
17 | |
18 Quick-start: Running tests on the localhost | |
19 =========================================== | |
20 | |
21 This section explains how to run the integration tests in the simplest | |
22 framework. First, install Orthanc. Then, open 2 command shells and | |
23 run the instructions that follow: | |
24 | |
25 1. In the first command shell: | |
26 | |
27 # python ./GenerateConfigurationForTests.py --force | |
28 # Orthanc IntegrationTestsConfiguration.json | |
29 | |
30 2. In the second command shell: | |
31 | |
32 # python ./Tests/Run.py | |
33 | |
16 | 34 |
17 | 35 |
18 Running the tests | 36 Running the tests |
19 ================= | 37 ================= |
20 | 38 |
21 The integration tests are written in Python and are started by the | 39 The integration tests are written in Python and are started by the |
22 "./Tests/Run.py" script. The tests will validate a "remote" instance | 40 "./Tests/Run.py" script. The tests will validate some "remote" |
23 of Orthanc (whose AET is "ORTHANC") that is assumed to be running | 41 instance of Orthanc (whose AET is "ORTHANC") that is assumed to be |
24 before the tests are started. To test the DICOM protocol, a second, | 42 running before the tests are started. |
25 "local" instance of Orthanc is automatically started by the | |
26 integration tests (its AET is "ORTHANCTEST"). This situation is | |
27 depicted on the following illustration: | |
28 | 43 |
29 +--------------------------+ +-----------------------+ | 44 To test the DICOM protocol, a second, "local" instance of Orthanc is |
30 | Local computer | | Remote computer | | 45 automatically started by the integration tests (its AET is |
31 +--------------------------+ HTTP +-----------------------+ | 46 "ORTHANCTEST"). This situation is depicted on the following |
32 | | 5000 : 8042 | | | 47 illustration: |
33 | Run.py <---> ORTHANCTEST <=============> ORTHANC | | 48 |
34 | | 5001 : 4242 | | | 49 |
35 +--------------------------+ DICOM +-----------------------+ | 50 +--------------------------+ +-----------------------+ |
51 | Local computer | | Remote computer | | |
52 +--------------------------+ HTTP +-----------------------+ | |
53 | | 5000 : 8042 | | | |
54 | Run.py <---> ORTHANCTEST <===============> ORTHANC | | |
55 | | 5001 : 4242 | | | |
56 +--------------------------+ DICOM +-----------------------+ | |
57 | |
58 | |
59 Obviously, Orthanc must be installed both on the local and remote | |
60 computers. | |
61 | |
62 NB: Of course, the "local" and "remote" computers are allowed be the | |
63 same computer. | |
64 | |
36 | 65 |
37 | 66 |
38 1. Configure the remote Orthanc | 67 1. Configure the remote Orthanc |
39 ------------------------------- | 68 ------------------------------- |
40 | 69 |
41 To run the integration tests, you first have to create a configuration | 70 To run the integration tests, you first have to create a configuration |
42 file for the remote instance of Orthanc. This is done by running the | 71 file for the remote instance of Orthanc. This is done by running the |
43 "./GenerateConfigurationForTests.py" script on the *local* | 72 "./GenerateConfigurationForTests.py" script on the *local* |
44 computer. This script will autodetect the proper network parameters. | 73 computer. This script will try and autodetect the proper network |
45 For instance (a help is available): | 74 parameters. For instance (a help is available): |
46 | 75 |
47 # ./GenerateConfigurationForTests.py --force | 76 # ./GenerateConfigurationForTests.py --force |
48 | 77 |
49 This will create the "./IntegrationTestsConfiguration.json" | 78 This will create the "./IntegrationTestsConfiguration.json" |
50 configuration file that must be copied to the remote computer. Then, | 79 configuration file that must be copied to the remote computer. Then, |
51 start Orthanc on the remote computer with this configuration file. | 80 start Orthanc on the remote computer using this configuration file. |
52 | 81 |
53 By default, the configuration file will use "ORTHANC" as the AET, 8042 | 82 By default, the configuration file will use "ORTHANC" as the AET, 8042 |
54 as the HTTP port, and 4242 as the DICOM port. You can of course | 83 as the HTTP port, and 4242 as the DICOM port. You can of course |
55 adapt these parameters by editing the generated configuration file, | 84 adapt these parameters by editing the generated configuration file, |
56 if you have special constraints or if the autodetection fails. | 85 if you have special constraints or if the autodetection fails. |
86 | |
87 | |
88 | |
89 2. Start the integration tests on the local computer | |
90 ---------------------------------------------------- | |
91 | |
92 Once the remote instance of Orthanc is up and running, you can start | |
93 the integration tests. You have 2 possibilities: (a) use your local | |
94 computer as is, or (b) use Docker to have the best reproducibility. | |
95 | |
96 | |
97 (Option 2a) Without Docker: | |
98 | |
99 # python ./Tests/Run.py | |
100 | |
101 Use the flag "--help" to get the full list of arguments. These | |
102 arguments will notably allow you to specify the network parameters | |
103 of your remote instance of Orthanc. | |
104 | |
105 | |
106 (Option 2b) With Docker: | |
107 | |
108 # sudo docker pull jodogne/orthanc-tests | |
109 # ./Start.sh | |
110 | |
111 Note that you will have to grant root access for Docker. | |
57 | 112 |
58 | 113 |
59 | 114 |
60 Licensing | 115 Licensing |
61 ========= | 116 ========= |