Index: src/test/java/SimpleTest.java =================================================================== --- src/test/java/SimpleTest.java (revision 32288) +++ src/test/java/SimpleTest.java (working copy) @@ -31,4 +31,28 @@ r.add(file); System.out.println(r.getFailCount()+"/"+r.getTotalCount()); } + + public void test_param() throws Exception { + Report r = new Report(null); + File file = new File(getClass().getResource("parm_1.xml").toURI()); + System.out.println(file.length()); + r.add(file); + System.out.println(r.getFailCount()+"/"+r.getTotalCount()); + assertEquals(0, r.getFailCount()); + assertEquals(10, r.getTotalCount()); + } + + public void test_param_less_id() throws Exception { + Report r = new Report(null); + File file = new File(getClass().getResource("parm_less_id.xml").toURI()); + System.out.println(file.length()); + r.add(file); + System.out.println(r.getFailCount()+"/"+r.getTotalCount()); + assertEquals(0, r.getFailCount()); + assertEquals(10, r.getTotalCount()); + } + + public static void main(String[] args) throws Exception { + new SimpleTest().test2(); + } } Index: src/test/resources/parm_less_id.xml =================================================================== --- src/test/resources/parm_less_id.xml (revision 0) +++ src/test/resources/parm_less_id.xml (revision 0) @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: src/test/resources/parm_1.xml =================================================================== --- src/test/resources/parm_1.xml (revision 0) +++ src/test/resources/parm_1.xml (revision 0) @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: src/main/java/hudson/plugins/javatest_report/TestObject.java =================================================================== --- src/main/java/hudson/plugins/javatest_report/TestObject.java (revision 32288) +++ src/main/java/hudson/plugins/javatest_report/TestObject.java (working copy) @@ -55,7 +55,7 @@ */ private String description; - private Status status; + private Status status = Status.PASS; /** * Optional message that complements status. Index: src/main/java/hudson/plugins/javatest_report/TestCollection.java =================================================================== --- src/main/java/hudson/plugins/javatest_report/TestCollection.java (revision 32288) +++ src/main/java/hudson/plugins/javatest_report/TestCollection.java (working copy) @@ -81,6 +81,9 @@ * For Digester. */ public void add(C t) { + if (t.getId() == null) { + t.setId(t.getName()); + } tests.put(t.getId(),t); if(t.getStatus() == Status.SKIP) skippedTests.put(t.getId(),t);