Headless qunit integration tests?


(Rimian Perkins) #1

I’d like to run my integration tests via the command line with support for running a subset of the entire test suite. I’m thinking about setting up gulp and phantomjs to run the tests. Something like: node-qunit-phantomjs

Has anyone set something like this up? Any pointers?


(Sam Saffron) #2

We already have a rake task for this…

rake qunit:test

(Rimian Perkins) #3

Oh, of course! Thanks for that.

I’m trying to work out how to run single tests so I can be TDD.


(Sam Saffron) #4

In general we use the web browser to run single tests using /qunit path

It is doable using the CLI just not implemented yet.


(Rimian Perkins) #5

Here’s a PR that implements that:

:slight_smile:


(Sam Saffron) #6

Merged it in :slight_smile: good idea,

My dream is somehow to integrate this stuff into rake autospec that would be mighty cool.


(Rimian Perkins) #7

Anything that makes testing easier!

It wants to run the tests multiple times which doesn’t make a lot of sense if you’re running a subset via rake on the command line. I included a RETRY flag. I would say the default value should be false but I guess that will break other things.


(Robin Ward) #8

I believe @zogstrip took a stab at this and it had many issues. In particular it seemed significantly slower than before.


(Régis Hanol) #9

I believe that’s what @sam is suggesting. Having it integrated nicely would be mighty cool :wink: