jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

na #346

Closed stewartmacgregor closed 9 years ago

jejacks0n commented 9 years ago
  1. what version of phantomjs are you running?
  2. have you considered locating and fixing memory leaks within your application?
  3. is it always the same spec, or does it happen at different times?
  4. have you reported the issue as phantomjs asks in the crash output?

An alternative to 2 is to fork the repo and implement what you're looking for. This is definitely outside the scope of teaspoon, and I've not heard of the issue before, but it seems reasonable to assume that it's a memory leak and phantom failing. The amount of time that we have as a team to dedicate to a memory leak problem in your application is minimal, though if you can track it down to something in teaspoon we'd definitely take a look!

stewartmacgregor commented 9 years ago

na

jejacks0n commented 9 years ago

Ah, gotcha, I must've misunderstood the request.

https://github.com/modeset/teaspoon/blob/master/lib/teaspoon/drivers/phantomjs_driver.rb#L33

I'd probably try adding some rescue statements there, and add some recursion. That would at least fire up phantomjs again -- all speculation of course.

That might keep things contained within one "run", but the problem is really that it doesn't know where you left off, since the "browser" crashed. You'd probably have to add some way to track the last spec run, and then somehow add the concept of "run everything after this spec" to each of the frameworks (e.g. jasmine, mocha, qunit -- or just the one that you're using). Hope that helps.

stewartmacgregor commented 9 years ago

na

jejacks0n commented 9 years ago

No worries, sorry it doesn't really handle what you're looking for. Hopefully it's easy for you to sort out -- these things can be a bear.

jejacks0n commented 9 years ago

In thinking through my theoretical solution, it won't really work.. when you load the "browser" up again, all your coverage information would be gone. There's really no way to keep that between runs -- it's a large amount of data, and so teaspoon doesn't report it until the end of the run. It would have to be sent along with each spec, and then stored on the ruby level and then somehow merged together when restarting the "browser" and getting more of them.

stewartmacgregor commented 9 years ago

na