[Biojava-dev] how to run unittest in eclipse

Huang Zhibin zbhuang2005 at hotmail.com
Tue Jan 2 13:16:16 UTC 2007


Dear all,
  First all,thanks for the contribution of BioJava.
  I downloaded the BioJava and compile apps, demos, tests and runtests 
using ant. It is ok. But when importing this project into eclipse, I do not 
know hot to runtests. For example, when clicking file of 
/tests/org.biojava.bio.alignment/FlexibleAlignmentTest.java, choose Run As 
| JUnit Test, it fails. Info in Console will be listed below.
  I know maybe it failed in the step of initialization, but I do now know 
how to solve it.
  Can someone who run junittest in JAVA IDE share the experience or give me 
some suggestions? I will appreciate it.
Best regards,
Zhibin

------------------------------
Info printed in Console:

org.biojava.bio.BioError: Unable to initialize DNATools
	at org.biojava.bio.seq.DNATools.<clinit>(DNATools.java:117)
	at 
org.biojava.bio.alignment.FlexibleAlignmentTest.parse(FlexibleAlignmentTest.java:74)

	at 
org.biojava.bio.alignment.FlexibleAlignmentTest.<clinit>(FlexibleAlignmentTest.java:46)

	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown 
Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at junit.framework.TestSuite.createTest(TestSuite.java:135)
	at junit.framework.TestSuite.addTestMethod(TestSuite.java:114)
	at junit.framework.TestSuite.<init>(TestSuite.java:75)
	at 
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.getTest(JUnit3TestLoader.java:102)

	at 
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.loadTests(JUnit3TestLoader.java:59)

	at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:445)

	at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)

	at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)

	at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Caused by: org.biojava.bio.BioError: Couldn't locate AlphabetManager.xml.  
This probably means that your biojava.jar file is corrupt or incorrectly 
built.
	at 
org.biojava.bio.symbol.AlphabetManager.<clinit>(AlphabetManager.java:148)
	at org.biojava.bio.seq.DNATools.<clinit>(DNATools.java:80)
	... 15 more
java.lang.NoClassDefFoundError
	at org.biojava.bio.seq.ProteinTools.<clinit>(ProteinTools.java:76)
	at 
org.biojava.bio.alignment.FlexibleAlignmentTest.parse(FlexibleAlignmentTest.java:76)


_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  




More information about the biojava-dev mailing list