Truncate ${failedEventsSummary} in reporter message

tomasu Registered Posts: 3


I currently have a reporter sending run reports via teams message. I've recently discovered that some of the reporters are failing silently due to the variable ${failedEventsSummary} being too long. I've tried treating the variable like a large string and manually truncating (failedEventsSummary[:100]) but it just prints that code in the message.

Any help would be much appreciated!

Best Answer

  • tomasu
    tomasu Registered Posts: 3
    Answer ✓

    Of course minutes after posting I figure it out. I'll leave this here just in case anyone else has this issue.

    The solution is to use the DSS function get:

    "value": "${get(failedEventsSummary, 0, 500)} ..."

    This will return the first 501 characters follow by " ... "

Setup Info
      Help me…