Skip to content
SDETRole
SDETRole

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 whose branch is 'main'.
  • For each such run, compare its duration_ms with 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_ms and duration_ms.
  • Order by build_id, then title.

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.

query.sqlExecutes on SQLite in your browser

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

SQLite

Loading the database…

“null” marks columns that allow NULL. Foreign keys are not enforced, as in many real test databases.

Type to search across SDETRole.

Full-text search by Pagefind · runs in your browser Open search page →