Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » JUnit View shows no results -- neither success nor failure(Problem making JUnit View work)
icon9.gif  JUnit View shows no results -- neither success nor failure [message #1205840] Sat, 23 November 2013 20:59 Go to next message
John Lusk is currently offline John LuskFriend
Messages: 2
Registered: November 2013
Junior Member
Having trouble w/JUnit view -- it doesn't seem to show success or failure.

Using Kepler SR1, Maven 3.1.1, JUnit 3.8.1 and 4.11 (i.e., I've tried them both).

I created a Maven quickstart project, selected the testing folder and used Eclipse to add a new JUnit4 test case. Looks like this:

import static org.junit.Assert.*;

import org.junit.Test;

public class NooJUnitTestCase
{

   @Test
   public void test()
   {
      System.out.println( "This is a new JUnit4 test case.");
      fail( "Not yet implemented");
   }

}


HOWEVER... when I execute "Run As JUnit Test", the JUnit view shows that it's running (status line puts test class name up, then shows "Terminated"), console output appears in the console window, but I never get a red bar (or a green bar) in the JUnit view. It just shows "Runs: 0/0", which doesn't seem right. This works fine from the command line, running mvn test.

What's going on here? Is this a bug in Kepler? (Hard to believe.)
Re: JUnit View shows no results -- neither success nor failure [message #1753552 is a reply to message #1205840] Tue, 07 February 2017 16:22 Go to previous messageGo to next message
Martin Cernik is currently offline Martin CernikFriend
Messages: 1
Registered: February 2017
Junior Member
Hi. I know this is a pretty old topic, but I have the same issue even in the most recent Eclipse Neon.2 Release (4.6.2). Unit tests don't do nothing and I can only see that console was: <terminated> project-name [JUnit] etc..

Is there a solution? Thanks in forward!
Re: JUnit View shows no results -- neither success nor failure [message #1822261 is a reply to message #1753552] Mon, 02 March 2020 17:01 Go to previous messageGo to next message
Jader Meros is currently offline Jader MerosFriend
Messages: 1
Registered: March 2020
Junior Member
Hi,

Sorry for bringing back this old thread, but as I faced the same exact problem on Eclipse 4.12 (2019-06) and 4.14 (2019-12) and took me a while to discover what was going on, I thought to write down how I solved it and maybe it helps someone.

Basically, the problem remains on classpath size and a Windows machine. If you use the option "Use temporary JAR to specify classpath (to avoid classpath length limitations)" located on the Classpath tab on Run Configurations options, it should do the trick.
Re: JUnit View shows no results -- neither success nor failure [message #1859121 is a reply to message #1205840] Fri, 12 May 2023 13:57 Go to previous message
Bhuvaneshwar Bharathiya is currently offline Bhuvaneshwar BharathiyaFriend
Messages: 1
Registered: May 2023
Junior Member
For me, the Test Runner was set to Junit5.
After changing it to Junit4 (for which I have dependency in pom) , it worked as expected.

Run Configuration >> Test >> TestRunner
Previous Topic:problem with windowbuilder
Next Topic:Java 20, JRE System Library, Maven
Goto Forum:
  


Current Time: Tue Mar 19 06:09:11 GMT 2024

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

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

Back to the top