What’s new in ScalaTest integration

Alexander Podkhalyuzin

Build 0.5.265 is coming with new cool features for ScalaTest.

First of all it shows now outdated configurations. For example you removed test class, but your configuration is still here, then you’ll see that you shouldn’t try to run this outdated configuration:

What’s next. New plugin version is coming with possibility to run single test.

Usually it’s not obvious what exact test name is, so you have possibility to run single test from context menu. Currently rules to get test name from location is hard-coded for all suites in the latest ScalaTest package. But it won’t work for your custom suites and your custom method invocations to register new tests. That will be possibly changed in future, but now you should write test name by yourself  for custom suites.

Next feature is test navigation. It will work only with unreleased ScalaTest 2.0 (I’m not sure is it available in maven repository, but you can build your own ScalaTest 2.0 snapshot). So you can double click on test and navigate to exact test location. Moreover, joined with previous new feature you can use right click on test node and re-run (or debug) just this test.

Also ScalaTest 2.0 is coming with better scoping feature. It means you will see better tree in test run view:

And that is not all. New feature for ScalaTest integration is re-running failed tests. After the first run you added some fixes and you don’t need to run previously successful tests, so you can just re-run failed tests and you will see, which of them are fixed.

Last thing I want to describe is Coverage integration (for IntelliJ IDEA Ultimate users). It just works:

Thanks to Bill Venners and Chee Seng Chua (from ScalaTest team) for collaboration on doing this cool features.

Comments below can no longer be edited.

9 Responses to What’s new in ScalaTest integration

  1. Ismael Juma says:

    December 15, 2011

    Great improvements, thanks a lot!

    Best,
    Ismael

  2. ktoso says:

    December 15, 2011

    Fantastic! – I’ve been waiting for this 🙂

  3. Автоматизация функционального тестирования веб-приложений | Polynom Labs says:

    February 26, 2012

    […] Впрочем, это затруднение незначительное и временное: обещают, что со следующей версией скалатеста дерево будет […]

  4. Daryna says:

    November 3, 2012

    Hi,
    thank you so much for teh winderful plug in. I like it so much.
    I dont have tests for my scala classes yet. I want to write them. Is there any help for writing test in IDEA Scala Plug In? Any documentation or advice?

    • Alexander Podkhalyuzin says:

      November 6, 2012

      Currently we haven’t help in Scala plugin, including help about running tests. I can’t promise we will implement it soon, but we will definetely do it.

      Best regards,
      Alexander Podkhalyuzin.

      • Daryna says:

        November 7, 2012

        Hello,
        thank you for teh answer. I am trying to run Tess for my scala code, but I cant configure the environment properly. It does not run.. 🙁 Ive tried it with Spec2 and ScalaTest but id does not help..

        • Alexander Podkhalyuzin says:

          November 7, 2012

          Please read: http://confluence.jetbrains.net/display/SCA/Getting+Started+with+IntelliJ+IDEA+Scala+Plugin

          If you understand it, but still can’t run tests, please write me back using e-mail with full description of problem including versions of plugin and IDEA and full output. My email is Alexander.Pokhalyuzin@jetbrains.com.

          Best regards,
          Alexander Podkhalyuzin.

          • shawn says:

            January 26, 2013

            Alexander, your blog entry mentioned above doesn’t describe running tests at all.
            I was spoiled by webstorm’s integrated ability to run jstests, and was hoping that same ease of use would be there for scala?

  5. Alexander Podkhalyuzin says:

    January 29, 2013

    Shawn, it’s quite simple to run ScalaTest tests in Scala. What exactly do you need?