From: <fg...@us...> - 2008-08-18 19:35:11
|
Revision: 906 http://openutils.svn.sourceforge.net/openutils/?rev=906&view=rev Author: fgiust Date: 2008-08-18 19:35:10 +0000 (Mon, 18 Aug 2008) Log Message: ----------- ready for a first release Modified Paths: -------------- trunk/openutils-testing4web/pom.xml Added Paths: ----------- trunk/openutils-testing4web/src/site/ trunk/openutils-testing4web/src/site/apt/ trunk/openutils-testing4web/src/site/apt/index.apt trunk/openutils-testing4web/src/site/changes/ trunk/openutils-testing4web/src/site/changes/changes.xml trunk/openutils-testing4web/src/site/site.xml Modified: trunk/openutils-testing4web/pom.xml =================================================================== --- trunk/openutils-testing4web/pom.xml 2008-07-29 07:58:27 UTC (rev 905) +++ trunk/openutils-testing4web/pom.xml 2008-08-18 19:35:10 UTC (rev 906) @@ -13,31 +13,6 @@ <description>openutils test utils for webapps</description> <dependencies> <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-test</artifactId> - <version>${spring.version}</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - <exclusion> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.5.0</version> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>jcl104-over-slf4j</artifactId> - <version>1.5.0</version> - </dependency> - <dependency> <groupId>httpunit</groupId> <artifactId>httpunit</artifactId> <version>1.6.2</version> @@ -121,7 +96,4 @@ <version>1.7R1</version> </dependency> </dependencies> - <properties> - <spring.version>2.5.3</spring.version> - </properties> </project> \ No newline at end of file Added: trunk/openutils-testing4web/src/site/apt/index.apt =================================================================== --- trunk/openutils-testing4web/src/site/apt/index.apt (rev 0) +++ trunk/openutils-testing4web/src/site/apt/index.apt 2008-08-18 19:35:10 UTC (rev 906) @@ -0,0 +1,27 @@ + -------------------------- + O p e n u t i l s + -------------------------- + Fabrizio Giustina + -------------------------- + +openutils-testing4web + + openutils-testing4web is a base maven artifacts that puts together all the dependencies needed to run httpunit tests + (servletunit) with an embedded version of the tomcat servlet engine, with the ability to also test jsps compiled using + jasper. + + Since it's pretty hard to find out a working list of dependencies you can now depends on this single artifact. It will + be used by other openutils packages which may offer base testcases templates. + + + +Released versions + + openutils-testing-testng: + + {{{http://www.mvnrepository.com/artifact/net.sourceforge.openutils/openutils-testing4web}http://www.mvnrepository.com/artifact/net.sourceforge.openutils/openutils-testing4web}} + + openutils-testing-junit: + + {{{http://www.mvnrepository.com/artifact/net.sourceforge.openutils/openutils-testing4web}http://www.mvnrepository.com/artifact/net.sourceforge.openutils/openutils-testing4web}} + Property changes on: trunk/openutils-testing4web/src/site/apt/index.apt ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-testing4web/src/site/changes/changes.xml =================================================================== --- trunk/openutils-testing4web/src/site/changes/changes.xml (rev 0) +++ trunk/openutils-testing4web/src/site/changes/changes.xml 2008-08-18 19:35:10 UTC (rev 906) @@ -0,0 +1,15 @@ +<?xml version="1.0"?> +<!-- + "type" attribute can be: add, remove, update or fix. +--> +<document> + <properties> + <title>Changes</title> + <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> + </properties> + <body> + <release version="1.0" date="2008-08-18" description="initial release"> + <!-- --> + </release> + </body> +</document> \ No newline at end of file Property changes on: trunk/openutils-testing4web/src/site/changes/changes.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-testing4web/src/site/site.xml =================================================================== --- trunk/openutils-testing4web/src/site/site.xml (rev 0) +++ trunk/openutils-testing4web/src/site/site.xml 2008-08-18 19:35:10 UTC (rev 906) @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Openutils testing"> + <publishDate position="navigation-bottom" format="yyyy-MM-dd" /> + <version position="navigation-bottom" /> + <bannerRight> + <name>Openutils</name> + <src>http://openutils.sourceforge.net/images/openutils-logo.png</src> + <href>http://openutils.sourceforge.net</href> + </bannerRight> + <bannerLeft> + <name>Sourceforge</name> + <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> + <href>http://www.sourceforge.net/projects/openutils</href> + </bannerLeft> + <body> + <head> + <link rel="icon" href="images/favicon.ico" /> + </head> + <breadcrumbs> + <item name="openutils" href="http://openutils.sourceforge.net/" /> + <item name="openutils-testing" href="http://openutils.sourceforge.net/openutils-testing4web" /> + </breadcrumbs> + <menu name="openutils openutils-testing4web"> + <item name="About" href="index.html"></item> + </menu> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + </body> + <skin> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-maven-skin</artifactId> + <version>1.1</version> + </skin> +</project> Property changes on: trunk/openutils-testing4web/src/site/site.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2010-01-17 17:29:52
|
Revision: 1657 http://openutils.svn.sourceforge.net/openutils/?rev=1657&view=rev Author: fgiust Date: 2010-01-17 17:29:45 +0000 (Sun, 17 Jan 2010) Log Message: ----------- base test classes, upgrade to httpunit 1.7 Modified Paths: -------------- trunk/openutils-testing4web/pom.xml Added Paths: ----------- trunk/openutils-testing4web/src/main/java/net/ trunk/openutils-testing4web/src/main/java/net/sourceforge/ trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/ trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/ trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspEmbeddedTest.java trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspTestngEmbeddedTest.java trunk/openutils-testing4web/src/test/ trunk/openutils-testing4web/src/test/java/ trunk/openutils-testing4web/src/test/java/net/ trunk/openutils-testing4web/src/test/java/net/sourceforge/ trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/ trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/ trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleServletUnitTest.java trunk/openutils-testing4web/src/test/resources/ trunk/openutils-testing4web/src/test/resources/WEB-INF/ trunk/openutils-testing4web/src/test/resources/WEB-INF/web.xml trunk/openutils-testing4web/src/test/resources/jsps/ trunk/openutils-testing4web/src/test/resources/jsps/simple.jsp trunk/openutils-testing4web/src/test/resources/log4j.dtd trunk/openutils-testing4web/src/test/resources/log4j.xml Property Changed: ---------------- trunk/openutils-testing4web/ Property changes on: trunk/openutils-testing4web ___________________________________________________________________ Modified: svn:ignore - .settings target .checkstyle .classpath .project + .settings target .checkstyle .classpath .project temp-testng-customsuite.xml Modified: trunk/openutils-testing4web/pom.xml =================================================================== --- trunk/openutils-testing4web/pom.xml 2010-01-17 15:45:08 UTC (rev 1656) +++ trunk/openutils-testing4web/pom.xml 2010-01-17 17:29:45 UTC (rev 1657) @@ -4,7 +4,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils-parent</artifactId> - <version>1.0</version> + <version>1.1</version> </parent> <artifactId>openutils-testing4web</artifactId> <name>openutils web test utils</name> @@ -14,7 +14,7 @@ <dependency> <groupId>httpunit</groupId> <artifactId>httpunit</artifactId> - <version>1.6.2</version> + <version>1.7</version> <exclusions> <exclusion> <groupId>xerces</groupId> @@ -124,5 +124,43 @@ <artifactId>js</artifactId> <version>1.7R1</version> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + <version>1.5.6</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.4</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jsp-api</artifactId> + <version>2.0</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.7</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <classifier>jdk15</classifier> + <version>5.7</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.5.6</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.5.6</version> + <scope>test</scope> + </dependency> </dependencies> </project> \ No newline at end of file Added: trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspEmbeddedTest.java =================================================================== --- trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspEmbeddedTest.java (rev 0) +++ trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspEmbeddedTest.java 2010-01-17 17:29:45 UTC (rev 1657) @@ -0,0 +1,75 @@ +package net.sourceforge.openutils.testing4web; + +import java.io.File; +import java.net.URL; +import java.net.URLDecoder; +import java.util.Hashtable; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.meterware.httpunit.HttpUnitOptions; +import com.meterware.servletunit.ServletRunner; + + +/** + * Base TestCase class for jsp tests. + * @author fgiust + */ +public abstract class BaseJspEmbeddedTest +{ + + /** + * Logger. + */ + protected Logger log = LoggerFactory.getLogger(getClass()); + + /** + * HttpUnit ServletRunner. + */ + protected ServletRunner runner; + + protected String getContext() + { + return "/context"; + } + + protected String getJspUrl(String jsp) + { + return "http://localhost" + getContext() + "/jsps/" + jsp; + } + + /** + * @see junit.framework.TestCase#setUp() + */ + public void setUp() throws Exception + { + // need to pass a web.xml file to setup servletunit working directory + ClassLoader classLoader = getClass().getClassLoader(); + URL webXmlUrl = classLoader.getResource("WEB-INF/web.xml"); + String path = URLDecoder.decode(webXmlUrl.getFile(), "UTF-8"); + + HttpUnitOptions.setDefaultCharacterSet("utf-8"); + System.setProperty("file.encoding", "utf-8"); + + // start servletRunner + runner = new ServletRunner(new File(path), getContext()); + + Hashtable<String, String> params = new Hashtable<String, String>(); + params.put("javaEncoding", "utf-8"); + runner.registerServlet("*.jsp", "org.apache.jasper.servlet.JspServlet", params); + + log.debug("ServletRunner setup OK"); + + } + + /** + * @see junit.framework.TestCase#tearDown() + */ + public void tearDown() throws Exception + { + // shutdown servlet engine + runner.shutDown(); + } + +} \ No newline at end of file Property changes on: trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspEmbeddedTest.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspTestngEmbeddedTest.java =================================================================== --- trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspTestngEmbeddedTest.java (rev 0) +++ trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspTestngEmbeddedTest.java 2010-01-17 17:29:45 UTC (rev 1657) @@ -0,0 +1,34 @@ +package net.sourceforge.openutils.testing4web; + +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; + + +/** + * @author fgiust + * @version $Id$ + */ +public abstract class BaseJspTestngEmbeddedTest extends BaseJspEmbeddedTest +{ + + /** + * {@inheritDoc} + */ + @Override + @BeforeClass + public void setUp() throws Exception + { + super.setUp(); + } + + /** + * {@inheritDoc} + */ + @Override + @AfterClass + public void tearDown() throws Exception + { + super.tearDown(); + } + +} Property changes on: trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspTestngEmbeddedTest.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleServletUnitTest.java =================================================================== --- trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleServletUnitTest.java (rev 0) +++ trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleServletUnitTest.java 2010-01-17 17:29:45 UTC (rev 1657) @@ -0,0 +1,27 @@ +package net.sourceforge.openutils.testing4web; + +import org.testng.Assert; +import org.testng.annotations.Test; + +import com.meterware.httpunit.GetMethodWebRequest; +import com.meterware.httpunit.WebRequest; +import com.meterware.httpunit.WebResponse; + + +/** + * @author fgiust + * @version $Id$ + */ +public class SampleServletUnitTest extends BaseJspTestngEmbeddedTest +{ + + @Test + public void capitaliseAllWordsTest() throws Exception + { + WebRequest request = new GetMethodWebRequest(getJspUrl("simple.jsp")); + WebResponse response = runner.getResponse(request); + + String responseText = response.getText(); + Assert.assertEquals(responseText, "jsp output"); + } +} Property changes on: trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleServletUnitTest.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-testing4web/src/test/resources/WEB-INF/web.xml =================================================================== --- trunk/openutils-testing4web/src/test/resources/WEB-INF/web.xml (rev 0) +++ trunk/openutils-testing4web/src/test/resources/WEB-INF/web.xml 2010-01-17 17:29:45 UTC (rev 1657) @@ -0,0 +1,12 @@ +<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> + <description>Base web.xml for tests</description> + <mime-mapping> + <extension>jsp</extension> + <mime-type>text/html</mime-type> + </mime-mapping> + <taglib> + <taglib-uri>http://openutils.sf.net/openutils-stringutils</taglib-uri> + <taglib-location>/../classes/META-INF/stringutils.tld</taglib-location> + </taglib> +</web-app> \ No newline at end of file Property changes on: trunk/openutils-testing4web/src/test/resources/WEB-INF/web.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-testing4web/src/test/resources/jsps/simple.jsp =================================================================== --- trunk/openutils-testing4web/src/test/resources/jsps/simple.jsp (rev 0) +++ trunk/openutils-testing4web/src/test/resources/jsps/simple.jsp 2010-01-17 17:29:45 UTC (rev 1657) @@ -0,0 +1,3 @@ +<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page"> + <jsp:text>jsp output</jsp:text> +</jsp:root> \ No newline at end of file Property changes on: trunk/openutils-testing4web/src/test/resources/jsps/simple.jsp ___________________________________________________________________ Added: svn:mime-type + text/xml Added: svn:eol-style + native Added: trunk/openutils-testing4web/src/test/resources/log4j.dtd =================================================================== --- trunk/openutils-testing4web/src/test/resources/log4j.dtd (rev 0) +++ trunk/openutils-testing4web/src/test/resources/log4j.dtd 2010-01-17 17:29:45 UTC (rev 1657) @@ -0,0 +1,166 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<!-- Authors: Chris Taylor, Ceki Gulcu. --> + +<!-- Version: 1.2 --> + +<!-- A configuration element consists of optional renderer +elements,appender elements, categories and an optional root +element. --> + +<!ELEMENT log4j:configuration (renderer*, appender*,(category|logger)*,root?, + categoryFactory?)> + +<!-- The "threshold" attribute takes a level value such that all --> +<!-- logging statements with a level equal or below this value are --> +<!-- disabled. --> + +<!-- Setting the "debug" enable the printing of internal log4j logging --> +<!-- statements. --> + +<!-- By default, debug attribute is "null", meaning that we not do touch --> +<!-- internal log4j logging settings. The "null" value for the threshold --> +<!-- attribute can be misleading. The threshold field of a repository --> +<!-- cannot be set to null. The "null" value for the threshold attribute --> +<!-- simply means don't touch the threshold field, the threshold field --> +<!-- keeps its old value. --> + +<!ATTLIST log4j:configuration + xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/" + threshold (all|debug|info|warn|error|fatal|off|null) "null" + debug (true|false|null) "null" +> + +<!-- renderer elements allow the user to customize the conversion of --> +<!-- message objects to String. --> + +<!ELEMENT renderer EMPTY> +<!ATTLIST renderer + renderedClass CDATA #REQUIRED + renderingClass CDATA #REQUIRED +> + +<!-- Appenders must have a name and a class. --> +<!-- Appenders may contain an error handler, a layout, optional parameters --> +<!-- and filters. They may also reference (or include) other appenders. --> +<!ELEMENT appender (errorHandler?, param*, layout?, filter*, appender-ref*)> +<!ATTLIST appender + name ID #REQUIRED + class CDATA #REQUIRED +> + +<!ELEMENT layout (param*)> +<!ATTLIST layout + class CDATA #REQUIRED +> + +<!ELEMENT filter (param*)> +<!ATTLIST filter + class CDATA #REQUIRED +> + +<!-- ErrorHandlers can be of any class. They can admit any number of --> +<!-- parameters. --> + +<!ELEMENT errorHandler (param*, root-ref?, logger-ref*, appender-ref?)> +<!ATTLIST errorHandler + class CDATA #REQUIRED +> + +<!ELEMENT root-ref EMPTY> + +<!ELEMENT logger-ref EMPTY> +<!ATTLIST logger-ref + ref IDREF #REQUIRED +> + +<!ELEMENT param EMPTY> +<!ATTLIST param + name CDATA #REQUIRED + value CDATA #REQUIRED +> + + +<!-- The priority class is org.apache.log4j.Level by default --> +<!ELEMENT priority (param*)> +<!ATTLIST priority + class CDATA #IMPLIED + value CDATA #REQUIRED +> + +<!-- The level class is org.apache.log4j.Level by default --> +<!ELEMENT level (param*)> +<!ATTLIST level + class CDATA #IMPLIED + value CDATA #REQUIRED +> + + +<!-- If no level element is specified, then the configurator MUST not --> +<!-- touch the level of the named category. --> +<!ELEMENT category (param*,(priority|level)?,appender-ref*)> +<!ATTLIST category + class CDATA #IMPLIED + name CDATA #REQUIRED + additivity (true|false) "true" +> + +<!-- If no level element is specified, then the configurator MUST not --> +<!-- touch the level of the named logger. --> +<!ELEMENT logger (level?,appender-ref*)> +<!ATTLIST logger + name ID #REQUIRED + additivity (true|false) "true" +> + + +<!ELEMENT categoryFactory (param*)> +<!ATTLIST categoryFactory + class CDATA #REQUIRED> + +<!ELEMENT appender-ref EMPTY> +<!ATTLIST appender-ref + ref IDREF #REQUIRED +> + +<!-- If no priority element is specified, then the configurator MUST not --> +<!-- touch the priority of root. --> +<!-- The root category always exists and cannot be subclassed. --> +<!ELEMENT root (param*, (priority|level)?, appender-ref*)> + + +<!-- ==================================================================== --> +<!-- A logging event --> +<!-- ==================================================================== --> +<!ELEMENT log4j:eventSet (log4j:event*)> +<!ATTLIST log4j:eventSet + xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/" + version (1.1|1.2) "1.2" + includesLocationInfo (true|false) "true" +> + + + +<!ELEMENT log4j:event (log4j:message, log4j:NDC?, log4j:throwable?, + log4j:locationInfo?) > + +<!-- The timestamp format is application dependent. --> +<!ATTLIST log4j:event + logger CDATA #REQUIRED + level CDATA #REQUIRED + thread CDATA #REQUIRED + timestamp CDATA #REQUIRED +> + +<!ELEMENT log4j:message (#PCDATA)> +<!ELEMENT log4j:NDC (#PCDATA)> + +<!ELEMENT log4j:throwable (#PCDATA)> + +<!ELEMENT log4j:locationInfo EMPTY> +<!ATTLIST log4j:locationInfo + class CDATA #REQUIRED + method CDATA #REQUIRED + file CDATA #REQUIRED + line CDATA #REQUIRED +> Property changes on: trunk/openutils-testing4web/src/test/resources/log4j.dtd ___________________________________________________________________ Added: svn:mime-type + text/xml Added: svn:eol-style + native Added: trunk/openutils-testing4web/src/test/resources/log4j.xml =================================================================== --- trunk/openutils-testing4web/src/test/resources/log4j.xml (rev 0) +++ trunk/openutils-testing4web/src/test/resources/log4j.xml 2010-01-17 17:29:45 UTC (rev 1657) @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> +<log4j:configuration> + <!-- log4j test configuration --> + <appender name="test-appender" class="org.apache.log4j.ConsoleAppender"> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%-5p %c.%M(%C{1}.java:%L) %m%n" /> + </layout> + </appender> + <category name="org"> + <priority value="WARN" /> + </category> + <category name="com"> + <priority value="WARN" /> + </category> + <category name="net"> + <priority value="WARN" /> + </category> + <category name="info"> + <priority value="WARN" /> + </category> + <category name="it"> + <priority value="WARN" /> + </category> + <root> + <priority value="debug" /> + <appender-ref ref="test-appender" /> + </root> +</log4j:configuration> \ No newline at end of file Property changes on: trunk/openutils-testing4web/src/test/resources/log4j.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2010-01-18 17:09:07
|
Revision: 1672 http://openutils.svn.sourceforge.net/openutils/?rev=1672&view=rev Author: fgiust Date: 2010-01-18 17:08:51 +0000 (Mon, 18 Jan 2010) Log Message: ----------- ready for a first release Modified Paths: -------------- trunk/openutils-testing4web/pom.xml trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspEmbeddedTest.java trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspTestngEmbeddedTest.java trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleEL.java Added Paths: ----------- trunk/openutils-testing4web/src/main/assembly/ trunk/openutils-testing4web/src/main/assembly/assembly-bundle.xml trunk/openutils-testing4web/src/main/bundle/ trunk/openutils-testing4web/src/main/bundle/LICENSE.txt trunk/openutils-testing4web/src/main/bundle/README.txt trunk/openutils-testing4web/src/main/etc/ trunk/openutils-testing4web/src/main/etc/header.txt trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspJunitEmbeddedTest.java trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleJunitServletUnitTest.java trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleTestNgServletUnitTest.java trunk/openutils-testing4web/src/test/resources/jsps/withtaglib.txt Removed Paths: ------------- trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleServletUnitTest.java Modified: trunk/openutils-testing4web/pom.xml =================================================================== --- trunk/openutils-testing4web/pom.xml 2010-01-18 16:23:33 UTC (rev 1671) +++ trunk/openutils-testing4web/pom.xml 2010-01-18 17:08:51 UTC (rev 1672) @@ -7,9 +7,67 @@ <version>1.1</version> </parent> <artifactId>openutils-testing4web</artifactId> - <name>openutils web test utils</name> + <name>Openutils web test utils</name> <version>1.1-SNAPSHOT</version> - <description>openutils test utils for webapps</description> + <inceptionYear>2008</inceptionYear> + <description>A simple infrastructure to build unit tests using ServletUnit, with all the needed Maven dependencies + already set up</description> + <licenses> + <license> + <name>The Apache Software License, Version 2.0</name> + <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> + </license> + </licenses> + <url>http://www.openmindlab.com/lab/products/testing4web.html</url> + <issueManagement> + <system>jira</system> + <url>http://jira.openmindlab.com/browse/TESTINGWEB</url> + </issueManagement> + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <executions> + <execution> + <id>bundle</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + </execution> + </executions> + <configuration> + <descriptors> + <descriptor>${basedir}/src/main/assembly/assembly-bundle.xml</descriptor> + </descriptors> + </configuration> + </plugin> + <plugin> + <groupId>com.mycila.maven-license-plugin</groupId> + <artifactId>maven-license-plugin</artifactId> + <version>1.5.0</version> + <configuration> + <header>src/main/etc/header.txt</header> + <includes> + <include>src/**/*.java</include> + </includes> + <properties> + <year>${project.inceptionYear}-2010</year> + <name>${project.name}</name> + <description>${project.description}</description> + <url>${project.url}</url> + </properties> + </configuration> + <executions> + <execution> + <goals> + <goal>check</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> <dependencies> <dependency> <groupId>httpunit</groupId> @@ -45,7 +103,7 @@ <dependency> <groupId>tomcat</groupId> <artifactId>jasper-compiler-jdt</artifactId> - <version>5.5.12</version> + <version>${tomcat.version}</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> @@ -55,8 +113,8 @@ </dependency> <dependency> <groupId>tomcat</groupId> - <artifactId>naming-resources</artifactId> - <version>5.5.15</version> + <artifactId>jasper-runtime</artifactId> + <version>${tomcat.version}</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> @@ -66,8 +124,8 @@ </dependency> <dependency> <groupId>tomcat</groupId> - <artifactId>jasper-runtime</artifactId> - <version>5.5.12</version> + <artifactId>jasper-compiler</artifactId> + <version>${tomcat.version}</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> @@ -77,8 +135,8 @@ </dependency> <dependency> <groupId>tomcat</groupId> - <artifactId>jasper-compiler</artifactId> - <version>5.5.12</version> + <artifactId>naming-resources</artifactId> + <version>${tomcat.version}</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> @@ -89,7 +147,7 @@ <dependency> <groupId>tomcat</groupId> <artifactId>naming-factory</artifactId> - <version>5.5.15</version> + <version>${tomcat.version}</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> @@ -157,10 +215,23 @@ <version>1.5.6</version> </dependency> <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.4</version> + </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>1.4</version> + </dependency> + <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1.5.6</version> <scope>test</scope> </dependency> </dependencies> + <properties> + <tomcat.version>5.5.23</tomcat.version> + </properties> </project> \ No newline at end of file Added: trunk/openutils-testing4web/src/main/assembly/assembly-bundle.xml =================================================================== --- trunk/openutils-testing4web/src/main/assembly/assembly-bundle.xml (rev 0) +++ trunk/openutils-testing4web/src/main/assembly/assembly-bundle.xml 2010-01-18 17:08:51 UTC (rev 1672) @@ -0,0 +1,34 @@ +<assembly> + <id>bundle</id> + <formats> + <format>zip</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <fileSets> + <fileSet> + <filtered>true</filtered> + <outputDirectory>/</outputDirectory> + <lineEnding>crlf</lineEnding> + <directory>${basedir}/src/main/bundle</directory> + <includes> + <include>*</include> + </includes> + </fileSet> + <fileSet> + <directory>.</directory> + <outputDirectory>/sources/</outputDirectory> + <includes> + <include>src/**/*</include> + <include>pom.xml</include> + </includes> + </fileSet> + </fileSets> + <dependencySets> + <dependencySet> + <outputDirectory>bin</outputDirectory> + <includes> + <include>net.sourceforge.openutils:*</include> + </includes> + </dependencySet> + </dependencySets> +</assembly> \ No newline at end of file Property changes on: trunk/openutils-testing4web/src/main/assembly/assembly-bundle.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-testing4web/src/main/bundle/LICENSE.txt =================================================================== --- trunk/openutils-testing4web/src/main/bundle/LICENSE.txt (rev 0) +++ trunk/openutils-testing4web/src/main/bundle/LICENSE.txt 2010-01-18 17:08:51 UTC (rev 1672) @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. Property changes on: trunk/openutils-testing4web/src/main/bundle/LICENSE.txt ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-testing4web/src/main/bundle/README.txt =================================================================== --- trunk/openutils-testing4web/src/main/bundle/README.txt (rev 0) +++ trunk/openutils-testing4web/src/main/bundle/README.txt 2010-01-18 17:08:51 UTC (rev 1672) @@ -0,0 +1,53 @@ +=========================================================== + +${pom.name} ${pom.version} +by ${pom.organization.name} + +=========================================================== + +${pom.description} + +More information about this project can be found at: +${pom.url} + +Change log and known issues can be found at: +${pom.issueManagement.url} + +Source is available from the subversion repository at: +${pom.scm.url} + +========================================= + USAGE +========================================= + +The preferred way to add ${pom.name} to your project is using maven. +You can declare the following dependency in your pom.xml: + + <dependency> + <groupId>${pom.groupId}</groupId> + <artifactId>${pom.artifactId}</artifactId> + <version>${pom.version}</version> + </dependency> + +Alternatively, you can add the ${pom.artifactId} plus the required dependencies +manually to the classpath of your application. + + +========================================= + LICENSE +========================================= + +Copyright Openmind http://www.openmindonline.it + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + Property changes on: trunk/openutils-testing4web/src/main/bundle/README.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-testing4web/src/main/etc/header.txt =================================================================== --- trunk/openutils-testing4web/src/main/etc/header.txt (rev 0) +++ trunk/openutils-testing4web/src/main/etc/header.txt 2010-01-18 17:08:51 UTC (rev 1672) @@ -0,0 +1,15 @@ + +${name} (${url}) +Copyright(C) ${year}, Openmind S.r.l. http://www.openmindonline.it + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file Property changes on: trunk/openutils-testing4web/src/main/etc/header.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspEmbeddedTest.java =================================================================== --- trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspEmbeddedTest.java 2010-01-18 16:23:33 UTC (rev 1671) +++ trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspEmbeddedTest.java 2010-01-18 17:08:51 UTC (rev 1672) @@ -1,19 +1,44 @@ +/** + * + * Openutils web test utils (http://www.openmindlab.com/lab/products/testing4web.html) + * Copyright (C)2008 - 2010, Openmind S.r.l. http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package net.sourceforge.openutils.testing4web; import java.io.File; +import java.io.InputStream; import java.net.URL; import java.net.URLDecoder; import java.util.Hashtable; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.meterware.httpunit.GetMethodWebRequest; import com.meterware.httpunit.HttpUnitOptions; +import com.meterware.httpunit.WebRequest; +import com.meterware.httpunit.WebResponse; import com.meterware.servletunit.ServletRunner; /** - * Base TestCase class for jsp tests. + * Base TestCase class for jsp/web tests. Developers should not use this class directly, but extends the junit or Testng + * implementation, according to their preferences. * @author fgiust */ public abstract class BaseJspEmbeddedTest @@ -72,4 +97,28 @@ runner.shutDown(); } + protected void checkGetWithExpectedTxt(String jspname) throws Exception + { + WebRequest request = new GetMethodWebRequest(getJspUrl(jspname)); + + WebResponse response = runner.getResponse(request); + + if (log.isDebugEnabled()) + { + log.debug("RESPONSE: " + response.getText()); + } + + String responseText = response.getText(); + + String expectedFileName = StringUtils.substringBeforeLast(jspname, ".") + ".txt"; + + InputStream stream = getClass().getResourceAsStream("/jsps/" + expectedFileName); + String expected = IOUtils.toString(stream); + IOUtils.closeQuietly(stream); + + assertEquals(responseText, expected); + } + + protected abstract void assertEquals(String expected, String actual); + } \ No newline at end of file Added: trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspJunitEmbeddedTest.java =================================================================== --- trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspJunitEmbeddedTest.java (rev 0) +++ trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspJunitEmbeddedTest.java 2010-01-18 17:08:51 UTC (rev 1672) @@ -0,0 +1,62 @@ +/** + * + * Openutils web test utils (http://www.openmindlab.com/lab/products/testing4web.html) + * Copyright (C)2008 - 2010, Openmind S.r.l. http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package net.sourceforge.openutils.testing4web; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; + + +/** + * @author fgiust + * @version $Id$ + */ +public abstract class BaseJspJunitEmbeddedTest extends BaseJspEmbeddedTest +{ + + /** + * {@inheritDoc} + */ + @Override + @Before + public void setUp() throws Exception + { + super.setUp(); + } + + /** + * {@inheritDoc} + */ + @Override + @After + public void tearDown() throws Exception + { + super.tearDown(); + } + + /** + * {@inheritDoc} + */ + @Override + protected void assertEquals(String expected, String actual) + { + Assert.assertEquals(expected, actual); + } + +} Property changes on: trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspJunitEmbeddedTest.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspTestngEmbeddedTest.java =================================================================== --- trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspTestngEmbeddedTest.java 2010-01-18 16:23:33 UTC (rev 1671) +++ trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspTestngEmbeddedTest.java 2010-01-18 17:08:51 UTC (rev 1672) @@ -1,5 +1,24 @@ +/** + * + * Openutils web test utils (http://www.openmindlab.com/lab/products/testing4web.html) + * Copyright (C)2008 - 2010, Openmind S.r.l. http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package net.sourceforge.openutils.testing4web; +import org.testng.Assert; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -31,4 +50,13 @@ super.tearDown(); } + /** + * {@inheritDoc} + */ + @Override + protected void assertEquals(String expected, String actual) + { + Assert.assertEquals(actual, expected); + } + } Modified: trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleEL.java =================================================================== --- trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleEL.java 2010-01-18 16:23:33 UTC (rev 1671) +++ trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleEL.java 2010-01-18 17:08:51 UTC (rev 1672) @@ -1,3 +1,21 @@ +/** + * + * Openutils web test utils (http://www.openmindlab.com/lab/products/testing4web.html) + * Copyright (C)2008 - 2010, Openmind S.r.l. http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package net.sourceforge.openutils.testing4web; /** Added: trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleJunitServletUnitTest.java =================================================================== --- trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleJunitServletUnitTest.java (rev 0) +++ trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleJunitServletUnitTest.java 2010-01-18 17:08:51 UTC (rev 1672) @@ -0,0 +1,62 @@ +/** + * + * Openutils web test utils (http://www.openmindlab.com/lab/products/testing4web.html) + * Copyright (C)2008 - 2010, Openmind S.r.l. http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package net.sourceforge.openutils.testing4web; + +import junit.framework.Assert; + +import org.junit.Test; + +import com.meterware.httpunit.GetMethodWebRequest; +import com.meterware.httpunit.WebRequest; +import com.meterware.httpunit.WebResponse; + + +/** + * @author fgiust + * @version $Id$ + */ +public class SampleJunitServletUnitTest extends BaseJspJunitEmbeddedTest +{ + + @Test + public void simpleTest() throws Exception + { + WebRequest request = new GetMethodWebRequest(getJspUrl("simple.jsp")); + WebResponse response = runner.getResponse(request); + + String responseText = response.getText(); + Assert.assertEquals(responseText, "jsp output"); + } + + @Test + public void withtaglibTest() throws Exception + { + WebRequest request = new GetMethodWebRequest(getJspUrl("withtaglib.jsp")); + WebResponse response = runner.getResponse(request); + + String responseText = response.getText(); + Assert.assertEquals(responseText, "EL working"); + } + + @Test + public void txtTest() throws Exception + { + checkGetWithExpectedTxt("withtaglib.jsp"); + } +} Property changes on: trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleJunitServletUnitTest.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Deleted: trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleServletUnitTest.java =================================================================== --- trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleServletUnitTest.java 2010-01-18 16:23:33 UTC (rev 1671) +++ trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleServletUnitTest.java 2010-01-18 17:08:51 UTC (rev 1672) @@ -1,37 +0,0 @@ -package net.sourceforge.openutils.testing4web; - -import org.testng.Assert; -import org.testng.annotations.Test; - -import com.meterware.httpunit.GetMethodWebRequest; -import com.meterware.httpunit.WebRequest; -import com.meterware.httpunit.WebResponse; - - -/** - * @author fgiust - * @version $Id$ - */ -public class SampleServletUnitTest extends BaseJspTestngEmbeddedTest -{ - - @Test - public void simpleTest() throws Exception - { - WebRequest request = new GetMethodWebRequest(getJspUrl("simple.jsp")); - WebResponse response = runner.getResponse(request); - - String responseText = response.getText(); - Assert.assertEquals(responseText, "jsp output"); - } - - @Test - public void withtaglibTest() throws Exception - { - WebRequest request = new GetMethodWebRequest(getJspUrl("withtaglib.jsp")); - WebResponse response = runner.getResponse(request); - - String responseText = response.getText(); - Assert.assertEquals(responseText, "EL working"); - } -} Copied: trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleTestNgServletUnitTest.java (from rev 1663, trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleServletUnitTest.java) =================================================================== --- trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleTestNgServletUnitTest.java (rev 0) +++ trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleTestNgServletUnitTest.java 2010-01-18 17:08:51 UTC (rev 1672) @@ -0,0 +1,61 @@ +/** + * + * Openutils web test utils (http://www.openmindlab.com/lab/products/testing4web.html) + * Copyright (C)2008 - 2010, Openmind S.r.l. http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package net.sourceforge.openutils.testing4web; + +import org.testng.Assert; +import org.testng.annotations.Test; + +import com.meterware.httpunit.GetMethodWebRequest; +import com.meterware.httpunit.WebRequest; +import com.meterware.httpunit.WebResponse; + + +/** + * @author fgiust + * @version $Id$ + */ +public class SampleTestNgServletUnitTest extends BaseJspTestngEmbeddedTest +{ + + @Test + public void simpleTest() throws Exception + { + WebRequest request = new GetMethodWebRequest(getJspUrl("simple.jsp")); + WebResponse response = runner.getResponse(request); + + String responseText = response.getText(); + Assert.assertEquals(responseText, "jsp output"); + } + + @Test + public void withtaglibTest() throws Exception + { + WebRequest request = new GetMethodWebRequest(getJspUrl("withtaglib.jsp")); + WebResponse response = runner.getResponse(request); + + String responseText = response.getText(); + Assert.assertEquals(responseText, "EL working"); + } + + @Test + public void txtTest() throws Exception + { + checkGetWithExpectedTxt("withtaglib.jsp"); + } +} Added: trunk/openutils-testing4web/src/test/resources/jsps/withtaglib.txt =================================================================== --- trunk/openutils-testing4web/src/test/resources/jsps/withtaglib.txt (rev 0) +++ trunk/openutils-testing4web/src/test/resources/jsps/withtaglib.txt 2010-01-18 17:08:51 UTC (rev 1672) @@ -0,0 +1 @@ +EL working \ No newline at end of file Property changes on: trunk/openutils-testing4web/src/test/resources/jsps/withtaglib.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2010-02-24 22:25:45
|
Revision: 2054 http://openutils.svn.sourceforge.net/openutils/?rev=2054&view=rev Author: fgiust Date: 2010-02-24 22:25:38 +0000 (Wed, 24 Feb 2010) Log Message: ----------- general cleanup, finally solved the problem with the stacktrace logged by tomcat by moving tlds found in the classpath to the test dir Modified Paths: -------------- trunk/openutils-testing4web/pom.xml trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspEmbeddedTest.java trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspJunitEmbeddedTest.java trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspTestngEmbeddedTest.java trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/TestServletOptions.java trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/TestTldLocationsCache.java trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleEL.java trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleJunitServletUnitTest.java trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleTestNgServletUnitTest.java Removed Paths: ------------- trunk/openutils-testing4web/src/site/changes/ Modified: trunk/openutils-testing4web/pom.xml =================================================================== --- trunk/openutils-testing4web/pom.xml 2010-02-24 15:55:45 UTC (rev 2053) +++ trunk/openutils-testing4web/pom.xml 2010-02-24 22:25:38 UTC (rev 2054) @@ -1,4 +1,5 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>net.sourceforge.openutils</groupId> @@ -6,7 +7,7 @@ <version>1.2</version> </parent> <artifactId>openutils-testing4web</artifactId> - <name>Openutils web test utils</name> + <name>Openutils testing4web</name> <version>1.1.1-SNAPSHOT</version> <inceptionYear>2008</inceptionYear> <description>A simple infrastructure to build unit tests using ServletUnit, with all the needed Maven dependencies Modified: trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspEmbeddedTest.java =================================================================== --- trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspEmbeddedTest.java 2010-02-24 15:55:45 UTC (rev 2053) +++ trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspEmbeddedTest.java 2010-02-24 22:25:38 UTC (rev 2054) @@ -1,6 +1,6 @@ /** * - * Openutils web test utils (http://www.openmindlab.com/lab/products/testing4web.html) + * Openutils testing4web (http://www.openmindlab.com/lab/products/testing4web.html) * Copyright(C) 2008-2010, Openmind S.r.l. http://www.openmindonline.it * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -20,6 +20,7 @@ import java.io.File; import java.io.InputStream; +import java.io.UnsupportedEncodingException; import java.net.URL; import java.net.URLDecoder; import java.util.Hashtable; @@ -54,54 +55,101 @@ */ protected ServletRunner runner; + /** + * The context path (by default "/context" + * @return the context path + */ protected String getContext() { return "/context"; } + /** + * Returns the path to a test web.xml available in the classpath, by default "WEB-INF/web.xml" + * @return path to a test web.xml available in the classpath + */ + protected String getWebXmlPathInClasspath() + { + return "WEB-INF/web.xml"; + } + + /** + * Returns the url used for accessing a jsp (defaults to "http://localhost" + getContext() + "/jsps/" + jsp) + * @param jsp jsp filename + * @return full url that can be used for servletunit requests + */ protected String getJspUrl(String jsp) { return "http://localhost" + getContext() + "/jsps/" + jsp; } /** - * @see junit.framework.TestCase#setUp() + * Setup Servletunit + * @throws Exception */ public void setUp() throws Exception { - // need to pass a web.xml file to setup servletunit working directory - ClassLoader classLoader = getClass().getClassLoader(); - URL webXmlUrl = classLoader.getResource("WEB-INF/web.xml"); - String path = URLDecoder.decode(webXmlUrl.getFile(), "UTF-8"); + File webxmlFile = getWebXml(); + if (!webxmlFile.exists()) + { + throw new AssertionError("No " + getWebXmlPathInClasspath() + " found in classpath"); + } HttpUnitOptions.setDefaultCharacterSet("utf-8"); System.setProperty("file.encoding", "utf-8"); // start servletRunner - runner = new ServletRunner(new File(path), getContext()); + runner = new ServletRunner(webxmlFile, getContext()); Hashtable<String, String> params = new Hashtable<String, String>(); params.put("javaEncoding", "utf-8"); params.put("development", "true"); params.put("keepgenerated", "false"); - params.put("modificationTestInterval", Integer.toString(Integer.MAX_VALUE / 1000)); + params.put("modificationTestInterval", "1000"); params.put("engineOptionsClass", TestServletOptions.class.getName()); runner.registerServlet("*.jsp", "org.apache.jasper.servlet.JspServlet", params); log.debug("ServletRunner setup OK"); + } + /** + * Returns the web.xml file, by loading the path specified by {@link #getWebXmlPathInClasspath()} from the classpath + * @return web.xml file + */ + protected File getWebXml() + { + // need to pass a web.xml file to setup servletunit working directory + ClassLoader classLoader = getClass().getClassLoader(); + URL webXmlUrl = classLoader.getResource(getWebXmlPathInClasspath()); + String path = null; + try + { + path = URLDecoder.decode(webXmlUrl.getFile(), "UTF-8"); + } + catch (UnsupportedEncodingException e) + { + // can't happen + } + File webxmlFile = new File(path); + return webxmlFile; } /** - * @see junit.framework.TestCase#tearDown() + * Tear down ServletUnit */ - public void tearDown() throws Exception + public void tearDown() { // shutdown servlet engine runner.shutDown(); } + /** + * Do a get request to the specified jsp and compare the results with a txt file found in the classpath (path + * "/jsps/<em>jspname.txt</em>" + * @param jspname jsp file name + * @throws Exception any exception thrown by servletunit + */ protected void checkGetWithExpectedTxt(String jspname) throws Exception { WebRequest request = new GetMethodWebRequest(getJspUrl(jspname)); @@ -124,6 +172,11 @@ assertEquals(responseText, expected); } + /** + * A generic assertEquals method that redirect to the appropriate junit/testng implementation. + * @param expected expected value + * @param actual actual value + */ protected abstract void assertEquals(String expected, String actual); } \ No newline at end of file Modified: trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspJunitEmbeddedTest.java =================================================================== --- trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspJunitEmbeddedTest.java 2010-02-24 15:55:45 UTC (rev 2053) +++ trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspJunitEmbeddedTest.java 2010-02-24 22:25:38 UTC (rev 2054) @@ -1,6 +1,6 @@ /** * - * Openutils web test utils (http://www.openmindlab.com/lab/products/testing4web.html) + * Openutils testing4web (http://www.openmindlab.com/lab/products/testing4web.html) * Copyright(C) 2008-2010, Openmind S.r.l. http://www.openmindonline.it * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,6 +24,7 @@ /** + * Base TestCase class for jsp/web tests, junit flavor. * @author fgiust * @version $Id$ */ @@ -45,7 +46,7 @@ */ @Override @After - public void tearDown() throws Exception + public void tearDown() { super.tearDown(); } Modified: trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspTestngEmbeddedTest.java =================================================================== --- trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspTestngEmbeddedTest.java 2010-02-24 15:55:45 UTC (rev 2053) +++ trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/BaseJspTestngEmbeddedTest.java 2010-02-24 22:25:38 UTC (rev 2054) @@ -1,6 +1,6 @@ /** * - * Openutils web test utils (http://www.openmindlab.com/lab/products/testing4web.html) + * Openutils testing4web (http://www.openmindlab.com/lab/products/testing4web.html) * Copyright(C) 2008-2010, Openmind S.r.l. http://www.openmindonline.it * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,6 +24,7 @@ /** + * Base TestCase class for jsp/web tests, testng flavor. * @author fgiust * @version $Id$ */ @@ -45,7 +46,7 @@ */ @Override @AfterClass - public void tearDown() throws Exception + public void tearDown() { super.tearDown(); } Modified: trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/TestServletOptions.java =================================================================== --- trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/TestServletOptions.java 2010-02-24 15:55:45 UTC (rev 2053) +++ trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/TestServletOptions.java 2010-02-24 22:25:38 UTC (rev 2054) @@ -1,6 +1,6 @@ /** * - * Openutils web test utils (http://www.openmindlab.com/lab/products/testing4web.html) + * Openutils testing4web (http://www.openmindlab.com/lab/products/testing4web.html) * Copyright(C) 2008-2010, Openmind S.r.l. http://www.openmindonline.it * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -32,6 +32,7 @@ /** + * Extension of the standard ServletOptions class which provides a different TldLocationCache implementation. * @author fgiust * @version $Id$ */ Modified: trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/TestTldLocationsCache.java =================================================================== --- trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/TestTldLocationsCache.java 2010-02-24 15:55:45 UTC (rev 2053) +++ trunk/openutils-testing4web/src/main/java/net/sourceforge/openutils/testing4web/TestTldLocationsCache.java 2010-02-24 22:25:38 UTC (rev 2054) @@ -1,6 +1,6 @@ /** * - * Openutils web test utils (http://www.openmindlab.com/lab/products/testing4web.html) + * Openutils testing4web (http://www.openmindlab.com/lab/products/testing4web.html) * Copyright(C) 2008-2010, Openmind S.r.l. http://www.openmindonline.it * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -33,6 +33,7 @@ import javax.servlet.ServletContext; +import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringUtils; import org.apache.jasper.JasperException; @@ -44,6 +45,7 @@ /** + * A TldLocationsCache implementation that can find and load tlds from the classpath. * @author fgiust * @version $Id$ */ @@ -147,10 +149,28 @@ String uri = getUriFromTld(file); if (uri != null && filemappings.get(uri) == null) { - String base = ctxt2.getRealPath("/"); + String contextRoot = ctxt2.getRealPath("/"); + File filetomap = file; + if (!StringUtils.startsWith(file.getAbsolutePath(), contextRoot)) + { - String filepath = getRelativePath(new File(base), file); + File destination = new File(new File(contextRoot, "-tldsfromclasspath"), file.getName()); + try + { + FileUtils.copyFile(file, destination, true); + filetomap = destination; + } + catch (IOException e) + { + log.warn("Unable to copy tld " + + file.getAbsolutePath() + + " to " + + destination.getAbsolutePath()); + } + } + String filepath = getRelativePath(new File(contextRoot), filetomap); + log.debug("Adding {} to cache with url {}", uri, filepath); filemappings.put(uri, new String[]{filepath, null }); } Modified: trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleEL.java =================================================================== --- trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleEL.java 2010-02-24 15:55:45 UTC (rev 2053) +++ trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleEL.java 2010-02-24 22:25:38 UTC (rev 2054) @@ -1,6 +1,6 @@ /** * - * Openutils web test utils (http://www.openmindlab.com/lab/products/testing4web.html) + * Openutils testing4web (http://www.openmindlab.com/lab/products/testing4web.html) * Copyright(C) 2008-2010, Openmind S.r.l. http://www.openmindonline.it * * Licensed under the Apache License, Version 2.0 (the "License"); Modified: trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleJunitServletUnitTest.java =================================================================== --- trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleJunitServletUnitTest.java 2010-02-24 15:55:45 UTC (rev 2053) +++ trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleJunitServletUnitTest.java 2010-02-24 22:25:38 UTC (rev 2054) @@ -1,6 +1,6 @@ /** * - * Openutils web test utils (http://www.openmindlab.com/lab/products/testing4web.html) + * Openutils testing4web (http://www.openmindlab.com/lab/products/testing4web.html) * Copyright(C) 2008-2010, Openmind S.r.l. http://www.openmindonline.it * * Licensed under the Apache License, Version 2.0 (the "License"); Modified: trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleTestNgServletUnitTest.java =================================================================== --- trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleTestNgServletUnitTest.java 2010-02-24 15:55:45 UTC (rev 2053) +++ trunk/openutils-testing4web/src/test/java/net/sourceforge/openutils/testing4web/SampleTestNgServletUnitTest.java 2010-02-24 22:25:38 UTC (rev 2054) @@ -1,6 +1,6 @@ /** * - * Openutils web test utils (http://www.openmindlab.com/lab/products/testing4web.html) + * Openutils testing4web (http://www.openmindlab.com/lab/products/testing4web.html) * Copyright(C) 2008-2010, Openmind S.r.l. http://www.openmindonline.it * * Licensed under the Apache License, Version 2.0 (the "License"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |