1 | initial version |
To make the text and background of a cell in a statistics table turn red in JMeter HTML Dashboard Report, if the response time exceeds the threshold value, follow these steps:
Here is an example of the HTML template modification:
<td class="${stat.statErrorPct > ${threshold} ? 'failText' : ''}">
${stat.statErrorPct}
</td>
In this example, the "if" condition checks whether the "statErrorPct" statistic value exceeds the "threshold" value set in the Report generation properties. If it does, the class "failText" is added to the HTML tag, which is defined in the CSS stylesheet as having red text and background style:
.failText {
background-color: red;
color: white;
}