Sunday, April 19, 2009

IntelliJ Now Supports ScalaTest

IntelliJ 8 now has support for ScalaTest (at least as of build 9805). I believe it comes in via the Scala plugin. It works, but, when I right clicked on my test class I expected to see a run option for ScalaTest and I didn't, which stinks. Not seeing it also made me think it just didn't work. It does.

To run a ScalaTest test in IntelliJ, you have to add a run configuration. Most Intellij users probably know how to do this, but for those who don't, here are the steps.

  1. Click "Edit Configurations" in the Run menu dropdown (right next to the green play arrow).

  2. Click the + button to add a new run configuration. This brings up a dropdown containing different runners.

  3. ScalaTest is in the list, choose it.

  4. Fill in the classname of your test by typing it, or selecting the "..." button to bring up the class finder dialog.

  5. Click ok.

  6. Run!

Thanks IntelliJ Scala guys! Now if you can only get that right click thing working...

3 comments:

  1. Hello, Jack.
    There is one more way to run quickly ScalaTest from inside an editor. Just press Ctrl-Shift-F10 (like, say, for Java app. run configuration). New configuration will be created and run immediately.
    Thanks for pointing to right-click problem. We'll fix it.

    With best regards,
    Ilya Sergey

    ReplyDelete
  2. Thanks Ilya. That's great news.

    By the way, whats the best way to communicate with your team? I have a lot of comments/requests/problems/etc.

    ReplyDelete
  3. Hi, Jack.
    Try the last build from plugin repository, the bug you've mentioned is fixed in it.
    There are several ways to communicate with us:
    Forum: http://www.jetbrains.net/devnet/community/idea/scala_(eap)
    Bugtracker: http://www.jetbrains.net/jira/browse/SCL
    Also you may write to ilya.sergey@jetbrains.com

    With best regards,
    Ilya

    ReplyDelete