4 ms·
Ghostbuster: Easier headless testing with PhantomJS (and CoffeeScript)
- joshu 15y agoPhantomJS seems like something I should pay more attention to.
- joshbuddy 15y agoPhantomJS is pretty cool. There are some super rough areas I had to deal with to get this working, but I hope they can improve it and make it more awesome. I've gotta file some bugs actually.. I was just happy to get the link traversal test passing. So many tears to get that reliable.
- kaylarose 15y agoThis is my PhantomJS experience as well! What mitigated this a bit though, is the actual Phantom codebase on-top of Webkit is really small. So when you need to figure out exactly what it's doing, it's super easy to just dig into the src. I'm hoping more visibility as CLI JS (and/or Coffescript) testing becomes more mainstream, it will bump up the # of contributors.
- kaylarose 15y agoPhantomJS is one of the better "headless" browsers out there. Webkit-based, Minimal src codebase (Python), and easy to compile (with QT tools). IMO The API is a little weird though: when evaluating js within a PhantomJS "WebPage" context, it is _completely_ sandboxed. i.e. you can't use closures or otherwise reference any variables outside the scope of your "WebPage" (without work-arounds). This is odd, when you consider that the page is just another var in your script. IMO it kind of breaks some JS paradigms. Not a big deal, but an annoyance none-the-less.
- MartinCron 15y agoThe UTF-8 test results with ✓ for success and ✗ for failure are just adorable.
- joshbuddy 15y agoI wanted to use "CIRCLE WITH LEFT HALF BLACK" for pending tests (see: http://en.wikipedia.org/wiki/Geometric_Shapes http://en.wikipedia.org/wiki/Geometric_Shapes) .. alas, not supported in my terminal .. maybe I was doing it wrong.
- TrevorBurnham 15y agoThose (and similar symbols) have actually been used in several Node testing frameworks. See e.g. nodeunit (https://github.com/masylum/testosterone https://github.com/masylum/testosterone), Vows (http://vowsjs.org/ http://vowsjs.org/), and Testosterone (https://github.com/masylum/testosterone https://github.com/masylum/testosterone).