ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/junit XMLConstants.java XMLJUnitResultFormatter.java
Date Wed, 27 Aug 2003 08:40:23 GMT
bodewig     2003/08/27 01:40:23

  Modified:    .        WHATSNEW
               src/main/org/apache/tools/ant/taskdefs/optional/junit
                        XMLConstants.java XMLJUnitResultFormatter.java
  Log:
  A JUnit TestSuite can contain tests from multiple classes.  In particular it
  can contain tests from two different classes but with the same method
  name.
  
  Add a new classname attribute to the <testcase> element in the
  XML report so that people know which test the report is talking about.
  
  Revision  Changes    Path
  1.491     +5 -2      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.490
  retrieving revision 1.491
  diff -u -r1.490 -r1.491
  --- WHATSNEW	22 Aug 2003 09:20:56 -0000	1.490
  +++ WHATSNEW	27 Aug 2003 08:40:23 -0000	1.491
  @@ -548,10 +548,10 @@
     <exec>'s manual page).  Bugzilla Report 21877.
   
   * <exec> will now have a new attribute spawn (default false).
  -If set to true, the process will be spawned. Bugzilla Report 5907.
  +  If set to true, the process will be spawned. Bugzilla Report 5907.
   
   * <java> will now have a new attribute spawn (default false).
  -If set to true, the process will be spawned. Bugzilla Report 5907.
  +  If set to true, the process will be spawned. Bugzilla Report 5907.
   
   * <parallel> now supports a timeout which can be used to recover
     from deadlocks, etc in the parallel threads. <parallel> also
  @@ -570,6 +570,9 @@
   * <zip> and friends have a new attribute "keepcompression" that can be
     used to incrementally build an archive mixing compressed and uncompressed
     entries.
  +
  +* <junit>'s XML formatter adds a new classname attribute to the <testcase>
  +  elements.
   
   Changes from Ant 1.5.3 to Ant 1.5.4
   ===================================
  
  
  
  1.7       +3 -0      ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLConstants.java
  
  Index: XMLConstants.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLConstants.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XMLConstants.java	10 Feb 2003 14:14:16 -0000	1.6
  +++ XMLConstants.java	27 Aug 2003 08:40:23 -0000	1.7
  @@ -121,4 +121,7 @@
       /** value attribute for property elements */
       String ATTR_VALUE = "value";
   
  +    /** classname attribute for testcase elements */
  +    String ATTR_CLASSNAME = "classname";
  +
   }
  
  
  
  1.30      +4 -0      ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java
  
  Index: XMLJUnitResultFormatter.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- XMLJUnitResultFormatter.java	19 Jul 2003 08:11:05 -0000	1.29
  +++ XMLJUnitResultFormatter.java	27 Aug 2003 08:40:23 -0000	1.30
  @@ -214,6 +214,10 @@
               currentTest = doc.createElement(TESTCASE);
               currentTest.setAttribute(ATTR_NAME,
                                        JUnitVersionHelper.getTestCaseName(test));
  +            // a TestSuite can contain Tests from multiple classes,
  +            // even tests with the same name - disambiguate them.
  +            currentTest.setAttribute(ATTR_CLASSNAME,
  +                                     test.getClass().getName());
               rootElement.appendChild(currentTest);
               testElements.put(test, currentTest);
           } else {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message