Skip to main content
A test record is one execution of a test case inside a Polarion test run: the result, when it was executed, by whom, how long it took, and the comment written beside the verdict. Powersheet can load these records as data beneath each test case, so a sheet that traces requirements to test cases can also show whether those test cases were executed and how they ended.

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 with storage: 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:
From this, Powersheet derives three entity types and the navigation between them: 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 the testRecords 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.take on 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.
A test case that no test run holds a record of stays in the sheet, with no record rows beneath it.

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