|
PACS System 0.1.0
PACS DICOM system library
|
Common test fixtures and utilities for integration tests. More...
#include "kcenon/pacs/core/dicom_dataset.h"#include "kcenon/pacs/core/dicom_file.h"#include "kcenon/pacs/core/dicom_tag_constants.h"#include "kcenon/pacs/network/association.h"#include "kcenon/pacs/network/dicom_server.h"#include "kcenon/pacs/network/server_config.h"#include "kcenon/pacs/services/storage_scp.h"#include "kcenon/pacs/services/storage_scu.h"#include "kcenon/pacs/services/verification_scp.h"#include "test_data_generator.h"#include <array>#include <atomic>#include <chrono>#include <cstdio>#include <cstdlib>#include <filesystem>#include <memory>#include <random>#include <sstream>#include <string>#include <thread>#include <vector>#include <arpa/inet.h>#include <cerrno>#include <csignal>#include <fcntl.h>#include <netinet/in.h>#include <sys/socket.h>#include <sys/wait.h>#include <unistd.h>

Go to the source code of this file.
Classes | |
| class | kcenon::pacs::integration_test::test_server |
| RAII wrapper for a test DICOM server. More... | |
| class | kcenon::pacs::integration_test::test_association |
| Helper for establishing test associations. More... | |
| class | kcenon::pacs::integration_test::test_directory |
| RAII wrapper for temporary test directory. More... | |
| class | kcenon::pacs::integration_test::test_counter |
| Thread-safe test result counter. More... | |
| struct | kcenon::pacs::integration_test::process_result |
| Result of a process execution. More... | |
| class | kcenon::pacs::integration_test::process_launcher |
| Cross-platform process launcher for binary integration testing. More... | |
| class | kcenon::pacs::integration_test::background_process_guard |
| RAII wrapper for a background process. More... | |
Namespaces | |
| namespace | kcenon |
| namespace | kcenon::pacs |
| namespace | kcenon::pacs::integration_test |
Functions | |
| bool | kcenon::pacs::integration_test::is_ci_environment () |
| Check if running in a CI environment. | |
| std::chrono::milliseconds | kcenon::pacs::integration_test::default_timeout () |
| Default timeout for test operations (5s normal, 30s CI) | |
| std::chrono::milliseconds | kcenon::pacs::integration_test::server_ready_timeout () |
| Port listening timeout for pacs_system servers (5s normal, 30s CI) | |
| std::chrono::milliseconds | kcenon::pacs::integration_test::dcmtk_server_ready_timeout () |
| Port listening timeout for DCMTK servers (10s normal, 60s CI) | |
| bool | kcenon::pacs::integration_test::supports_real_tcp_dicom () |
| Check if pacs_system supports real TCP DICOM connections. | |
| std::string | kcenon::pacs::integration_test::generate_uid (const std::string &root="1.2.826.0.1.3680043.9.9999") |
| Generate a unique UID for testing. | |
| bool | kcenon::pacs::integration_test::is_port_available (uint16_t port) |
| Check if a port is actually available by attempting to bind. | |
| uint16_t | kcenon::pacs::integration_test::find_available_port (uint16_t start=default_test_port, int max_attempts=200) |
| Find an available port for testing. | |
| template<typename Func > | |
| bool | kcenon::pacs::integration_test::wait_for (Func &&condition, std::chrono::milliseconds timeout, std::chrono::milliseconds interval=std::chrono::milliseconds{50}) |
| Wait for a condition with timeout. | |
| template<typename Func > | |
| bool | kcenon::pacs::integration_test::wait_for (Func &&condition) |
| Wait for a condition with default timeout. | |
| core::dicom_dataset | kcenon::pacs::integration_test::generate_ct_dataset (const std::string &study_uid="", const std::string &series_uid="", const std::string &instance_uid="") |
| Generate a minimal CT image dataset for testing. | |
| core::dicom_dataset | kcenon::pacs::integration_test::generate_mr_dataset (const std::string &study_uid="") |
| Generate a MR image dataset for testing. | |
| core::dicom_dataset | kcenon::pacs::integration_test::generate_xa_dataset (const std::string &study_uid="") |
| Generate a XA (X-Ray Angiographic) image dataset for testing. | |
| core::dicom_dataset | kcenon::pacs::integration_test::generate_worklist_item () |
| Generate a worklist item dataset. | |
Variables | |
| constexpr uint16_t | kcenon::pacs::integration_test::default_test_port = 41104 |
| Default test port range start (use high ports to avoid conflicts) | |
| constexpr const char * | kcenon::pacs::integration_test::test_scp_ae_title = "TEST_SCP" |
| Default AE titles. | |
| constexpr const char * | kcenon::pacs::integration_test::test_scu_ae_title = "TEST_SCU" |
Common test fixtures and utilities for integration tests.
Provides reusable test fixtures, DICOM data generators, and utility functions for integration testing of PACS system components.
For comprehensive DICOM data generation, see test_data_generator.h which provides the test_data_generator class with support for:
Definition in file test_fixtures.h.