Possible to re-use browser across multiple tests?
Closed this issue · 3 comments
I'm wondering if it's possible to re-use the browser across multiple tests, so that I don't have to wait for a browser to open for every test. I'm using the Mocha BDD style for tests right now, but if there is a testing framework better suited to wd-sync, I'm happy to change frameworks. Here is a gist showing what I'm doing now: https://gist.github.com/3490535
Ideally, I could browser.init() just once, before the tests run, but I run into errors like "needs a fiber". Do you have any suggestions? Thank you!
Right now I suspect it doesn't work, but that would be a nice feature. To get there, we first need to make sure that it is working in wd. So will open a thread there and get some work done on it.
wd issue here: admc/wd#42
btw, as for testing framework, you should try Mocha with CoffeeScript.
Did some investigation in order to implement the functionality, and figured out that there is nothing to implement :)
You should be able to do what you want using Mocha before/after functionality, or alternatively making sure u use Mocha synchronously.
More comments here admc/wd#42