Prerequisites
- Nextedy RISKSHEET version 23.10.5 or later
- Polarion Test Management configured in your project
- Test Runs linked to work items in your Risksheet
Add Test Results Column
Open yourrisksheet.json configuration and add a server-rendered column with the following structure:
Configuration Breakdown
serverRender property contains a Velocity macro that:
- Defines
getLastTestRecordmacro accepting the work item - Calls
$testManagementService.getLastTestRecords($item.getOldApi(), 1)to retrieve the most recent test record - Loops through test records using
#foreach - Fetches the Test Run object via
$transaction.testRuns().getBy().oldApiObject() - Renders the Test Run ID and result status (e.g., “TR-1234 - passed”)
Customize Result Display
You can modify the Velocity template to format results differently:Show Only Status
Add Conditional Formatting
Apply Column to Specific Levels
If your Risksheet uses hierarchical levels, specify which level displays the test results:level property controls at which hierarchy tier the column appears (typically level 2 for mitigation/task rows).
Verification
- Save your
risksheet.jsonconfiguration - Reload your Risksheet document
- You should now see a Test Result column displaying test run IDs and status values like “TR-1234 - passed” or “TR-5678 - failed”
- Results update automatically when test runs are executed in Polarion
Common Use Cases
| Scenario | Configuration |
|---|---|
| Show last test status only | Remove $iRecord.getTestRun().getId() - from template |
| Display multiple test runs | Change getLastTestRecords(..., 1) to higher number |
| Filter by test type | Add conditional logic in Velocity macro |
| Show execution date | Access $iRecord.getExecuted() in template |
See Also
- Server Render Columns - Complete reference for server-rendered column types
- Velocity Template Context - Available Velocity objects and methods
- Custom Data Rendering - Advanced rendering techniques
- Branched Documents - Working with test results in branched revisions
Sources
Sources
KB Articles