Mercurial > hg > orthanc-tests
annotate NewTests/README @ 499:9a6fa1ffb23a
tests for DicomWeb 1.10.1
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 10 Oct 2022 14:35:56 +0200 |
parents | 10a47656e34f |
children | 2170c10f9d49 |
rev | line source |
---|---|
473
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
1 This is a new set of tests directly written in python3. They should be able to handle |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
2 more complex scenarios like upgrades or change of configurations. |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
3 |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
4 Prerequisites: |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
5 ============= |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
6 |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
7 These tests use python3 and require some modules define in requirements.txt. Therefore, you need |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
8 to first execute |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
9 |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
10 pip3 install -r requirements.txt |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
11 |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
12 Introduction: |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
13 ============ |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
14 |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
15 You may use these tests to debug Orthanc on your machine. In this case, there is |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
16 usually a `preparation` phase and `execution` phase. You are usually able to |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
17 interrupt the tests between these 2 phases such that you can start your debugger. |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
18 Use the `--break_after_preparation` option to do so. |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
19 As well, you may skip the preperation phase thanks to the `--skip_preparation` option. |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
20 |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
21 The orthanc that is being tested is called the `orthanc-under-tests`. |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
22 |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
23 Examples: |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
24 ======== |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
25 |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
26 All-tests: |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
27 --------- |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
28 |
474 | 29 with a local executable: |
30 | |
473
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
31 python3 NewTests/main.py --pattern=* \ |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
32 --orthanc_under_tests_exe=/home/alain/o/build/orthanc/Orthanc \ |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
33 --orthanc_under_tests_http_port=8043 \ |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
34 --plugin=/home/alain/o/build/orthanc/libHousekeeper.so \ |
483 | 35 --plugin=/home/alain/o/build/orthanc/libDelayedDeletion.so \ |
489 | 36 --plugin=/home/alain/o/build/orthanc-dicomweb/libOrthancDicomWeb.so \ |
473
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
37 --plugin=/home/alain/o/build/orthanc-gdcm/libOrthancGdcm.so |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
38 |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
39 |
474 | 40 with Docker: |
41 | |
42 python3 NewTests/main.py --pattern=* \ | |
43 --orthanc_under_tests_docker_image=osimis/orthanc:current \ | |
44 --orthanc_previous_version_docker_image=osimis/orthanc:22.4.0 \ | |
45 --orthanc_under_tests_http_port=8043 | |
46 | |
473
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
47 Housekeeper: |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
48 ----------- |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
49 |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
50 Run the Housekeeper tests with your locally build version and break between preparation |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
51 and execution to allow you to start your debugger. |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
52 |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
53 python3 NewTests/main.py --pattern=Housekeeper.test_housekeeper.TestHousekeeper.test_before_after_reconstruction \ |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
54 --orthanc_under_tests_exe=/home/alain/o/build/orthanc/Orthanc \ |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
55 --orthanc_under_tests_http_port=8043 \ |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
56 --plugin=/home/alain/o/build/orthanc/libHousekeeper.so \ |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
57 --break_after_preparation |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
58 |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
59 The test script will: |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
60 - generate 2 configuration file in the `configurations` folder, |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
61 - start your local Orthanc version to prepare the db with one of the configuration file, |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
62 - drive this Orthanc to prepare the DB |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
63 - interrupt and instruct you how to start your own version, pointing to the configuration file to use |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
64 - execute tests |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
65 |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
66 |
486
6144ef431512
new tests for sequences in ExtraMainDicomTags
Alain Mazy <am@osimis.io>
parents:
483
diff
changeset
|
67 ExtraMainDicomTags: |
6144ef431512
new tests for sequences in ExtraMainDicomTags
Alain Mazy <am@osimis.io>
parents:
483
diff
changeset
|
68 ------------------ |
6144ef431512
new tests for sequences in ExtraMainDicomTags
Alain Mazy <am@osimis.io>
parents:
483
diff
changeset
|
69 |
6144ef431512
new tests for sequences in ExtraMainDicomTags
Alain Mazy <am@osimis.io>
parents:
483
diff
changeset
|
70 Runs an Orthanc in Index Only mode while storing extra main dicom tags and perform various find (including DicomWeb). |
6144ef431512
new tests for sequences in ExtraMainDicomTags
Alain Mazy <am@osimis.io>
parents:
483
diff
changeset
|
71 |
6144ef431512
new tests for sequences in ExtraMainDicomTags
Alain Mazy <am@osimis.io>
parents:
483
diff
changeset
|
72 Run the ExtraMainDicomTags tests with your locally build version. |
6144ef431512
new tests for sequences in ExtraMainDicomTags
Alain Mazy <am@osimis.io>
parents:
483
diff
changeset
|
73 |
6144ef431512
new tests for sequences in ExtraMainDicomTags
Alain Mazy <am@osimis.io>
parents:
483
diff
changeset
|
74 python3 NewTests/main.py --pattern=ExtraMainDicomTags.* \ |
6144ef431512
new tests for sequences in ExtraMainDicomTags
Alain Mazy <am@osimis.io>
parents:
483
diff
changeset
|
75 --orthanc_under_tests_exe=/home/alain/o/build/orthanc/Orthanc \ |
6144ef431512
new tests for sequences in ExtraMainDicomTags
Alain Mazy <am@osimis.io>
parents:
483
diff
changeset
|
76 --orthanc_under_tests_http_port=8043 \ |
6144ef431512
new tests for sequences in ExtraMainDicomTags
Alain Mazy <am@osimis.io>
parents:
483
diff
changeset
|
77 --plugin=/home/alain/o/build/orthanc-dicomweb/libOrthancDicomWeb.so \ |
6144ef431512
new tests for sequences in ExtraMainDicomTags
Alain Mazy <am@osimis.io>
parents:
483
diff
changeset
|
78 --break_after_preparation |
6144ef431512
new tests for sequences in ExtraMainDicomTags
Alain Mazy <am@osimis.io>
parents:
483
diff
changeset
|
79 |
6144ef431512
new tests for sequences in ExtraMainDicomTags
Alain Mazy <am@osimis.io>
parents:
483
diff
changeset
|
80 The test script will: |
6144ef431512
new tests for sequences in ExtraMainDicomTags
Alain Mazy <am@osimis.io>
parents:
483
diff
changeset
|
81 - generate 1 configuration file in the `configurations` folder, |
6144ef431512
new tests for sequences in ExtraMainDicomTags
Alain Mazy <am@osimis.io>
parents:
483
diff
changeset
|
82 - interrupt and instruct you how to start your own version, pointing to the configuration file to use |
6144ef431512
new tests for sequences in ExtraMainDicomTags
Alain Mazy <am@osimis.io>
parents:
483
diff
changeset
|
83 - execute tests |
473
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
84 |
4ee85b016a40
added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
85 |
489 | 86 StorageCompression: |
87 ------------------ | |
88 | |
89 Run the StorageCompression tests with your locally build version and break before and after preparation | |
90 and execution to allow you to start your debugger. | |
91 | |
92 python3 NewTests/main.py --pattern=StorageCompression.test_storage_compression.TestStorageCompression.* \ | |
93 --orthanc_under_tests_exe=/home/alain/o/build/orthanc/Orthanc \ | |
94 --orthanc_under_tests_http_port=8043 \ | |
95 --break_after_preparation \ | |
96 --break_before_preparation | |
97 | |
98 The test script will: | |
99 - generate 2 configuration file in the `configurations` folder, | |
100 - start your local Orthanc version to prepare the db with one of the configuration file, | |
101 - drive this Orthanc to prepare the DB | |
102 - interrupt and instruct you how to start your own version, pointing to the configuration file to use | |
103 - execute tests | |
490 | 104 |
105 | |
106 MaxStorageReject: | |
107 ------------------ | |
108 | |
109 Run the MaxStorageReject tests with your locally build version and break before and after preparation | |
110 and execution to allow you to start your debugger. | |
111 | |
112 python3 NewTests/main.py --pattern=MaxStorageReject.test_max_storage_reject.TestMaxStorageReject.* \ | |
113 --orthanc_under_tests_exe=/home/alain/o/build/orthanc/Orthanc \ | |
114 --orthanc_under_tests_http_port=8043 \ | |
115 --plugin=/home/alain/o/build/orthanc-dicomweb/libOrthancDicomWeb.so \ | |
116 --break_after_preparation | |
117 |