Loading ...
Sorry, an error occurred while loading the content.

Re: [XP] Free Developer: just submit your user story or give me y our code tests ANN]

Expand Messages
  • Jeff Langr
    ... Since I don t use the outline view, I wasn t aware of this, so I ll add that you can also run a single test from the Members view in Eclipse. And if a test
    Message 1 of 3 , Feb 1, 2006
    • 0 Attachment
      Hiller, Dean wrote:
      > I have a user story I would love to see. Right click on a JUnit method and
      > be able to select run as JUnit test and it runs only that one method
      > test(instead of running the whole suite). Right now, I have to go over to
      > outline and right click on the method there(and it took me forever to find
      > that). It would be awesome if a shortcut key was added. I always use the
      > alt-shift-x and t, but if I double click a method, I would love it if that
      > shortcut ran just that one method instead of the whole suite.
      >

      Since I don't use the outline view, I wasn't aware of this, so I'll add
      that you can also run a single test from the Members view in Eclipse.
      And if a test fails, you can rerun the individual failed test from the
      JUnit view.

      I like this one. IDEA has supported a similar ability for quite a while.
      I think the way it worked in IDEA was that you could hit a shortcut key
      (I assigned this to Ctrl-T) and it would execute the test method (if
      any) that encompassed the current cursor position. If the cursor was
      external to a test method but within the scope of a test class, it'd
      execute the entire set of tests on the class. Very valuable and
      effective if you're in the unfortunate boat of not being able to run the
      entire suite.

      But you'll have to wait until Hugo finishes the JUnit string compare
      story. The iteration's full. :-)

      -Jeff-

      --
      Langr Software Solutions
      http://langrsoft.com
      author, Agile Java: Crafting Code With Test-Driven Development
    • Steve Bate
      ... Hi Dean, Have you seen... http://sourceforge.net/projects/junitrunner/ Eclipse plugin to allow run/debug junit test method using context popup menu.
      Message 2 of 3 , Feb 2, 2006
      • 0 Attachment
        > Hiller, Dean wrote:
        >
        > I have a user story I would love to see. Right click on a JUnit
        > method and be able to select run as JUnit test and it runs only that
        > one method test(instead of running the whole suite).

        Hi Dean,

        Have you seen...

        http://sourceforge.net/projects/junitrunner/

        "Eclipse plugin to allow run/debug junit test method using
        context popup menu. Method to launch is defined by cursor
        position. If cursor between methods the whole junit class
        is launched."

        Is this what you want? If so, if you are using an Eclipse version < 3.2, be
        sure to use JUnitRunner 1.1.0 instead of the latest version.

        I also use the trick Jeff mentioned where I right click in the outline view
        (or class members list) to run a single test. The side effect of this
        technique is it creates a launch configuration for the single test. I can
        then modify the JVM arguments, class path, and so on for that single test
        and then relaunch it. That's useful to me sometimes when doing performance
        tests or running tests against multiple versions of JAR files.
        Using JUnitRunner doesn't create a launch configuration which may be useful
        if you don't want clutter in the launch configurations from running single
        tests.

        Regards,

        Steve
      Your message has been successfully submitted and would be delivered to recipients shortly.