Six thousand tests, a four-hour run, and a request to make it faster. This lecture is where the time goes and what can realistically be done about it.
Measure before optimising. Split your suite's run time into five buckets. Add timestamps to your logs or your reporter at each boundary:
| Where | What to time |
|---|---|
| Browser startup and teardown | From build() to the first command, and the quit() call |
| Setup through the UI | Every step that creates data by filling forms |
| Protocol round trips | The count of driver commands per test |
| Waiting for the application | Time spent inside driver.wait |
| The behaviour under test | The steps the test exists to check |