annotate NewTests/README @ 473:4ee85b016a40

added NewTests framework - only the Housekeeper tests right now
author Alain Mazy <am@osimis.io>
date Sat, 30 Apr 2022 19:38:34 +0200
parents
children 6917a26881ed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
4ee85b016a40 added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff changeset
29 python3 NewTests/main.py --pattern=* \
4ee85b016a40 added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff changeset
30 --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
31 --orthanc_under_tests_http_port=8043 \
4ee85b016a40 added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff changeset
32 --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
33 --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
34
4ee85b016a40 added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff changeset
35
4ee85b016a40 added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff changeset
36 Housekeeper:
4ee85b016a40 added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff changeset
37 -----------
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 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
40 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
41
4ee85b016a40 added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff changeset
42 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
43 --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
44 --orthanc_under_tests_http_port=8043 \
4ee85b016a40 added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff changeset
45 --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
46 --break_after_preparation
4ee85b016a40 added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff changeset
47
4ee85b016a40 added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff changeset
48 The test script will:
4ee85b016a40 added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff changeset
49 - 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
50 - 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
51 - 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
52 - 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
53 - execute tests
4ee85b016a40 added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff changeset
54
4ee85b016a40 added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff changeset
55
4ee85b016a40 added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff changeset
56
4ee85b016a40 added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff changeset
57 TODO: implement and document usage with Docker !!!!
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
4ee85b016a40 added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff changeset
60
4ee85b016a40 added NewTests framework - only the Housekeeper tests right now
Alain Mazy <am@osimis.io>
parents:
diff changeset
61