The two test tools let you try PacsSwitch without real modalities or a real PACS. The Test Sender plays the modalities and the RIS: it sends DICOM images, worklist and archive queries, and HL7 messages to the ports of a scenario. The Test Listener plays the PACS, the worklist server and the HL7 receiver at the destinations. Both can also cause faults on purpose, so you can see how PacsSwitch and its monitoring react.

Use them on test systems. The tools make real network traffic and can send thousands of images. Point the Test Sender at a test PacsSwitch server or a test scenario, and never let a test scenario send to a production PACS. All patients in the tools are made up.

Getting started

  • The tools are an optional part of the PacsSwitch setup (Test tools); they need no further installation and run on any Windows PC or server. Start them from the Start menu: PacsSwitch Test Sender and PacsSwitch Test Listener.
  • A typical lab uses three machines: the PacsSwitch server, a PC with the Test Sender, and a PC with the Test Listener at the destination addresses of the scenario. For a quick look, both tools can also run on one PC against a loopback test scenario (Test Listener: Settings > General > Create loopback test scenario).
  • Both tools read the PacsSwitch scenario: the Test Sender connects to every port PacsSwitch listens on, and the Test Listener opens every destination port.

Where the tools get the scenario

In Settings > Scenario source of either tool, choose:

SourceHow
A PacsSwitch serverType its status page address and click Test. On the PacsSwitch server, turn on Publish the active configuration for the DTRS test tools (Settings > Integration). The tools then follow every scenario switch.
A regionType the schedule server's address and click Read the server list; tick the servers to use.
A scenario fileA .conf file, or the active one over the network, for example \\pacsswitch01\c$\ProgramData\PacsLogic\DTRS4\nginx\conf\active_rules.conf.

When the scenario changes, the tools can do nothing, ask, or load it by themselves. When the status page uses HTTPS with a self-signed certificate, use Trust the server certificates....

The Test Sender

The Test Sender in automated mode with 6 modalities and 2 HL7 senders: the tiles with conversations, data sent, DICOM associations, studies stored and HL7 messages, the bar chart per port, the port list, the automated, one-at-a-time and fault controls, and the activity log.

The list shows every PacsSwitch port of the scenario: the rule, the address it connects to, what it sends there, and how many conversations are active, sent and answered, with the last result. The tiles and the bar chart at the top show active connections, conversations, data sent and received back, DICOM associations, studies stored, HL7 messages, and faults and errors; Clear statistics sets them back to zero.

ModeWhat it does
AutomatedRuns many simulated clients at once: Modalities, HL7 senders and Raw clients, with a pause between each client's conversations (Wait min / max). Fault rate gives a share of the conversations a fault, picked from the ticked fault types. Start and Stop all.
One at a timeRun once on selected runs one normal conversation on each selected port (or double-click a port). Run with this fault runs one conversation with the chosen fault.
Step by stepStep by step on this port... opens a window that sends one message at a time and shows every message decoded (below).

Step by step

  1. Pick the port, the modality profile and the source address.
  2. Click Connect + associate; the window shows whether the association was accepted or rejected.
  3. Send one thing at a time: a C-ECHO, a worklist or archive query (editable before sending), images, or an HL7 message.
  4. Finish with Release, an A-ABORT, or a close without release.
The Step by step window: an association on the MWL Queries port with profile CT1, the worklist query MWL_ByStationAE_Today with its keys, the matches found, the exam and image controls, and the decoded answers in the activity log.

Modality profiles and realistic studies

Each simulated modality is a modality profile (Settings > Modality profiles): its name, calling AE title, called AE titles, station name, modalities, image size, and how often automated mode uses it. Add a profile offers presets such as CT, MR, ultrasound, mammography and an X-ray room, and Import AE titles... makes profiles from a list of your real modalities' AE titles.

The Test Sender builds studies that look like real ones: about 140 exam types with their series, up to 5000 images per study, prior studies, study dates over a chosen number of days, and an accession and Patient ID prefix (Settings > Studies) so test studies are easy to find and remove on a test PACS.

Faults the Test Sender can cause

FaultWhat the Test Sender does
Silent dropStops talking and leaves the connection open (15 minutes to begin with), until PacsSwitch's idle time closes it. Close stale connections ends them early.
Hard resetResets its connection part-way through.
Connect and never sendOpens a connection and sends nothing.
Slow trickleSends 64 bytes at a time with long pauses, like a poor wireless link.
Reconnect stormOpens 20 quick connections in a row.
Truncated messageSends part of a message, then closes.
A-ABORT part-way, close without A-RELEASEEnds the DICOM association abnormally.

The Test Listener

The Test Listener with the sample scenario: the tiles with ports listening, connections, data received, DICOM associations and HL7 messages, the bar chart with port 12001 shown as SLOW, the port list, the behavior, outage and preset controls, and the activity log.

The list shows every destination port of the scenario: its status, the rules that send to it, the protocol, the current behavior, and its connections and data. The Test Listener answers like a PACS: it accepts images and keeps them in a small archive, answers worklist and archive queries, and acknowledges HL7 messages. HL7 orders (ORM) add worklist items, so an order sent by the Test Sender shows up in a later worklist query. Worklist and archive... shows what it answers with; clear old orders and images there before a worklist test.

