retest icon indicating copy to clipboard operation
retest copied to clipboard

Queue most recent run

Open AlexB52 opened this issue 5 years ago • 2 comments

Sometimes specs get run over and over when the changes are made faster than the spec run. We should

  • Queue a file when tests are already running.
  • Replace the file queued with the latest file to run when changes are made during a test run.

AlexB52 avatar Dec 05 '20 01:12 AlexB52

Do you have suggestion where in the codebase can we add this feature? I might try looking into that on a weekend 👀

Been using this gem for a while recently and love it ❤️

konovalov-nk avatar Jun 16 '22 19:06 konovalov-nk

Thanks for reaching out @konovalov-nk .

I'd say the main idea would be to make the runners feed from a newly introduced queue that gets populated or updated after a file change. A run would be triggered by a queue being populated or still full after a run has finished.

Notes:

  • I expect changes to be in Runner base class, Program class and introduce a new queue concept but that's my gut feeling.
  • We also used the observable module in the past, not saying we should use it but that could be a lead. See exe/retest file
  • If you create a PR please add some unit/integration tests (in the test folder) that shows everything works as expected.

Thanks @konovalov-nk

AlexB52 avatar Jun 19 '22 23:06 AlexB52