Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started
Regression Testing and Reports
00:00
5 left

Regression Testing and Reports

MediumSQL · PostgreSQL

Problem

Tell me about your experience with regression testing and reporting.

For this SQL exercise, write a query that compares the two most recent completed regression runs. Identify tests that changed from passing in the previous run to failing in the latest run, while also reporting all tests executed in the latest run.

Output

  1. One row per test executed in the latest run.
  2. Columns: test_case_id, test_name, current_status, previous_status, and regression_detected.
  3. Sort by test_case_id ascending.

Schema

regression_runs
ColumnTypeDescription
run_idPKINTUnique regression run identifier
executed_atTIMESTAMPTime when the run was executed
completed_atTIMESTAMPTime when the run completed
environmentVARCHAR(30)Execution environment
regression_results
ColumnTypeDescription
result_idPKINTUnique test result identifier
run_idINTRegression run that produced the result
test_case_idINTTest case being reported
statusVARCHAR(20)Test outcome such as PASS, FAIL, or SKIPPED
test_cases
ColumnTypeDescription
test_case_idPKINTUnique test case identifier
test_nameVARCHAR(100)Descriptive test name
Tablesregression_runsregression_resultstest_cases
Interviewer

Your question is Regression Testing and Reports. Start with the requirements and the three tables in the Question tab.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.
CodePostgreSQL
You need to log in / sign up to run or submit.Ln 1
Run your query to see results here.