Skip to Content
UNS ManagerUNS test

UNS test — /uns/live-test

A finished test: steps with timings, counters and the SSE frame of a received value
A finished test: steps with timings, counters and the SSE frame of a received value

The dashboards and the Namespace Explorer receive values live through a channel open with the UNS process (cms-uns). When a dashboard shows Live dimmed, or the values do not change, this screen tells you at which point the channel fails.

It opens the same channel, along the same path — nginx up to cms-uns, with your session, the license and your UNS role —, and shows each step with the time it took, the counters and every event that arrives.

The screen is under Integration Tests › UNS test, next to the Test Bench and the Simulators. It used to be a tab of UNS Settings; the old address leads here. It follows the /uns Tool and only shows up with the UNS module in the license.

Running a test

FieldWhat it holds
Variables to watch (optional, up to 20)Choose UNS variables… opens the variables popup (browse by branch, filter by type). The popup stays open so you can pick several; the x on each one removes it from the list. With no variables, the test only checks the heartbeat
Duration30 s, 60 s, 120 s or 300 s. The test stops by itself at the end

Start test begins; Stop ends it early. The bar shows the elapsed time. With the UNS process down, the button is disabled and the screen warns: “The UNS process is down: nobody would answer the channel.”

The process sends a heartbeat as soon as the channel opens and then every 15 seconds. With variables chosen, it first sends the current value of each one and then every change — only for the ones your role lets you read.

The steps

StepTurns OK whenIf it fails
SessionThere is an open session. The token goes in the header, never in the URL“No session: sign in again.”
Channel connectionThe channel answers successfully (the HTTP status shows next to it, with the time)Shows the HTTP status and the error message (see below)
Response type (SSE)The response is text/event-streamShows the type that arrived: something along the path answered in place of the channel
First signalThe first event arrived, with the time until it“No event arrived in the period.”
Variable valuesEvery chosen variable received a value (“N of N variable(s) with a value received”)The missing ones have no value yet or are outside your role. With no variables, the step is skipped
Continuity (heartbeats)The heartbeats expected for the duration arrived, with a tolerance of oneToo few heartbeats, or “The server closed the channel before the end of the test”

Below the steps, the counters: Events, Heartbeats, Values and the total Received.

The events

Events received lists each event as it arrives: the number, the time since the start, the type (batimento, estado or another), the summary — for a value, the topic, the value and the quality — and the size. The list keeps the last 300.

Clicking an event shows it on the right (without clicking, it shows the last one):

  • Content (data): the event JSON, formatted, with Copy;
  • SSE frame received: exactly what came through the channel, with the size in bytes.

How to read a failure

What shows upLikely causeWhat to do
Connection with HTTP 502The cms-uns container is stopped, or nginx cannot reach itBring cms-uns up and check the Installation page of UNS Settings
Connection with HTTP 401Expired session or inactive userSign in again
Connection with HTTP 403The UNS module is not in the licenseCheck the license
Response type other than text/event-streamA proxy along the path answered with something else (error page, login)Check the proxy between the browser and the CMS
Connected, but no event arrivedA proxy is holding the response in a bufferThe /api/uns/live/ path must go through without buffering and without compression
Continuity failed with “The server closed the channel”cms-uns restarted or the connection was cut midwayCheck the logs of cms-uns and of the proxy
Values with variables missingThe variable has no value yet, or your role does not read itLook at the variable in the Namespace Explorer and at the roles in UNS access

The test uses your role. A variable that arrives here may not arrive for another person, and vice versa: to check what another person sees, run the test with their user.