Splunk

VIZ TEST HARNESS

Local testing without Splunk

Panel Size
×
Visualization
Data
#
Data Fields
Formatter Settings

Help

Getting Started

  1. Select a visualization from the dropdown
  2. Adjust data fields using sliders, dropdowns, and text inputs
  3. Tweak formatter settings — the canvas re-renders in real-time
  4. Click Test No Data to verify the no-data message
  5. Resize the panel to test responsive behaviour

Theme

Use the sun/moon icon to toggle between light and dark mode. This changes both the harness UI and the theme reported to the visualization via getCurrentTheme(), so your viz renders in the correct mode.

Panel Size

Set exact dimensions with the width × height inputs, or click Fit to fill the available space. The visualization receives a reflow() call on resize.

Data Fields

These controls inject values into the Splunk-format data passed to the viz. Slider values update in real-time. Fields starting with _ are control fields (e.g., row count) that affect data generation but aren't data columns.

Formatter Settings

These mirror the viz's formatter.html settings. They map to config[ns + 'settingName'] in the viz JS. Defaults must match the JS fallback values.

Adding a New Viz

  1. Create a harness.json alongside your viz's formatter.html
  2. Add the viz name to harness-manifest.json

No changes to this HTML file needed.

Limitations

  • Data is static or slider-driven, not from live SPL
  • this.drilldown() is a no-op in the mock
  • Source loads via eval() — check the console for errors

See TEST-HARNESS.md for full documentation including harness.json schema, data modes, and troubleshooting.