One of the things I've enjoyed most at the jobs I've held has been building fantastic internal development tools, and a lot of the time, open sourcing them. Things like will and salad, django-seo-js, and django-ajax-uploader. These sorts of projects are great fun, great PR for the companies I work for, and as it's turned out, really useful to other developers.

I'm really lucky to be able to continue that work at BuddyUp, and today, there's a new one to add: Polytester. It's on github, and open-sourced under MIT.

Polytester solves a really annoying small problem that I've personally seen and solved with custom code at half a dozen companies: how do we easily run all of our tests and get nice output, in the polygot projects we all live in?

Most folks I know these days are running some sort of js framework on the front (and therefore have some jasmine or mocha tests), some kind of backend (and have python, java, or ruby tests), and often an e2e runner like salad or protractor to assure the whole thing works. Easily firing these up is a pain.

Polytester soothes that pain like a 70's slow jam.

It's this easy:

$ pip install polytester

$ echo " api: command: python manage.py test js: command: karma start my.conf.js e2e: command: protractor prot.conf.js " > tests.yml $ polytester Detecting... ✔ api detected as django tests. ✔ e2e detected as protractor tests. ✔ js detected as karma tests. Running tests... ✔ api - 35 tests passed. ✔ e2e - 17 tests passed. ✔ js - 23 tests passed. ✔ All tests passed.

</code>

You're done.

Want proof? Spend 30 seconds with this supafly gif:

Any test runner that outputs valid status codes (pretty much everything on earth) works out of the box, and extended support is available for a handful of languages. (And growing! Submit a PR - it's four simple functions!)

There's also support for lots of really useful dev shortcuts, like --ci/--autoreload , --wip , --parallel , and more. And of course, you can easily run subsets.

$ polytester api,e2e Detecting... ✔ api detected as django tests. ✔ e2e detected as protractor tests.

js skipped.

Running tests... ✔ api - 35 tests passed. ✔ e2e - 17 tests passed.

✔ All tests passed. </code>

And yes, the autoreload is magical.

When things go wrong, polytester just drops you back to the output you're already getting:

$ polytester Detecting... ✔ api detected as django tests. ✔ e2e detected as protractor tests. ✔ js detected as karma tests. Running tests... ✘ api - 1 of 35 tests failed. ====================================================================== FAIL: test_addition (events.tests.SampleTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/me/project/events/tests.py", line 6, in test_addition self.assertEquals(1+1, 3) AssertionError: 2 != 3 ---------------------------------------------------------------------- Ran 35 tests in 1.642s FAILED (failures=1) ✔ js - 23 tests passed. ✔ e2e - 17 tests passed. ✘ Tests failed

My goal was to make it as easy as possible to develop and test polygot projects. And in the week I've been using it, I now can't imagine living without it.

So, everyone, meet polytester. Finally, you can dump that painful shell/fabric/rake/gulp command you've been lugging around and disco dance your bad self on to better things.

Did polytester help you out? Help me out by subscribing to my letter. It's awesome, contains stories from my adventures living around the world, and people tell me it enriches their lives. :)