Write a SQL query to compare current and previous test run results by date.
Return comparisons for every run that has a previous run. Include tests present in either run, including tests missing from one side. Treat a test with no previous result as newly observed and a test with a NULL current status as unknown.
Output
- One row per test case and current run, with
current_run_date, previous_run_date, test_case_id, test_name, previous_status, current_status, previous_duration_ms, current_duration_ms, duration_delta_ms, and status_change.
- Order by
current_run_date, then test_case_id.