Skip to content

“Run After Tests” Plugin for IntelliJ IDEs

by Wayne on October 27, 2014

blink(1) is an open source hardware USB RGB LED indicator by ThingM. I wrote a plugin “Run After Tests” for IntelliJ-based IDEs like PyCharm and CLion so it can display the status of your tests as different colors.

blink(1), an open source hardware USB RGB LED indicator

blink(1), an open source hardware USB RGB LED

The blink(1) has a variety of control mechanisms, including a command-line tool, blink1-tool. It’s as open source as things come, really, and it’s by Mike Kuniavsky and Tod E. Kurt. I’ve talked with Tod a few times–we were stationed in the Maker Shed next to each other at a few Bay Area Maker Faires, so when I saw a tweet where someone got blink(1) working with a Ruby IDE to indicate test status, I decided to extend the blink(1) ecosystem and write a plugin for my favorite IDEs.

While I still write a lot of code in vim, if I’m not in vim, I’m in PyCharm or CLion. PyCharm and CLion are tools by JetBrains, and are based upon the IntelliJ IDE. IntelliJ is written in Java, something I don’t particularly enjoy working with, but it’s a testament to how great PyCharm and CLion are that they don’t trigger my Java allergy.

Today, I spent a little more than an hour, opened some docs, and wrote an IntelliJ plugin “Run After Tests” for automatically running arbitrary commands after a test suite completes, with one configuration for when all the tests pass, and a second configuration for one when some of the tests fail. It seems to work for me.

I can see this being used a few different ways–including with blink1-tool so I can see the status of my tests at a glance!

I have posted the project and a binary release, and I’d appreciate some feedback. I would like to submit it to the JetBrains Plugin Repository, but I want to make sure the tool works for other folks first.

After writing the plugin and testing it, I purchased two blink(1)s. As soon as they arrive, I’ll update the post with the two commands you’ll need to get this working with a blink(1).

From → Uncategorized

No comments yet

Leave a Reply

Note: HTML is allowed. Your email address will not be published.

Subscribe to this comment feed via RSS