comparison 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
comparison
equal deleted inserted replaced
472:d9ceb0fd5995 473:4ee85b016a40
1 This is a new set of tests directly written in python3. They should be able to handle
2 more complex scenarios like upgrades or change of configurations.
3
4 Prerequisites:
5 =============
6
7 These tests use python3 and require some modules define in requirements.txt. Therefore, you need
8 to first execute
9
10 pip3 install -r requirements.txt
11
12 Introduction:
13 ============
14
15 You may use these tests to debug Orthanc on your machine. In this case, there is
16 usually a `preparation` phase and `execution` phase. You are usually able to
17 interrupt the tests between these 2 phases such that you can start your debugger.
18 Use the `--break_after_preparation` option to do so.
19 As well, you may skip the preperation phase thanks to the `--skip_preparation` option.
20
21 The orthanc that is being tested is called the `orthanc-under-tests`.
22
23 Examples:
24 ========
25
26 All-tests:
27 ---------
28
29 python3 NewTests/main.py --pattern=* \
30 --orthanc_under_tests_exe=/home/alain/o/build/orthanc/Orthanc \
31 --orthanc_under_tests_http_port=8043 \
32 --plugin=/home/alain/o/build/orthanc/libHousekeeper.so \
33 --plugin=/home/alain/o/build/orthanc-gdcm/libOrthancGdcm.so
34
35
36 Housekeeper:
37 -----------
38
39 Run the Housekeeper tests with your locally build version and break between preparation
40 and execution to allow you to start your debugger.
41
42 python3 NewTests/main.py --pattern=Housekeeper.test_housekeeper.TestHousekeeper.test_before_after_reconstruction \
43 --orthanc_under_tests_exe=/home/alain/o/build/orthanc/Orthanc \
44 --orthanc_under_tests_http_port=8043 \
45 --plugin=/home/alain/o/build/orthanc/libHousekeeper.so \
46 --break_after_preparation
47
48 The test script will:
49 - generate 2 configuration file in the `configurations` folder,
50 - start your local Orthanc version to prepare the db with one of the configuration file,
51 - drive this Orthanc to prepare the DB
52 - interrupt and instruct you how to start your own version, pointing to the configuration file to use
53 - execute tests
54
55
56
57 TODO: implement and document usage with Docker !!!!
58
59
60
61