

Queen – A Framework To Run Scripts On Many Remote Browsers Using Node.js - Hirvesh
http://queenjs.com/index.html

======
reid
A couple years ago, I used Node.js to build a tool that would run tests in
iframes. It's similar to the OP's tool Thrill, but mine was a lot simpler.
<http://thrilljs.com>

The problem we (the YUI project) ran into was test failures that would occur
only within iframes. We found lots of iframe-only quirks that were useful to
know about, but were also distracting since we wanted to make sure using YUI
in a typical browser context works first. (I've talked to jQuery's TestSwarm
maintainer and they've had similar problems with iframes.)

The tool we use, Yeti, was since rewritten to not require an iframe.
<http://yeti.cx>

I continue to work on Yeti, and there's a lot of interesting things we have
done (using multiple browser instances to speed up testing, launching browsers
automatically, CI integration) and hope to do (code coverage, performance
measurements). Help wanted!

It's neat to see this kind of thing become more popular, and I hope these
projects can make testing easier for everyone.

~~~
ozanonline
What were the sorts of issues you faced with iframes? One major issue I found
so far was alerts blocking the ui thread, which was easy enough to fix by
disabling them. The other major issue was around CORS, which is resolved by
proxying requests.

------
jakub_g
Very similar conceptually to a tool (Attester) that our team has released a
couple of months ago. <https://github.com/ariatemplates/attester/>

We use it as a distributed way to perform tests in our main project (Aria
Templates: <https://github.com/ariatemplates/ariatemplates>). The tool is able
to use PhantomJS (configurable number of instances) and "normal" browsers
which can connect in the same manner (by opening a URL). We use PhantomJS on
Travis for continuous integration builds before merging pull requests, and
real browsers before each release (every 3 weeks).

We support only our own tests so far (eating the own food), but we may add
support for other types as well.

Behind the scenes, the tool first gathers a set of classpaths of the tests to
run (recursively); then it dispatches them to active browsers (e.g. when you
have a couple of people connected via IE8, each of them will receive a subset
of tests to run and effectively the test suite finishes earlier).

You can also run the test suite entirely in the command line (PhantomJS), and
if you have multicore processor, you may increase the number of PhantomJS
instances to parallelize the suite.

Looking forward for comments and forks!

~~~
ozanonline
Cool, you might be interested in Testacular also, a similar project to yours.
The main differentiator for Thrill/Queen will be that Queen acts as a central
server which anyone in the network can execute tests on. So if you have many
developers, they don't each have to setup their own browser pool.

------
perishabledave
The project is interesting, but I can't help but be disappointed the logo
isn't Freddie Mercury.

------
erichocean
I did something similar using Now.js that allowed me to write the actual unit
tests on the server, but run them in browser-based clients whenever they
loaded. Made testing really easy on a multitude of browsers and OSes.

------
ozanonline
Hi everyone, Ozan here. I wrote queen and thrill, I just found out about this
thread, looks like Hirvesh beat me to it :). Going to lunch right now, but
I'll be able to answer questions after I'm back.

------
retube
that's pretty cool. amazon could resell your free browser cycles.

~~~
dspillett
I've been saying for a while that I'm surprised no-one has written a BitCoin
miner in JS and started pushing it out to connecting browsers. Given how much
time a pop-under advert can sit no someone's machine before they notice it
could be relatively lucrative. You'd not get a lot of processing per client
per block of time even with the best current JS JIT compilers (especially as
GPU mining is where it is at now), but if you have enough machines with your
pop-under sat hiding from the user it might make enough to be worth the hassle
of porting the code in the first place.

~~~
Kenan
Embedable miners have been done before.

[https://bitcointalk.org/index.php?topic=9042.msg130817#msg13...](https://bitcointalk.org/index.php?topic=9042.msg130817#msg130817)

------
abekarpinski
The possibilities are interesting, what will you use it for?

~~~
shaunxcode
testing! That was my first thought and at the bottom of a page is a link to
<http://thrilljs.com> which utilizes queen. Super cool, will definitely be
looking into queen/thrill further.

