Description
Currently
Tests can take a very long while to run.
This is painful when developing Etaoin.
My computer is getting long in the tooth, but it just finished a test run against chrome and firefox in ~24m.
Ideas
@dgr and I chatted about the expense of creating a WebDriver process for each test.
This is great in that it provides complete isolation for each test but is time-consuming.
Questions:
- Can we reuse a WebDriver process and/or session across tests?
In some cases, the answer will be no. Sometimes a WebDriver test launches the WebDriver with specific arguments (this is not the case for api tests, but is for other tests). Other times, a test will affect the session state, with, for example, cookies. And what should we do if a test fails? Probably throw away our WebDriver process and start fresh.
But, often, I expect a simple page refresh would be enough to clean the slate.
- Can we parallelize when testing against multiple browsers?
Maybe. But the complexity might not be worth it.
Note that CI is parallelized by running one browser per job.
Next Steps
Experiment with the above. Measure the impact on tests and the time it takes to run them.