maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dfabul...@apache.org
Subject svn commit: r615119 - in /maven/surefire/trunk/maven-surefire-report-plugin/src: main/java/org/apache/maven/plugins/surefire/report/ test/java/org/apache/maven/plugins/surefire/report/ test/resources/test-reports/
Date Fri, 25 Jan 2008 05:56:44 GMT
Author: dfabulich
Date: Thu Jan 24 21:56:17 2008
New Revision: 615119

URL: http://svn.apache.org/viewvc?rev=615119&view=rev
Log:
Fixing additional bugs in multi-suite parser; adding additional tests

Added:
    maven/surefire/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-classWithNoTests.NoMethodsTestCase.xml
    maven/surefire/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-junit.twoTestCaseSuite.WrapperTestSuite.xml
Modified:
    maven/surefire/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParser.java
    maven/surefire/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportParserTest.java

Modified: maven/surefire/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParser.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParser.java?rev=615119&r1=615118&r2=615119&view=diff
==============================================================================
--- maven/surefire/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParser.java
(original)
+++ maven/surefire/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParser.java
Thu Jan 24 21:56:17 2008
@@ -64,9 +64,12 @@
 
         saxParser.parse( new File( xmlPath ), this );
         
-        if ( defaultSuite.getNumberOfTests() == 0 )
-        {
-            classesToSuites.remove( defaultSuite.getFullClassName() );
+        if ( currentSuite != defaultSuite )
+        { // omit the defaultSuite if it's empty and there are alternatives
+            if ( defaultSuite.getNumberOfTests() == 0 ) 
+            {
+                classesToSuites.remove( defaultSuite.getFullClassName() );
+            }
         }
         
         return classesToSuites.values();
@@ -111,6 +114,7 @@
                 
                 String fullClassName = attributes.getValue( "classname" );
                 
+                // if the testcase declares its own classname, it may need to belong to its
own suite
                 if ( fullClassName != null )
                 {
                     currentSuite = (ReportTestSuite) classesToSuites.get( fullClassName );

Modified: maven/surefire/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportParserTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportParserTest.java?rev=615119&r1=615118&r2=615119&view=diff
==============================================================================
--- maven/surefire/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportParserTest.java
(original)
+++ maven/surefire/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportParserTest.java
Thu Jan 24 21:56:17 2008
@@ -53,7 +53,7 @@
 
         List suites = report.parseXMLReportFiles();
 
-        assertEquals( 4, suites.size() );
+        assertEquals( 7, suites.size() );
 
         Iterator it = suites.iterator();
         while ( it.hasNext() )

Added: maven/surefire/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-classWithNoTests.NoMethodsTestCase.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-classWithNoTests.NoMethodsTestCase.xml?rev=615119&view=auto
==============================================================================
--- maven/surefire/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-classWithNoTests.NoMethodsTestCase.xml
(added)
+++ maven/surefire/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-classWithNoTests.NoMethodsTestCase.xml
Thu Jan 24 21:56:17 2008
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite errors="0" skipped="0" tests="0" time="0" failures="0" name="classWithNoTests.NoMethodsTestCase">
+  <properties>
+    <property value="Java(TM) 2 Runtime Environment, Standard Edition" name="java.runtime.name"/>
+    <property value="C:\devtools\jdk1.5.0_12\jre\bin" name="sun.boot.library.path"/>
+    <property value="1.5.0_12-b04" name="java.vm.version"/>
+    <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
+    <property value="http://java.sun.com/" name="java.vendor.url"/>
+    <property value=";" name="path.separator"/>
+    <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
+    <property value="sun.io" name="file.encoding.pkg"/>
+    <property value="US" name="user.country"/>
+    <property value="SUN_STANDARD" name="sun.java.launcher"/>
+    <property value="Service Pack 2" name="sun.os.patch.level"/>
+    <property value="Java Virtual Machine Specification" name="java.vm.specification.name"/>
+    <property value="C:\svn\maven\trunks\surefire\surefire-integration-tests\src\test\resources\default-configuration-classWithNoTests"
name="user.dir"/>
+    <property value="1.5.0_12-b04" name="java.runtime.version"/>
+    <property value="sun.awt.Win32GraphicsEnvironment" name="java.awt.graphicsenv"/>
+    <property value="C:\svn\maven\trunks\surefire\surefire-integration-tests\src\test\resources\default-configuration-classWithNoTests"
name="basedir"/>
+    <property value="C:\devtools\jdk1.5.0_12\jre\lib\endorsed" name="java.endorsed.dirs"/>
+    <property value="x86" name="os.arch"/>
+    <property value="C:\DOCUME~1\DAN~1.FAB\LOCALS~1\Temp\" name="java.io.tmpdir"/>
+    <property value="
+" name="line.separator"/>
+    <property value="Sun Microsystems Inc." name="java.vm.specification.vendor"/>
+    <property value="" name="user.variant"/>
+    <property value="Windows XP" name="os.name"/>
+    <property value="C:\devtools\maven-2.0.8\bin\m2.conf" name="classworlds.conf"/>
+    <property value="Cp1252" name="sun.jnu.encoding"/>
+    <property value="C:\devtools\jdk1.5.0_12\bin;.;C:\WINDOWS\system32;C:\WINDOWS;c:\devtools\apache-ant-1.7.0\bin;C:\Python25;C:\Perl\bin;C:\devtools\php-5.2.3\;c:\devtools\ruby-1.8.6-25\bin;C:\devtools\jdk1.5.0_12\bin;C:\devtools\maven-2.0.8\bin;c:\dan\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\IDM Computer Solutions\UltraEdit-32;C:\Program Files\Subversion\bin;C:\Program Files\cvsnt;C:\Program
Files\GNU\GnuPG\pub;c:\cygwin\bin;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\PostgreSQL\8.2\bin;C:\Program
Files\Perforce;" name="java.library.path"/>
+    <property value="C:\svn\maven\trunks\surefire\surefire-integration-tests\src\test\resources\default-configuration-classWithNoTests\target\test-classes;C:\svn\maven\trunks\surefire\surefire-integration-tests\src\test\resources\default-configuration-classWithNoTests\target\classes;c:\weirdlocalrepo\junit\junit\3.8.1\junit-3.8.1.jar;"
name="surefire.test.class.path"/>
+    <property value="Java Platform API Specification" name="java.specification.name"/>
+    <property value="49.0" name="java.class.version"/>
+    <property value="HotSpot Client Compiler" name="sun.management.compiler"/>
+    <property value="5.1" name="os.version"/>
+    <property value="C:\Documents and Settings\dan.fabulich" name="user.home"/>
+    <property value="America/Los_Angeles" name="user.timezone"/>
+    <property value="sun.awt.windows.WPrinterJob" name="java.awt.printerjob"/>
+    <property value="1.5" name="java.specification.version"/>
+    <property value="Cp1252" name="file.encoding"/>
+    <property value="dan.fabulich" name="user.name"/>
+    <property value="C:\devtools\maven-2.0.8\boot\classworlds-1.1.jar" name="java.class.path"/>
+    <property value="1.0" name="java.vm.specification.version"/>
+    <property value="32" name="sun.arch.data.model"/>
+    <property value="C:\devtools\jdk1.5.0_12\jre" name="java.home"/>
+    <property value="Sun Microsystems Inc." name="java.specification.vendor"/>
+    <property value="en" name="user.language"/>
+    <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
+    <property value="mixed mode" name="java.vm.info"/>
+    <property value="1.5.0_12" name="java.version"/>
+    <property value="C:\devtools\jdk1.5.0_12\jre\lib\ext" name="java.ext.dirs"/>
+    <property value="C:\devtools\jdk1.5.0_12\jre\lib\rt.jar;C:\devtools\jdk1.5.0_12\jre\lib\i18n.jar;C:\devtools\jdk1.5.0_12\jre\lib\sunrsasign.jar;C:\devtools\jdk1.5.0_12\jre\lib\jsse.jar;C:\devtools\jdk1.5.0_12\jre\lib\jce.jar;C:\devtools\jdk1.5.0_12\jre\lib\charsets.jar;C:\devtools\jdk1.5.0_12\jre\classes"
name="sun.boot.class.path"/>
+    <property value="Sun Microsystems Inc." name="java.vendor"/>
+    <property value="C:\devtools\maven-2.0.8" name="maven.home"/>
+    <property value="c:\weirdlocalrepo" name="localRepository"/>
+    <property value="\" name="file.separator"/>
+    <property value="http://java.sun.com/cgi-bin/bugreport.cgi" name="java.vendor.url.bug"/>
+    <property value="little" name="sun.cpu.endian"/>
+    <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
+    <property value="windows" name="sun.desktop"/>
+    <property value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86" name="sun.cpu.isalist"/>
+  </properties>
+</testsuite>
\ No newline at end of file

Added: maven/surefire/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-junit.twoTestCaseSuite.WrapperTestSuite.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-junit.twoTestCaseSuite.WrapperTestSuite.xml?rev=615119&view=auto
==============================================================================
--- maven/surefire/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-junit.twoTestCaseSuite.WrapperTestSuite.xml
(added)
+++ maven/surefire/trunk/maven-surefire-report-plugin/src/test/resources/test-reports/TEST-junit.twoTestCaseSuite.WrapperTestSuite.xml
Thu Jan 24 21:56:17 2008
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite errors="0" skipped="0" tests="2" time="0.094" failures="0" name="junit.twoTestCaseSuite.WrapperTestSuite">
+  <properties>
+    <property value="Java(TM) 2 Runtime Environment, Standard Edition" name="java.runtime.name"/>
+    <property value="C:\devtools\jdk1.5.0_12\jre\bin" name="sun.boot.library.path"/>
+    <property value="1.5.0_12-b04" name="java.vm.version"/>
+    <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
+    <property value="http://java.sun.com/" name="java.vendor.url"/>
+    <property value=";" name="path.separator"/>
+    <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
+    <property value="sun.io" name="file.encoding.pkg"/>
+    <property value="US" name="user.country"/>
+    <property value="SUN_STANDARD" name="sun.java.launcher"/>
+    <property value="Service Pack 2" name="sun.os.patch.level"/>
+    <property value="Java Virtual Machine Specification" name="java.vm.specification.name"/>
+    <property value="C:\svn\maven\trunks\surefire\surefire-integration-tests\src\test\resources\junit-twoTestCaseSuite"
name="user.dir"/>
+    <property value="1.5.0_12-b04" name="java.runtime.version"/>
+    <property value="sun.awt.Win32GraphicsEnvironment" name="java.awt.graphicsenv"/>
+    <property value="C:\svn\maven\trunks\surefire\surefire-integration-tests\src\test\resources\junit-twoTestCaseSuite"
name="basedir"/>
+    <property value="C:\devtools\jdk1.5.0_12\jre\lib\endorsed" name="java.endorsed.dirs"/>
+    <property value="x86" name="os.arch"/>
+    <property value="C:\DOCUME~1\DAN~1.FAB\LOCALS~1\Temp\" name="java.io.tmpdir"/>
+    <property value="
+" name="line.separator"/>
+    <property value="Sun Microsystems Inc." name="java.vm.specification.vendor"/>
+    <property value="" name="user.variant"/>
+    <property value="Windows XP" name="os.name"/>
+    <property value="C:\devtools\maven-2.0.8\bin\m2.conf" name="classworlds.conf"/>
+    <property value="Cp1252" name="sun.jnu.encoding"/>
+    <property value="C:\devtools\jdk1.5.0_12\bin;.;C:\WINDOWS\system32;C:\WINDOWS;c:\devtools\apache-ant-1.7.0\bin;C:\Python25;C:\Perl\bin;C:\devtools\php-5.2.3\;c:\devtools\ruby-1.8.6-25\bin;C:\devtools\jdk1.5.0_12\bin;C:\devtools\maven-2.0.8\bin;c:\dan\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\IDM Computer Solutions\UltraEdit-32;C:\Program Files\Subversion\bin;C:\Program Files\cvsnt;C:\Program
Files\GNU\GnuPG\pub;c:\cygwin\bin;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\PostgreSQL\8.2\bin;C:\Program
Files\Perforce;" name="java.library.path"/>
+    <property value="C:\svn\maven\trunks\surefire\surefire-integration-tests\src\test\resources\junit-twoTestCaseSuite\target\test-classes;C:\svn\maven\trunks\surefire\surefire-integration-tests\src\test\resources\junit-twoTestCaseSuite\target\classes;c:\weirdlocalrepo\junit\junit\3.8.1\junit-3.8.1.jar;"
name="surefire.test.class.path"/>
+    <property value="Java Platform API Specification" name="java.specification.name"/>
+    <property value="49.0" name="java.class.version"/>
+    <property value="HotSpot Client Compiler" name="sun.management.compiler"/>
+    <property value="5.1" name="os.version"/>
+    <property value="C:\Documents and Settings\dan.fabulich" name="user.home"/>
+    <property value="America/Los_Angeles" name="user.timezone"/>
+    <property value="sun.awt.windows.WPrinterJob" name="java.awt.printerjob"/>
+    <property value="1.5" name="java.specification.version"/>
+    <property value="Cp1252" name="file.encoding"/>
+    <property value="dan.fabulich" name="user.name"/>
+    <property value="C:\devtools\maven-2.0.8\boot\classworlds-1.1.jar" name="java.class.path"/>
+    <property value="1.0" name="java.vm.specification.version"/>
+    <property value="32" name="sun.arch.data.model"/>
+    <property value="C:\devtools\jdk1.5.0_12\jre" name="java.home"/>
+    <property value="Sun Microsystems Inc." name="java.specification.vendor"/>
+    <property value="en" name="user.language"/>
+    <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
+    <property value="mixed mode" name="java.vm.info"/>
+    <property value="1.5.0_12" name="java.version"/>
+    <property value="C:\devtools\jdk1.5.0_12\jre\lib\ext" name="java.ext.dirs"/>
+    <property value="C:\devtools\jdk1.5.0_12\jre\lib\rt.jar;C:\devtools\jdk1.5.0_12\jre\lib\i18n.jar;C:\devtools\jdk1.5.0_12\jre\lib\sunrsasign.jar;C:\devtools\jdk1.5.0_12\jre\lib\jsse.jar;C:\devtools\jdk1.5.0_12\jre\lib\jce.jar;C:\devtools\jdk1.5.0_12\jre\lib\charsets.jar;C:\devtools\jdk1.5.0_12\jre\classes"
name="sun.boot.class.path"/>
+    <property value="Sun Microsystems Inc." name="java.vendor"/>
+    <property value="C:\devtools\maven-2.0.8" name="maven.home"/>
+    <property value="c:\weirdlocalrepo" name="localRepository"/>
+    <property value="\" name="file.separator"/>
+    <property value="http://java.sun.com/cgi-bin/bugreport.cgi" name="java.vendor.url.bug"/>
+    <property value="little" name="sun.cpu.endian"/>
+    <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
+    <property value="windows" name="sun.desktop"/>
+    <property value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86" name="sun.cpu.isalist"/>
+  </properties>
+  <testcase classname="junit.twoTestCaseSuite.TestTwo" time="0" name="testTwo"/>
+  <testcase classname="junit.twoTestCaseSuite.BasicTest" time="0" name="testSetUp"/>
+</testsuite>
\ No newline at end of file



Mime
View raw message