- Revision
- 501
- Author
- fabio.kung
- Date
- 2007-12-18 12:04:44 -0600 (Tue, 18 Dec 2007)
Log Message
integration tests had not been loaded
Modified Paths
- trunk/integration/waffle-taglib/src/main/webapp/select.jsp
- trunk/integration/waffle-taglib/src/test/java/org/codehaus/waffle/taglib/acceptance/AcceptanceSuite.java
- trunk/integration/waffle-taglib/src/test/java/org/codehaus/waffle/taglib/acceptance/IntegrationTest.java
Diff
Modified: trunk/integration/waffle-taglib/src/main/webapp/select.jsp (500 => 501)
--- trunk/integration/waffle-taglib/src/main/webapp/select.jsp 2007-12-18 17:12:17 UTC (rev 500) +++ trunk/integration/waffle-taglib/src/main/webapp/select.jsp 2007-12-18 18:04:44 UTC (rev 501) @@ -27,7 +27,7 @@ </div> test selected=2 <br /> -<w:select var="produto" name="produto.id.selected.2" items="${lista}" value="id" selected="${2}"> +<w:select var="produto" name="produto.id.selected.2" id="produto.id.selected.2" items="${lista}" value="id" selected="${2}"> ${produto.name} </w:select>
Modified: trunk/integration/waffle-taglib/src/test/java/org/codehaus/waffle/taglib/acceptance/AcceptanceSuite.java (500 => 501)
--- trunk/integration/waffle-taglib/src/test/java/org/codehaus/waffle/taglib/acceptance/AcceptanceSuite.java 2007-12-18 17:12:17 UTC (rev 500) +++ trunk/integration/waffle-taglib/src/test/java/org/codehaus/waffle/taglib/acceptance/AcceptanceSuite.java 2007-12-18 18:04:44 UTC (rev 501) @@ -1,12 +1,12 @@ package org.codehaus.waffle.taglib.acceptance; +import com.thoughtworks.selenium.DefaultSelenium; +import com.thoughtworks.selenium.Selenium; +import junit.extensions.TestSetup; +import junit.framework.Test; +import junit.framework.TestCase; import junit.framework.TestSuite; -import junit.framework.TestCase; -import junit.framework.Test; -import junit.extensions.TestSetup; import junit.runner.ClassPathTestCollector; -import com.thoughtworks.selenium.Selenium; -import com.thoughtworks.selenium.DefaultSelenium; import org.openqa.selenium.server.SeleniumServer; import java.util.Enumeration; @@ -23,20 +23,25 @@ public static Test suite() throws Exception { TestSuite suite = new TestSuite("Taglib acceptance tests"); - AcceptanceTestCollector testCollector = new AcceptanceTestCollector(); - Enumeration tests = testCollector.collectTests(); - while (tests.hasMoreElements()) { - String testName = tests.nextElement().toString(); - suite.addTestSuite((Class<? extends TestCase>) Class.forName(testName)); - } - + // FIXME auto-load all test cases +// loadAcceptanceTests(suite); suite.addTestSuite(CheckBoxTest.class); suite.addTestSuite(ErrorsTest.class); suite.addTestSuite(FormTest.class); + suite.addTestSuite(HiddenTagTest.class); + suite.addTestSuite(MessagesTest.class); + suite.addTestSuite(NumberTest.class); + suite.addTestSuite(PasswordTagTest.class); + suite.addTestSuite(SelectTest.class); + suite.addTestSuite(SelectTokensTest.class); + suite.addTestSuite(TextareaTagTest.class); TestSetup wrapper = new TestSetup(suite) { protected void setUp() throws Exception { String browserString = System.getProperty("seleniumBrowserString"); + if(browserString == null) { + browserString = "*firefox"; + } int defaultPort = SeleniumServer.getDefaultPort(); selenium = new DefaultSelenium("localhost", defaultPort, browserString, "http://localhost:8080"); selenium.start(); @@ -49,10 +54,21 @@ return wrapper; } + private static void loadAcceptanceTests(TestSuite suite) throws ClassNotFoundException, InstantiationException, IllegalAccessException { + AcceptanceTestCollector testCollector = new AcceptanceTestCollector(); + Enumeration tests = testCollector.collectTests(); + while (tests.hasMoreElements()) { + String testName = tests.nextElement().toString(); + Class<? extends TestCase> testClass = (Class<? extends TestCase>) Class.forName(testName); + testClass.newInstance(); + suite.addTestSuite(testClass); + } + } + private static class AcceptanceTestCollector extends ClassPathTestCollector { protected boolean isTestClass(String s) { - return s.matches(".*/acceptance/.*") && s.endsWith("Test.class"); + return s.matches(".*/acceptance/.*") && s.endsWith("Test.class") && !s.endsWith("IntegrationTest.class"); } } - + }
Modified: trunk/integration/waffle-taglib/src/test/java/org/codehaus/waffle/taglib/acceptance/IntegrationTest.java (500 => 501)
--- trunk/integration/waffle-taglib/src/test/java/org/codehaus/waffle/taglib/acceptance/IntegrationTest.java 2007-12-18 17:12:17 UTC (rev 500) +++ trunk/integration/waffle-taglib/src/test/java/org/codehaus/waffle/taglib/acceptance/IntegrationTest.java 2007-12-18 18:04:44 UTC (rev 501) @@ -14,6 +14,9 @@ protected void open(String url) { String contextPath = System.getProperty("seleniumContextPath"); + if(contextPath == null) { + contextPath = "/waffle-taglib-integration/"; + } getSelenium().open(contextPath + url); getSelenium().waitForPageToLoad("2000"); }
To unsubscribe from this list please visit:
