Mercurial > hg > orthanc-tests
view NewTests/README @ 486:6144ef431512
new tests for sequences in ExtraMainDicomTags
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 28 Jun 2022 18:38:21 +0200 |
parents | 45c3fe035fed |
children | 2078cb20a560 |
line wrap: on
line source
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: --------- with a local executable: 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/libDelayedDeletion.so \ --plugin=/home/alain/o/build/orthanc-gdcm/libOrthancGdcm.so with Docker: python3 NewTests/main.py --pattern=* \ --orthanc_under_tests_docker_image=osimis/orthanc:current \ --orthanc_previous_version_docker_image=osimis/orthanc:22.4.0 \ --orthanc_under_tests_http_port=8043 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 !!!! ExtraMainDicomTags: ------------------ Runs an Orthanc in Index Only mode while storing extra main dicom tags and perform various find (including DicomWeb). Run the ExtraMainDicomTags tests with your locally build version. python3 NewTests/main.py --pattern=ExtraMainDicomTags.* \ --orthanc_under_tests_exe=/home/alain/o/build/orthanc/Orthanc \ --orthanc_under_tests_http_port=8043 \ --plugin=/home/alain/o/build/orthanc-dicomweb/libOrthancDicomWeb.so \ --break_after_preparation The test script will: - generate 1 configuration file in the `configurations` folder, - interrupt and instruct you how to start your own version, pointing to the configuration file to use - execute tests