| Summary: | Record => XML conversion in javascript is not producing the right results. | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Jing Qian <jqian> |
| Component: | EDT | Assignee: | Joseph Vincens <jvincens> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | critical | ||
| Priority: | P3 | CC: | greer |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
fixed verified on 20111009's build, close |
With the following record definitions Record TestDescription rootDir String; //source root directory pkgName String; //package name name String; //test library part name title String; description String; testcases String; expCnt int; //expected test variation count sources String; //list of the runTestMethod names, delimted by whitespace. keywords String; //list of tag names, delimited by , end Record TestResult {@xmlrootelement {}} td TestDescription; stat Status; log Log; end Record ResultSummary pkgName String {@XMLAttribute{}}; //package name name String{@XMLAttribute{}}; //test library part name code int{@XMLAttribute{}}; //test result code value tCnt int{@XMLAttribute{}}; //test variation count, one runTestMethod is one variation expCnt int{@XMLAttribute{}}; //expected test variation count for one test library passCnt int{@XMLAttribute{}}; failCnt int{@XMLAttribute{}}; errCnt int{@XMLAttribute{}}; badCnt int{@XMLAttribute{}}; skipCnt int{@XMLAttribute{}}; end Record ResultSummaryRoot {@xmlrootelement {}} expCnt int{@XMLAttribute{}}; //expected total number of test variation count trSum ResultSummary[]{}; end //call the following to get xml string xmlStr String = XMLLib.convertToXML(resultRootSum, true); SysLib.writeStdOut(xmlStr); the expected result should be: (which is what java currently generates) <?xml version="1.0" encoding="UTF-8" standalone="yes"?><resultSummaryRoot expCnt="4"><trSum tCnt="2" skipCnt="0" pkgName="a" passCnt="1" name="myLib" failCnt="1" expCnt="2" errCnt="0" code="1" badCnt="0"/><trSum tCnt="2" skipCnt="0" pkgName="a" passCnt="1" name="myLib2" failCnt="1" expCnt="2" errCnt="0" code="1" badCnt="0"/></resultSummaryRoot> the actual result is: (which is what javascript currently generates) <?xml version="1.0" encoding="UTF-8"?><ResultSummaryRoot expCnt="4"><trSum><item pkgName="a" name="myLib" code="0" tCnt="2" expCnt="2" passCnt="2" failCnt="0" errCnt="0" badCnt="0" skipCnt="0"></item><item pkgName="a" name="myLib2" code="0" tCnt="2" expCnt="2" passCnt="2" failCnt="0" errCnt="0" badCnt="0" skipCnt="0"></item></trSum></ResultSummaryRoot> This bug is marked as critical, because it's blocking the EUnit test framework to produce readable results.