Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » using JUnit
using JUnit [message #212969] Thu, 31 May 2007 03:18 Go to next message
Eclipse UserFriend
Originally posted by: jjarrelZZZZZ.yahoo.com

I want to run JUnit from inside of Eclipse but when I am working at the TDD,
I want to just run one test in a class file of tests. It is easy enough to
start JUNit it always wants to run all the tests in that file. This is ok
some of the time, but sometimes I am just working to get code running.

This is similar to the TestDriven.Net for VS2005. You right click on a
TestMethod, and it runs that method. Right click on a file name and it runs
all the tests in the file. Right click on the Package and it runs all
tests. It is very handy and I miss it already.

Any ideas here?

jeff
Re: using JUnit [message #213043 is a reply to message #212969] Thu, 31 May 2007 12:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Jeff,

Probably something that's almost as good, is the little toolbar button
"Rerun Tests - Failures First" so that whatever test failed the last
time is the first to be executed the next time and hence the test you
are currently working on and isn't quite right yet will be done first.


JEFF JARRELL wrote:
> I want to run JUnit from inside of Eclipse but when I am working at the TDD,
> I want to just run one test in a class file of tests. It is easy enough to
> start JUNit it always wants to run all the tests in that file. This is ok
> some of the time, but sometimes I am just working to get code running.
>
> This is similar to the TestDriven.Net for VS2005. You right click on a
> TestMethod, and it runs that method. Right click on a file name and it runs
> all the tests in the file. Right click on the Package and it runs all
> tests. It is very handy and I miss it already.
>
> Any ideas here?
>
> jeff
>
>
>
Re: using JUnit [message #213097 is a reply to message #212969] Thu, 31 May 2007 14:48 Go to previous messageGo to next message
Mark Dexter is currently offline Mark DexterFriend
Messages: 324
Registered: July 2009
Senior Member
JEFF JARRELL wrote:

> I want to run JUnit from inside of Eclipse but when I am working at the TDD,
> I want to just run one test in a class file of tests. It is easy enough to
> start JUNit it always wants to run all the tests in that file. This is ok
> some of the time, but sometimes I am just working to get code running.

> This is similar to the TestDriven.Net for VS2005. You right click on a
> TestMethod, and it runs that method. Right click on a file name and it runs
> all the tests in the file. Right click on the Package and it runs all
> tests. It is very handy and I miss it already.

Hi. I just tried this and you can do exactly the same thing in Eclipse.
Just open the test class in the package explorer and right-click on any
test method. Select Run as / JUnit Test. It will just run the selected
method. Right-click on the class name and it runs all tests in the class.
Hope this helps. Mark Dexter
Re: using JUnit [message #213224 is a reply to message #213097] Fri, 01 June 2007 01:34 Go to previous message
Eclipse UserFriend
Originally posted by: jjarrelZZZZZ.yahoo.com

Yes, that does work. I guess I was expecting that I could identify the
method in the code editor, right click and go. It works just fine by going
to the package explorer or the JUnit tab.

Thanks,
jeff

"Mark Dexter" <dextercowley@gmail.com> wrote in message
news:698959aae7e97239249a33ecaa098118$1@www.eclipse.org...
> JEFF JARRELL wrote:
>
>> I want to run JUnit from inside of Eclipse but when I am working at the
>> TDD, I want to just run one test in a class file of tests. It is easy
>> enough to start JUNit it always wants to run all the tests in that file.
>> This is ok some of the time, but sometimes I am just working to get code
>> running.
>
>> This is similar to the TestDriven.Net for VS2005. You right click on a
>> TestMethod, and it runs that method. Right click on a file name and it
>> runs all the tests in the file. Right click on the Package and it runs
>> all tests. It is very handy and I miss it already.
>
> Hi. I just tried this and you can do exactly the same thing in Eclipse.
> Just open the test class in the package explorer and right-click on any
> test method. Select Run as / JUnit Test. It will just run the selected
> method. Right-click on the class name and it runs all tests in the class.
> Hope this helps. Mark Dexter
>
Previous Topic:Portal
Next Topic:Integrating ClearQuest Web into Eclipse IDE.
Goto Forum:
  


Current Time: Thu Mar 28 15:19:58 GMT 2024

Powered by FUDForum. Page generated in 0.05025 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top