Port behaviors (PACS faults)

Select one or more ports, pick a behavior, set its numbers if it uses them, and click Apply to selected or Apply to all ports. A behavior stays until you set the port back to Normal.

BehaviorWhat the Test Listener does
NormalAnswers everything.
HungAccepts the connection, then stays silent.
Reset after N KB or N secondsResets the connection when a limit is reached.
Black holeNew connections time out.
Connection limitCloses connections beyond N at once.
Reject associationsRejects every DICOM association.
Slow answersWaits N milliseconds before each answer.
Never answer C-FINDAccepts worklist and archive queries and never answers.
HL7 error or reject ACKAnswers HL7 messages with AE or AR.
A-ABORT after N KBAborts the association after N KB.

Presets set all ports in one click: PACS reboot, PACS hang, Slow PACS, Worklist server ignores queries, and Everything normal. Outages take selected ports down for 30 seconds to 10 minutes, or until resumed, optionally dropping their open connections like a rebooting PACS; Random outages take a port down now and then on their own.

In Settings > DICOM, the accepted called AE titles can be limited, to test a modality that uses the wrong AE title, or the called AE title rewrite.

What to try

GoalHowWhere to look in PacsSwitch
Traffic passesTest Sender: Run once on every port, then automated mode.Port Proxy Status, Connection History
A scenario switchAutomated mode running; activate the Backup scenario, with a second Test Listener at the Backup addresses.The Test Listeners: new conversations move to the Backup, open ones finish
The PACS goes downTest Listener: take a port down for 2 minutes.Port Proxy Status, Server Health, health alert email
A worklist with no resultsTest Sender: query a station AE title with no items, with a capture running.The Capture Viewer's hints and Re-run query
A refused clientBlock the Test Sender's address in a rule (Guided Edit), then Run once.Connection History: 403
DICOM TLS passes throughSee DICOM TLS and HL7 over TLS below.Connection History: 200; both tools' logs show the TLS session
PacsSwitch passes TCP connections through, so a failure inside the DICOM or HL7 conversation, such as a rejected association or an HL7 error ACK, still shows as a successful session (200) in Connection History. Use a capture to see the conversation itself.

DICOM TLS and HL7 over TLS

From version 2.3.3 the tools can talk DICOM and HL7 over TLS 1.2, to show that PacsSwitch passes an encrypted connection through unchanged: the TLS session runs from the Test Sender to the Test Listener, and PacsSwitch only relays the bytes.

  1. On the Test Listener, open Settings > TLS, click Create a test certificate (or choose a certificate from the list) and click OK. The Test Listener now answers a TLS connection on any of its ports with TLS, and a plain connection as before.
  2. On the Test Sender, right-click a port and choose Use TLS on this port (or list the ports in Settings > TLS). The Sends column shows DICOM + TLS or HL7 + TLS.
  3. Click Run once. Both logs show a TLS line with the TLS version, the cipher and the certificates; the images, queries or HL7 messages go through as usual.

By default the Test Sender accepts the Test Listener's certificate as it is, because a test certificate is self-signed. Tick Check the destination's certificate to require a certificate Windows trusts. For a destination that asks for a client certificate (mutual TLS), choose one in the Test Sender's Settings > TLS; the Test Listener can ask for one too.

A rule with the called AE title rewrite needs plain DICOM, because PacsSwitch changes the called AE title inside the association. A capture of a TLS connection records who connected, when, for how long and how much data, but the conversation itself is encrypted, so the Capture Viewer cannot show its DICOM or HL7 messages.

DSFX Send simulator (2.4)

The Test Sender's DSFX Send simulator... sends the events DSFX Send sends to the DSFX Send audit log, from simulated workstations, without moving images.

  1. Enter the settings address, https://<PacsSwitch server>/dsfx_audit.json, and click Fetch settings. Tick Accept an untrusted PacsSwitch certificate for a lab server with a self-signed certificate.
  2. Choose how many workstations to simulate, their names, user, version and mode.
  3. Send single events (searches, sends, partial, failed and cancelled sends, program start, settings change), or start the generator.
  4. Try the fault cases: each one names the check the PacsSwitch checker must report (bad_mac, duplicate, clock, gap, unknown_key) or the answer nginx must give (413 for an oversized event, 503 for some of a burst, a refusal over plain HTTP).

Events are queued and delivered every 2 seconds, or every 30 seconds while the server does not answer, like DSFX Send. With Step by step: log each C-FIND as a DSFX Send search event ticked, each real C-FIND sent in Step by step is also recorded as a search event (keep the simulator open: it delivers them).

Logs, settings and templates

  • The activity log at the bottom of each window shows connections, DICOM and HL7 steps, faults and errors (each can be switched on or off), and can be saved to a file. Details shows every message, but slows the window under load; use it only for short runs.
  • Both tools keep their settings in DTRS_TestTools.ini next to the programs.
  • Worklist items, archive studies, queries, image attributes, HL7 messages and the made-up patients are plain text files in the Templates folder, with a README.txt that describes them. Restore missing templates puts back any that were deleted.

Related pages

This page was revised 2026-11-04.


← LicenseAppendix A. Version history →