Community
Participate
Working Groups
Build ID: tptp45 if6 Steps To Reproduce: 1, create Junit test project 2, create a encypted datapool 3, reference created encrypted datapool to junit test 4, run junit test and failed Env : --tptp.runtime.allInOne.win32.win32.x86-TPTP-4.5.0M6.zip --agntctrl.win_ia32-TPTP-4.5.0M6.zip(if running with AC) Reference:http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.hyades.test.doc.user/samples/saccessdp.htm There is no error when running the junit test with a normal datapool(no encrypted data) when encrypt a "string" variable, the stack trace for the error case will be: junit.framework.AssertionFailedError at junit.framework.Assert.fail(Assert.java:47) at junit.framework.Assert.assertTrue(Assert.java:20) at junit.framework.Assert.assertNotNull(Assert.java:217) at junit.framework.Assert.assertNotNull(Assert.java:210) at shoppingCartTest_src.testShoppingCartConstructor(shoppingCartTest_src.java:90) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at org.eclipse.hyades.test.common.junit.HyadesTestCase.run(HyadesTestCase.java:172) at junit.framework.TestSuite.runTest(TestSuite.java:230) at org.eclipse.hyades.test.common.junit.HyadesTestSuite.runTest(HyadesTestSuite.java:457) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.hyades.test.common.junit.HyadesTestSuite.doRun(HyadesTestSuite.java:425) at org.eclipse.hyades.test.common.junit.HyadesTestSuite.run(HyadesTestSuite.java:338) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) at junit.extensions.TestDecorator.run(TestDecorator.java:30) at junit.extensions.RepeatedTest.run(RepeatedTest.java:26) at junit.framework.TestSuite.runTest(TestSuite.java:230) at org.eclipse.hyades.test.common.junit.HyadesTestSuite.runTest(HyadesTestSuite.java:457) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.hyades.test.common.junit.HyadesTestSuite.doRun(HyadesTestSuite.java:425) at org.eclipse.hyades.test.common.junit.HyadesTestSuite.run(HyadesTestSuite.java:338) at org.eclipse.hyades.test.common.junit.HyadesTestRunner.run(HyadesTestRunner.java:504) at org.eclipse.hyades.test.java.runner.HyadesJUnitRunner When encrypting a Double type variable the stack trace of error result would be: java.lang.NumberFormatException: For input string: "0cb2d7dd" at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source) at java.lang.Double.parseDouble(Unknown Source) at org.eclipse.hyades.models.common.datapool.impl.DPLCellImpl.getDoubleValue(DPLCellImpl.java:435) at shoppingCartTest_src.testShoppingCartConstructor(shoppingCartTest_src.java:86) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at org.eclipse.hyades.test.common.junit.HyadesTestCase.run(HyadesTestCase.java:172) at junit.framework.TestSuite.runTest(TestSuite.java:230) at org.eclipse.hyades.test.common.junit.HyadesTestSuite.runTest(HyadesTestSuite.java:457) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.hyades.test.common.junit.HyadesTestSuite.doRun(HyadesTestSuite.java:425) at org.eclipse.hyades.test.common.junit.HyadesTestSuite.run(HyadesTestSuite.java:338) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) at junit.extensions.TestDecorator.run(TestDecorator.java:30) at junit.extensions.RepeatedTest.run(RepeatedTest.java:26) at junit.framework.TestSuite.runTest(TestSuite.java:230) at org.eclipse.hyades.test.common.junit.HyadesTestSuite.runTest(HyadesTestSuite.java:457) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.hyades.test.common.junit.HyadesTestSuite.doRun(HyadesTestSuite.java:425) at org.eclipse.hyades.test.common.junit.HyadesTestSuite.run(HyadesTestSuite.java:338) at org.eclipse.hyades.test.common.junit.HyadesTestRunner.run(HyadesTestRunner.java:504) at org.eclipse.hyades.test.java.runner.HyadesJUnitRunner.main(HyadesJUnitRunner.java:117) Comment #64 and Comment #65 are both verified by IAC/AC with IBM50/Sun jre1.5.0_14 More information:
Created attachment 96988 [details] fixed this error and created a patch For the errors in commments #65 and # 64 (can not run junit test using String and Double encrypted data ) , they're caused by an minor typing error in the org.eclispe.hyades.test.tools.core plugin , in order to fix these errors ,pls do below modification : 1, open the class : org.eclipse.hyades.test.common.testservices.resources.DatapoolPasswordProvider , update below code : result = ServiceInvoker.invokeService(getProviderName(), "method=getDatapoolList,args:testId={0}".concat(testId)); into : result = ServiceInvoker.invokeService(getProviderName(), "method=getDatapoolList,args:testId=".concat(testId)); (the reason for errrors is that there are a useless {0} in code )
Time estimate for reviewing and testing the patch as well as creating a new test case.
Duwayne, please review Xin's patch.
The following JUnit test suites have been added to cover this symtom (and non-encrypted datapools): /org.eclipse.hyades.test.ui.datapool.tests/junit/datapool/Test.UI.DatapoolEditor_running.testsuite /org.eclipse.hyades.test.ui.datapool.tests/junit/datapool/Test.UI.EncryptedDatapoolEditor_running.testsuite
Hours worked for reviewing and testing the patch as well as creating new test suites.
Reviewed and approved.
Patch checked in to CVS (HEAD).
Verified and it's ok to close now .