Test Records query extender
The TEST_RECORDS keyword, with parameters, can be used in the Work Items Table view to search for Work Items such as test cases, or defects, according to Test Records — to find items matching such descriptions as "failed test cases executed by me in last week", or "defects triggered by test cases", to cite just two of many possible examples.. It bypasses the usual Lucene query engine and queries the index of the SQL database layer.
Syntax and parameters
TEST_RECORDS:(testrunId, result, executedBy, executed)
The ID of a Test Run, qualified with the ID of a project. For example: PRJ1/TR-200
An option from the Result enumeration (configured in Administration > Testing). Accepts wildcard '*' (meaning 'any').
The ID of a user who ran the Test Run. Accepts wildcard * (meaning "any").
Time frame of the Test Run execution. Can be a single date or date range. Accepts wildcard '*' (meaning 'any').
Examples
TEST_RECORDS:(proj1/testRun1, "good result, but not enough")
TEST_RECORDS:(proj1/testRun1, failed,*, 20120130)
TEST_RECORDS:("proj1/testRun1", failed,johndoe, 20120101 TO 20120201)
The following table shows several examples for the TEST_RECORDS element.
Example | Notes |
---|---|
TEST_RECORDS:("myProject/Smoke21","failed") | Finds all failed test cases in Test Run Smoke21 |
TEST_RECORDS:("myProject/Smoke22","failed",*,*,true) | Finds all Defects linked from failed test records for Test Run Smoke22 |
TEST_RECORDS:("myProject/Smoke23",*,"johnd","20190702 TO 20190703") | Finds all test cases of Test Run Smoke23 that were executed by user johnd on 2nd or 3rd July, 2019 |
The TEST_RECORDS element may be used as a subquery inside another query. For example:
TEST_RECORDS:("myProject/FullTest15","failed") AND severity:smoke AND (assignee.id:johnd OR assignee.id:janeb)