[Yanel-commits] rev 22691 - public/yanel/trunk/src/resources/testing-control/src/java/org/wyona/yanel/impl/resources

josias at wyona.com josias at wyona.com
Thu Feb 15 20:39:12 CET 2007


Author: josias
Date: 2007-02-15 20:39:10 +0100 (Thu, 15 Feb 2007)
New Revision: 22691

Modified:
   public/yanel/trunk/src/resources/testing-control/src/java/org/wyona/yanel/impl/resources/ExecuteTests.java
Log:
fixed a bug which caused some tests to be executed multiple times. now each test should be executed only once.

Modified: public/yanel/trunk/src/resources/testing-control/src/java/org/wyona/yanel/impl/resources/ExecuteTests.java
===================================================================
--- public/yanel/trunk/src/resources/testing-control/src/java/org/wyona/yanel/impl/resources/ExecuteTests.java	2007-02-15 19:07:47 UTC (rev 22690)
+++ public/yanel/trunk/src/resources/testing-control/src/java/org/wyona/yanel/impl/resources/ExecuteTests.java	2007-02-15 19:39:10 UTC (rev 22691)
@@ -82,38 +82,39 @@
         Project project = new Project();
         project.init();
         
-        ZipFileSet junitzipfileset = new ZipFileSet();
-        ZipFileSet htmlzipfileset = new ZipFileSet();
-        htmlzipfileset.setProject(project);
-        junitzipfileset.setProject(project);
-
-        htmlzipfileset.setSrc(HtmlunitJarLocation);
-        junitzipfileset.setSrc(JunitJarLocation);
-
         try {
-            JUnitTask junit = new JUnitTask();
-            junit.setProject(project);
 
-            FormatterElement formatter = new FormatterElement();
-            formatter.setUseFile(true);
-            FormatterElement.TypeAttribute typeattribute = new FormatterElement.TypeAttribute();
-            typeattribute.setValue("xml");
-            formatter.setType(typeattribute);
+            for (int i = 0; i < testnames.length; i++) {
+                JUnitTask junit = new JUnitTask();
+                junit.setProject(project);
+                
+                FormatterElement formatter = new FormatterElement();
+                formatter.setUseFile(true);
+                FormatterElement.TypeAttribute typeattribute = new FormatterElement.TypeAttribute();
+                typeattribute.setValue("xml");
+                formatter.setType(typeattribute);
+                
+                junit.addFormatter(formatter);
+                junit.setFork(false);
+                
+                JUnitTask.SummaryAttribute summaryattr = new JUnitTask.SummaryAttribute();
+                summaryattr.setValue("true");
+                junit.setPrintsummary(summaryattr);
+                
+                junit.setHaltonerror(false);
+                junit.setHaltonfailure(false);
+                
+                BatchTest batchTest = junit.createBatchTest();
+                batchTest.setTodir(copytmpResultDir);
+                
+                ZipFileSet junitzipfileset = new ZipFileSet();
+                ZipFileSet htmlzipfileset = new ZipFileSet();
+                htmlzipfileset.setProject(project);
+                junitzipfileset.setProject(project);
 
-            junit.addFormatter(formatter);
-            junit.setFork(false);
+                htmlzipfileset.setSrc(HtmlunitJarLocation);
+                junitzipfileset.setSrc(JunitJarLocation);
 
-            JUnitTask.SummaryAttribute summaryattr = new JUnitTask.SummaryAttribute();
-            summaryattr.setValue("true");
-            junit.setPrintsummary(summaryattr);
-
-            junit.setHaltonerror(false);
-            junit.setHaltonfailure(false);
-
-            BatchTest batchTest = junit.createBatchTest();
-            batchTest.setTodir(copytmpResultDir);
-
-            for (int i = 0; i < testnames.length; i++) {
                 if(testnames[i].matches(".*Web.*")){
                     batchTest.addFileSet(htmlzipfileset);
                     htmlzipfileset.setIncludes(testnames[i]);




More information about the Yanel-commits mailing list