Spot test duration regressions
advanced Window functions Challenge 13 of 13
Your test suite is getting slower. Find the runs where a test took much longer than it did on the previous main build.
Requirements
- Only consider runs with
status'passed'on builds whosebranchis'main'. - For each such run, compare its
duration_mswith the same test’s previous run in that set (the closest earlier build). - Return runs that took more than 1.5 times as long:
title,build_id,previous_msandduration_ms. - Order by
build_id, thentitle.
Expected output
title | build_id | previous_ms | duration_ms Search by product name | 103 | 800 | 1300 Checkout with saved card | 105 | 4200 | 6900
Checks (3)
- ○Sample data
- ○A new main build slows down Add item to cart
- ○A slow run on a feature branch is ignored
Each check builds a fresh database and compares your result with the reference solution's: same number of columns in the same order (names are not checked), and the same rows in the same order.
Ctrl/⌘ + Enter to check query · your code is saved in this browser
Results
Use Run query to see your rows, then Check query to grade it.
Schema · QA Tracker
SQLiteLoading the database…
“null” marks columns that allow NULL. Foreign keys are not enforced, as in many real test databases.