alexgb / guard-konacha

Automatically run konacha tests through Guard
MIT License
31 stars 17 forks source link

Rewrite Guard-Konacha to increase performance #7

Closed matthijsgroen closed 11 years ago

matthijsgroen commented 11 years ago

Changed the strategy of Guard-Konacha. By updating Konacha to accept a Capybara session and run specific urls, Guard Konacha can use a single Capybara session for all runs. Therefor speeding up the running of tests. The old strategy used running the konacha:run rake task, and had to setup a server and capybara session for each run.

In this new strategy, the urls of the tests are visited and listened to using the updated Konacha runner.

For the new strategy, jfirebaugh/konacha#95 has to be merged first and the new Konacha gem should be released. When that is done, I can update the Gemspec file with the new Konacha version that should be required for this code.

alexgb commented 11 years ago

Thanks, this is a big improvement. I've added some logic to make sure the konacha server is running, otherwise if a test run happens before the Konacha server fully starts, the child process can become rogue when Guard exits.

I'm pretty confident in this, however I have seen some issues using the :webkit and :poltergeist drivers where calling reporters successively on the same file won't reload the tests properly inside the reporter session and you'll see erroneous results.

matthijsgroen commented 11 years ago

Yeah noticed the rogue behavior myself aswell! Cool that you fixed that already! I am using the WebKit driver myself, but haven't had issues with rerunning the same files.