K
Kai Siegele
Guest
Hallo, I have difficulaties to integrate ABL Unit tests into the build process. I have written the following simple test case class: CLASS TestSomeThing: METHOD PUBLIC INTEGER AddNums(INPUT firstNum AS INTEGER, INPUT secondNum AS INTEGER): DEFINE VARIABLE result AS INTEGER NO-UNDO. result = firstNum + secondNum. RETURN result. END METHOD. @test. METHOD PUBLIC VOID TestFirst( ): DEFINE VARIABLE result AS INTEGER NO-UNDO. result = AddNums(3, 3). Assert:Equals(result, 6). RETURN. END METHOD. END CLASS. Now I want to integrate the running of this testcases in our build process and I have added a new section in our ant-script as decribed in the Progress documentation: When executing the ant script the xml-file summarizing the test results was created without problems. Unfortunately the build process failed with the following error message: java.lang.NumberFormatException at java.math.BigDecimal. (BigDecimal.java:470) at java.math.BigDecimal. (BigDecimal.java:739) at com.progress.openedge.ant.ablunit.util.XMLUtilities.populateResults(Unknown Source) at com.progress.openedge.ant.ablunit.executor.NativeExecutor.readResults(Unknown Source) at com.progress.openedge.ant.ablunit.executor.NativeExecutor.execute(Unknown Source) at com.progress.openedge.ant.ablunit.ABLUnitTask.execute(Unknown Source) at com.progress.openedge.ant.ablunit.ABLUnitTask.execute(Unknown Source) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:435) at org.apache.tools.ant.Target.performTasks(Target.java:456) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405) at org.apache.tools.ant.Project.executeTarget(Project.java:1376) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1260) at org.apache.tools.ant.Main.runBuild(Main.java:854) at org.apache.tools.ant.Main.startAnt(Main.java:236) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112) Has anyone an idea why this exception occure and how to prevent this error? We are using the ant version 1.9.7 and OpenEdge 11.6.3. Please don’t hesitate to contact me for any further information. I would be grateful for any help. Kind regards Kai Siegele
Continue reading...
Continue reading...