From: 许刚强 <urb...@16...> - 2008-06-26 08:33:39
|
Hi everyone: I downloaded ddsteps 1.1 from sourceforge and run one test case with the following exceptions: java.lang.NullPointerException at net.sf.ehcache.constructs.blocking.BlockingCache.getName(BlockingCache.java:143) at net.sf.ehcache.constructs.blocking.SelfPopulatingCache.setThreadName(SelfPopulatingCache.java:121) at net.sf.ehcache.constructs.blocking.SelfPopulatingCache.get(SelfPopulatingCache.java:67) at net.sf.ehcache.constructs.blocking.BlockingCache.get(BlockingCache.java:602) at org.ddsteps.dataset.CachingDataSetLoader.loadDataSet(CachingDataSetLoader.java:181) at org.ddsteps.data.DataSetDataLoader.loadTable(DataSetDataLoader.java:44) at org.ddsteps.junit.behaviour.StaticBehaviourFactory.isMethodDataDriven(StaticBehaviourFactory.java:174) at org.ddsteps.junit.behaviour.StaticBehaviourFactory.isMethodDataDriven(StaticBehaviourFactory.java:158) at org.ddsteps.junit.behaviour.StaticBehaviourFactory.createBehaviour(StaticBehaviourFactory.java:126) at org.ddsteps.junit.behaviour.StaticBehaviourFactory.getBehaviour(StaticBehaviourFactory.java:84) at org.ddsteps.DDStepsTestCase.getBehaviour(DDStepsTestCase.java:219) at org.ddsteps.DDStepsTestCase.countTestCases(DDStepsTestCase.java:104) at junit.framework.TestSuite.countTestCases(TestSuite.java:165) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.countTestCases(JUnit3TestReference.java:67) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.countTests(RemoteTestRunner.java:480) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:448) 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) I downloaded the source code for ddsteps 1.1 and ehcache-1.2.3 and found the following errors: in org.ddsteps.dataset.CachingDataSetLoader line 164: try { Cache backingCache = CacheManager.getInstance().getCache(CACHE_NAME); cache = new SelfPopulatingCache(backingCache, new DataSetFactory()); } catch (CacheException e) { throw new DDStepsException("Could not create cache for DataSet:s.", e); } the backingCache is null. Following is my test case: public class DdStringComparatorTest extends DdTestCase { private String one; private String two; private boolean result; private StringComparator comp = new StringComparator(); /** * testing method for compare * */ public void testCompare() { System.out.println("test"); assertEquals("one=" + one + ",two=" + two + ",result=" + result, result, comp.compares(one, two)); System.out.println("after test"); } /* * (non-Javadoc) * * @see org.ddsteps.DDStepsTestCase#createDataLoader() */ public DataLoader createDataLoader() { return CachingExcelDataLoader.getInstance(); } /** * @param one * the one to set */ public void setOne(String one) { this.one = one; } /** * @param result * the result to set */ public void setResult(boolean result) { this.result = result; } /** * @param two * the two to set */ public void setTwo(String two) { this.two = two; } } Anyone have any idea? Thanks in advance. Best Regards, Green Xu |