Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started
Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
Experiences
Practice
Mock InterviewsTimed interview simulations with feedbackSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Build my plan
Automated Test Strategy for Web Apps
00:00
5 left

Automated Test Strategy for Web Apps

HardSQL · PostgreSQL

Problem

Describe how you would design an automated test strategy for a web application with frontend and backend components, including what tools you would use, how you would structure test cases, manage test data, and integrate tests into a CI/CD pipeline.

For this SQL exercise, use the provided test case, test run, and test result data to identify automated tests that require attention based on recent CI history.

Output

  1. Return one row per test with at least two executions in the three most recent completed CI runs, where the latest result failed and the failure rate is at least 50%.
  2. Return case_id, test_name, component, failure_count, execution_count, failure_rate, latest_status, and latest_run_id.
  3. Order by failure_rate descending, then test_name ascending.

Schema

test_cases
ColumnTypeDescription
case_idPKINTUnique automated test case identifier
test_nameVARCHAR(150)Name of the automated test
componentVARCHAR(30)Application layer tested
automation_toolVARCHAR(40)Tool used to execute the test
test_runs
ColumnTypeDescription
run_idPKINTUnique CI test run identifier
started_atTIMESTAMPRun start timestamp
statusVARCHAR(20)Lifecycle status of the run
environmentVARCHAR(30)Execution environment
triggerVARCHAR(30)Event that started the run
test_results
ColumnTypeDescription
result_idPKINTUnique test result identifier
run_idINTReference to the CI test run
case_idINTReference to the automated test case
statusVARCHAR(20)Result status
duration_msINTExecution duration in milliseconds
error_categoryVARCHAR(40)Classified failure reason
Tablestest_casestest_runstest_results
Interviewer

Your question is Automated Test Strategy for Web Apps. 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
Sign up free to run your codeLog inLn 1
Run your query to see results here.