Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » JUnit test no longer lets me run as test
JUnit test no longer lets me run as test [message #515798] Sat, 20 February 2010 23:59 Go to next message
Alpdog14  is currently offline Alpdog14 Friend
Messages: 2
Registered: February 2010
Junior Member
I have created a new Project a couple days ago, and I had a Class MyMap and a JUnit Test MyMapTest and I was able to right click and Run As JUnit and I would get results. Now when I open the same project and right click the JUnit test, all I get is Run Configurations and when I go into that screen and try to Run my test it says "No test found with test runner 'JUnit 4'. I have not changed any setting or anything I just am using my laptop instead of my desktop which is what I was using when I was able to run the test. Can anyone tell me how to run the JUnit test even if I just get the Run As Configuration screen.
Re: JUnit test no longer lets me run as test [message #515804 is a reply to message #515798] Sun, 21 February 2010 00:44 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 2/20/2010 4:59 PM, Alpdog14 wrote:
> I have created a new Project a couple days ago, and I had a Class MyMap
> and a JUnit Test MyMapTest and I was able to right click and Run As
> JUnit and I would get results. Now when I open the same project and
> right click the JUnit test, all I get is Run Configurations and when I
> go into that screen and try to Run my test it says "No test found with
> test runner 'JUnit 4'. I have not changed any setting or anything I just
> am using my laptop instead of my desktop which is what I was using when
> I was able to run the test. Can anyone tell me how to run the JUnit test
> even if I just get the Run As Configuration screen.

I'm probably off the mark here, however, the last time this happened to
me, the JUnit library had disappeared from Build Paths.

Right-click on the project, choose Build Path -> Configure Build Path,
then click on the Libraries tab, click on Add Library... and then JUnit.
Choose JUnit 3 or 4, then Finish.

Of course, there could be some other reason, but this is my experience
so far.

Best of luck,

Russ Bateman
Re: JUnit test no longer lets me run as test [message #515805 is a reply to message #515804] Sun, 21 February 2010 07:34 Go to previous messageGo to next message
Alpdog14  is currently offline Alpdog14 Friend
Messages: 2
Registered: February 2010
Junior Member
Hi Russell, I appreciate the response but wondering if you can explain a little more because when I right click my Project I do not see any option to build paths. I tried right clicking my project, class and JUnit test but i do not see that option. I also went to the Project menu and see Build options but some are greyed out and Build Automatically is selected. Please clarify how to add the JUnit library.
Re: JUnit test no longer lets me run as test [message #515856 is a reply to message #515805] Sun, 21 February 2010 20:50 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 2/21/2010 12:35 AM, Alpdog14 wrote:
> Hi Russell, I appreciate the response but wondering if you can explain a
> little more because when I right click my Project I do not see any
> option to build paths. I tried right clicking my project, class and
> JUnit test but i do not see that option. I also went to the Project menu
> and see Build options but some are greyed out and Build Automatically is
> selected. Please clarify how to add the JUnit library.

(Note that I'm using Galileo.)

Right-click on your project and choose Build Path:

http://www.windofkeltia.com/xfer/build-path.png

Here you see I've added JUnit 3. I clicked on Add Library... to do this.

http://www.windofkeltia.com/xfer/java-build-path.png

Russ
Re: JUnit test no longer lets me run as test [message #675969 is a reply to message #515856] Thu, 02 June 2011 08:19 Go to previous message
Steve Kelem is currently offline Steve KelemFriend
Messages: 11
Registered: July 2009
Junior Member
Neither of those pictures exist. I get a 404 Not Found

The requested URL /xfer/build-path.png was not found on this server.

Where is the "my Project" that you're right clicking? Which tab/frame/etc.? Is it in the Package Explorer?
If I open Preferences, go to Java/Build Path/Classpath Variables, there is an entry for JUNIT_HOME, but it says "non modifiable, deprecated).
Previous Topic:Android App! Please Help!!!!
Next Topic:Why doesn't my username show up anymore?
Goto Forum:
  


Current Time: Thu Apr 25 13:52:27 GMT 2024

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

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

Back to the top