Headless qunit integration tests?

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 - npm

Has anyone set something like this up? Any pointers?

We already have a rake task for this…

rake qunit:test

Oh, of course! Thanks for that.

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

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

It is doable using the CLI just not implemented yet.

Here’s a PR that implements that:

https://github.com/discourse/discourse/pull/4268

:slight_smile:

Merged it in :slight_smile: good idea,

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

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.

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

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