Why Test Records Are Data
A test record is not a work item. Polarion keeps it inside its test run, with no ID and no permissions of its own, so it cannot be reached through a link role the way a requirement reaches its test case. Powersheet therefore treats test records as a separate kind of relationship. The data model relates a test case type to a test record type withstorage: TestRecords instead of a link role, and the records then behave like any other expanded level of the sheet: they load with the rest of the sheet’s data, and their columns bind with ordinary binding paths.
The alternative — a server-rendered property that looks the results up with a script — puts rendered text into a cell.
A test record level gives the sheet the values themselves: a result, a date, a test run.
What a Model Has to Declare
The relationship is the only thing a model must add. Relating a test case type to a name the model does not define makes that name the test record type, with every property a record has:
A model can also declare the test record and test run types itself, to pick which properties they carry or to give them other names.
See Data Model Types for the properties of each and Relationships for the relationship.
What a Sheet Loads
A sheet loads the records by expanding thetestRecords navigation property under the test case, as it would expand any one-to-many relationship.
Three rules decide which records arrive:
- Newest first. A test case’s records are ordered by execution date, newest first, across all its test runs. Records that were not executed yet come last.
- The newest one, unless the sheet asks for more. Without a count, each test case shows only its most recent record — the last execution, not the history. A
query.takeon the expand raises the count per test case. See Expand Clause. - Only the sheet’s project. Records are read from test runs of the project the sheet belongs to.
- Only the Collection’s test runs, in a Collection. When the sheet reads a Collection, a test case’s records are those of the test runs that Collection holds.
What Test Records Cannot Do
- They are read-only. A record comes into being when a test is executed in Polarion. A sheet shows it and cannot change or delete it, and a data model cannot make the type updatable or deletable.
- They are read beneath a test case only. Neither a test record nor a test run can be the root entity of a source, and a test run does not list its records.
- Nothing expands beneath a test run. The only thing a sheet can expand under a test record is its test run.
See Also
- Show Test Results Next to Test Cases — set up the model and the sheet step by step
- Data Model Types — the properties a test record and a test run carry
- Relationships — the
TestRecordsstorage value - Expand Clause —
query.takeon the test records expand - Entity Types and Relationships — how entity types and relationships form a data model