Prerequisites
- A sheet configuration and its data model that you can edit in the configuration editor
- An entity type for your test cases in that data model
- Test runs in the same project as the sheet, holding records of those test cases — records of test runs in other projects are not read
Nothing here is saved from the sheetTest records are read-only.
The sheet shows them and never writes them, so this setup adds no editable cells and no data to save from the sheet.
1
Relate Test Records to the Test Case Type
In the data model, add a relationship between your test case type and This gives the test case the navigation property The rest of this guide uses the default name,
TestRecord with storage: TestRecords.
No linkRole and no cardinality are needed, and TestRecord does not have to be declared under domainModelTypes:testRecords, and each record the navigation property testRun to the test run that holds it.To use other names, set them on the relationship.
direct.name names the navigation on the from type and back.name the one on the to type:testRecords.2
Expand the Records in the Source
In the sheet configuration, expand If your test cases are reached from another type — requirements, for example — put the same
testRecords under the test case, and testRun beneath it if you want to show which test run each record belongs to:testRecords entry under the expand that reaches the test case.3
Add Columns for the Record
Bind columns to the record’s properties with the The properties a record offers are
testRecords path:result, executed, executedBy, duration and comment.
See Data Model Types for what each one holds.4
Choose How Many Records Each Test Case Shows
Without further configuration, each test case shows its newest record only.
To show more of the history, set Records come newest first, so
query.take on the testRecords expand to the number of records to keep per test case:take: 5 keeps the five most recent executions of each test case.
A larger count loads more rows for every test case in the sheet, so keep it to the history your users read.Show the Records of One Test Run
To narrow the sheet to a single test run, filter thetestRecords expand by the record’s key to its run, testRunId, which holds the test run’s ID.
Reading the value from a URL parameter lets one sheet serve any run:
- Opened with
…&testRun=<test run ID>in the URL, the sheet shows only the records of that run. - Opened without the parameter, the condition is dropped and each test case shows its newest record, whichever test run holds it.
- Every test case stays in the sheet either way. One that the run holds no record of shows no record rows.
take beside the where to see more than the newest of them — the count applies to the records the filter leaves.
To filter by a field of the test run instead of its ID, put the where on the testRun expand:
id and title.
To filter by another field such as status, declare the type and list the field — see Data Model Types.
Troubleshooting
See Also
- Test Records — what test records are and which of them a sheet loads
- Expand Clause —
query.takeandquery.whereon an expand - Open a Scoped Sheet with URL Parameters — reading URL parameters in a sheet configuration
- Configure Sources — sources, queries and expansion paths