Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » junit testsuite runs under eclipse, but not at cmdline
junit testsuite runs under eclipse, but not at cmdline [message #147493] Fri, 05 March 2004 12:02 Go to next message
Eclipse UserFriend
Originally posted by: rlee.hursley.ibm.com

I have a few test classes and a testsuite class in the same package of my
project.
They run fine under eclipse. I had added main methods to invoke the textui
runner.

From a (WinXP) cmdline, I set the classpath variable and can run the
individual test classes, but not the testsuite. I'm using eclipse 2.1.2 and
the included junit 3.8.1.
These are the messages I see...

F:\eclipse\workspace\Java UI Unit Tests>set
classpath=./../../plugins/org.junit_3.8.1/junit.jar;.

F:\eclipse\workspace\Java UI Unit Tests>java -Djava.awt.headless=true
awtHeadlessTrueJUnitTests.AllHeadlessTrueTests
..F
Time: 0
There was 1 failure:
1) warning(junit.framework.TestSuite$1)junit.framework.Assertio nFailedError:
No tests found in awtHeadlessTrueJUnitTests.AllHeadlessTrueTests
at
awtHeadlessTrueJUnitTests.AllHeadlessTrueTests.main(AllHeadl essTrueTests.jav
a:35)

FAILURES!!!
Tests run: 1, Failures: 1, Errors: 0

Please can anyone advise what might be wrong?
Thanks,
R.
Re: junit testsuite runs under eclipse, but not at cmdline [message #147505 is a reply to message #147493] Fri, 05 March 2004 13:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rtayek.no.spam.freightgate.com

"exquisitus" <rlee@hursley.ibm.com> wrote in message
news:c2abjr$5fc$1@eclipse.org...
> ... 1)
warning(junit.framework.TestSuite$1)junit.framework.Assertio nFailedError:
> No tests found in awtHeadlessTrueJUnitTests.AllHeadlessTrueTests
> ...

add a dumm test method: void testNothing() {} to AllHeadlessTrueTests

hth
Re: junit testsuite runs under eclipse, but not at cmdline [message #147698 is a reply to message #147505] Mon, 08 March 2004 05:32 Go to previous message
Eclipse UserFriend
Originally posted by: rlee.hursley.ibm.com

Sorry, this didn't help, it still doesn't execute my testcase files.

I had used the plugin to create the testsuite and asked that it add an
invocation of the textui runner to the main() method (cos I'm lazy).

What I find is that although the testsuite runs fine in eclipse (maybe it
doesn't use the main() in that environment?) it doesn't run outside eclipse
on the cmdline when I depend on java using the main() method in the
testsuite. HOWEVER, when I try to execute the testsuite file passing it as
an argument to the textui runner on the cmdline (not depending on the
main()), then the testsuite runs fine.

There seems to be something about the textui runner line added to the main()
method by the plugin that leads to the failure to find any tests in the
testsuite.
Any more ideas?
R.

"Ray Tayek" <rtayek.no@spam.freightgate.com> wrote in message
news:c2af8u$a40$1@eclipse.org...
>
> "exquisitus" <rlee@hursley.ibm.com> wrote in message
> news:c2abjr$5fc$1@eclipse.org...
> > ... 1)
> warning(junit.framework.TestSuite$1)junit.framework.Assertio nFailedError:
> > No tests found in awtHeadlessTrueJUnitTests.AllHeadlessTrueTests
> > ...
>
> add a dumm test method: void testNothing() {} to AllHeadlessTrueTests
>
> hth
>
>
Previous Topic:[ANN] MyEclipse Enterprise Workbench - 2.7 GA
Next Topic:Save Problem List to file?
Goto Forum:
  


Current Time: Fri Jun 06 00:35:09 EDT 2025

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

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

Back to the top