Mercurial > hg > orthanc-tests
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NewTests/README Sat Apr 30 19:38:34 2022 +0200 @@ -0,0 +1,61 @@ +This is a new set of tests directly written in python3. They should be able to handle +more complex scenarios like upgrades or change of configurations. + +Prerequisites: +============= + +These tests use python3 and require some modules define in requirements.txt. Therefore, you need +to first execute + +pip3 install -r requirements.txt + +Introduction: +============ + +You may use these tests to debug Orthanc on your machine. In this case, there is +usually a `preparation` phase and `execution` phase. You are usually able to +interrupt the tests between these 2 phases such that you can start your debugger. +Use the `--break_after_preparation` option to do so. +As well, you may skip the preperation phase thanks to the `--skip_preparation` option. + +The orthanc that is being tested is called the `orthanc-under-tests`. + +Examples: +======== + +All-tests: +--------- + +python3 NewTests/main.py --pattern=* \ + --orthanc_under_tests_exe=/home/alain/o/build/orthanc/Orthanc \ + --orthanc_under_tests_http_port=8043 \ + --plugin=/home/alain/o/build/orthanc/libHousekeeper.so \ + --plugin=/home/alain/o/build/orthanc-gdcm/libOrthancGdcm.so + + +Housekeeper: +----------- + +Run the Housekeeper tests with your locally build version and break between preparation +and execution to allow you to start your debugger. + +python3 NewTests/main.py --pattern=Housekeeper.test_housekeeper.TestHousekeeper.test_before_after_reconstruction \ + --orthanc_under_tests_exe=/home/alain/o/build/orthanc/Orthanc \ + --orthanc_under_tests_http_port=8043 \ + --plugin=/home/alain/o/build/orthanc/libHousekeeper.so \ + --break_after_preparation + +The test script will: +- generate 2 configuration file in the `configurations` folder, +- start your local Orthanc version to prepare the db with one of the configuration file, +- drive this Orthanc to prepare the DB +- interrupt and instruct you how to start your own version, pointing to the configuration file to use +- execute tests + + + +TODO: implement and document usage with Docker !!!! + + + +