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.
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:
| Source | How |
|---|---|
| A PacsSwitch server | Type 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 region | Type the schedule server's address and click Read the server list; tick the servers to use. |
| A scenario file | A .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 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.
| Mode | What it does |
|---|---|
| Automated | Runs 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 time | Run 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 step | Step by step on this port... opens a window that sends one message at a time and shows every message decoded (below). |
Step by step
- Pick the port, the modality profile and the source address.
- Click Connect + associate; the window shows whether the association was accepted or rejected.
- Send one thing at a time: a C-ECHO, a worklist or archive query (editable before sending), images, or an HL7 message.
- Finish with Release, an A-ABORT, or a close without release.

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
| Fault | What the Test Sender does |
|---|---|
| Silent drop | Stops 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 reset | Resets its connection part-way through. |
| Connect and never send | Opens a connection and sends nothing. |
| Slow trickle | Sends 64 bytes at a time with long pauses, like a poor wireless link. |
| Reconnect storm | Opens 20 quick connections in a row. |
| Truncated message | Sends part of a message, then closes. |
| A-ABORT part-way, close without A-RELEASE | Ends the DICOM association abnormally. |
The Test Listener

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.
| Behavior | What the Test Listener does |
|---|---|
| Normal | Answers everything. |
| Hung | Accepts the connection, then stays silent. |
| Reset after N KB or N seconds | Resets the connection when a limit is reached. |
| Black hole | New connections time out. |
| Connection limit | Closes connections beyond N at once. |
| Reject associations | Rejects every DICOM association. |
| Slow answers | Waits N milliseconds before each answer. |
| Never answer C-FIND | Accepts worklist and archive queries and never answers. |
| HL7 error or reject ACK | Answers HL7 messages with AE or AR. |
| A-ABORT after N KB | Aborts 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
| Goal | How | Where to look in PacsSwitch |
|---|---|---|
| Traffic passes | Test Sender: Run once on every port, then automated mode. | Port Proxy Status, Connection History |
| A scenario switch | Automated 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 down | Test Listener: take a port down for 2 minutes. | Port Proxy Status, Server Health, health alert email |
| A worklist with no results | Test Sender: query a station AE title with no items, with a capture running. | The Capture Viewer's hints and Re-run query |
| A refused client | Block the Test Sender's address in a rule (Guided Edit), then Run once. | Connection History: 403 |
| DICOM TLS passes through | See DICOM TLS and HL7 over TLS below. | Connection History: 200; both tools' logs show the TLS session |
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.
- 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.
- 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.
- 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.
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.
- 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. - Choose how many workstations to simulate, their names, user, version and mode.
- Send single events (searches, sends, partial, failed and cancelled sends, program start, settings change), or start the generator.
- 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.ininext to the programs. - Worklist items, archive studies, queries, image attributes, HL7 messages and the made-up patients are plain text files in the
Templatesfolder, with aREADME.txtthat describes them. Restore missing templates puts back any that were deleted.
Related pages
- Scenarios: create, test and activate
- Captures and the Capture Viewer
- Settings: Integration
- Connection History
This page was revised 2026-11-04.