The custom reporting within SpiraTest or SpiraTeam makes this very easy.

For example, the following query will return back a list of all the test runs in the current project that failed today and previously passed yesterday:

SELECT VALUE R1 FROM SpiraTestEntities.R_TestRuns AS R1 
WHERE R1.PROJECT_ID = ${ProjectId}
AND R1.EXECUTION_STATUS_ID = 1 and TruncateTime(R1.END_DATE) = TruncateTime(CurrentUtcDateTime())
AND R1.TEST_CASE_ID IN (
SELECT VALUE R2.TEST_CASE_ID FROM SpiraTestEntities.R_TestRuns AS R2 
WHERE R2.PROJECT_ID = ${ProjectId}
AND R2.EXECUTION_STATUS_ID = 2 AND TruncateTime(R2.END_DATE) = TruncateTime(AddDays(CurrentUtcDateTime(), -1)))

To use this query:

  1. Go to Administration
  2. Click on System > Edit Reports
  3. Create a new report
  4. Enter the name of the report
  5. Select the output formats (e.g. MS-Excel)
  6. Add a new custom section
  7. Enter the query from above
  8. Click the button to create the Default Template
  9. Save the section and the entire report.
  10. Now you can run this report

One of our customers (thanks Walter) modified this further to allow you to correlate the results by test set:

SELECT VALUE R1.TEST_CASE_ID
FROM SpiraTestEntities.R_TestRuns AS R1, SpiraTestEntities.R_TestRuns AS R2 
WHERE R1.TEST_SET_ID = R2.TEST_SET_ID 
AND R1.PROJECT_ID = ${ProjectId} 
AND R2.PROJECT_ID = ${ProjectId} 
AND R1.EXECUTION_STATUS_ID = 1 
AND R2.EXECUTION_STATUS_ID = 2 
AND TruncateTime(R1.END_DATE) = TruncateTime(CurrentUtcDateTime()) 
AND TruncateTime(R2.END_DATE) = TruncateTime(AddDays(CurrentUtcDateTime(), -1))