jwebunit-development Mailing List for JWebUnit (Page 4)
Brought to you by:
henryju
You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(98) |
Jul
(45) |
Aug
(49) |
Sep
(90) |
Oct
(28) |
Nov
(18) |
Dec
(17) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(14) |
Feb
(21) |
Mar
(52) |
Apr
(39) |
May
(61) |
Jun
(35) |
Jul
(42) |
Aug
(31) |
Sep
(34) |
Oct
(16) |
Nov
(14) |
Dec
(61) |
| 2006 |
Jan
(39) |
Feb
(11) |
Mar
(29) |
Apr
(29) |
May
(30) |
Jun
(145) |
Jul
(61) |
Aug
(40) |
Sep
(36) |
Oct
(66) |
Nov
(50) |
Dec
(11) |
| 2007 |
Jan
(30) |
Feb
(1) |
Mar
(47) |
Apr
(9) |
May
(36) |
Jun
(13) |
Jul
(7) |
Aug
(5) |
Sep
(6) |
Oct
(3) |
Nov
(11) |
Dec
(36) |
| 2008 |
Jan
(12) |
Feb
|
Mar
(4) |
Apr
(29) |
May
(1) |
Jun
(8) |
Jul
(10) |
Aug
|
Sep
(2) |
Oct
(77) |
Nov
(107) |
Dec
(46) |
| 2009 |
Jan
(17) |
Feb
(13) |
Mar
(27) |
Apr
(5) |
May
(8) |
Jun
(17) |
Jul
(10) |
Aug
(25) |
Sep
(15) |
Oct
(4) |
Nov
(4) |
Dec
(10) |
| 2010 |
Jan
|
Feb
(6) |
Mar
(12) |
Apr
(15) |
May
(4) |
Jun
(5) |
Jul
(9) |
Aug
(5) |
Sep
(5) |
Oct
(63) |
Nov
(9) |
Dec
(1) |
| 2011 |
Jan
(9) |
Feb
(3) |
Mar
(15) |
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
(14) |
Sep
(15) |
Oct
(11) |
Nov
(1) |
Dec
(2) |
| 2012 |
Jan
(6) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(14) |
Aug
(17) |
Sep
(8) |
Oct
(1) |
Nov
(17) |
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
(13) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(13) |
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
|
From: Julien H. <he...@ya...> - 2012-08-16 08:23:05
|
Hi Jevon, My intention was to only rely on slf4j for logging. I don't want to force users to use logback (even if it is my preferred choice today). I haven't checked recently but if you are using Maven you should only get slf4j-api in your classpath and no implementation (logback is set to be optional=true so no transitive inclusion). People are free to use any logging framework compatible with slf4j. Anyway you are right that we should provide in the quickstart a sample of logging configuration. Here using logback is fine, as long as we are clear it is only a possibility, not mandatory. As far as I know apache-httpclient is using commons-logging to log, not logback. In order to avoid commons-logging, the dependency is excluded (see [1]), and jcl-over-slf4j is added to the classpath. It means that every logs are redirected to slf4j. So basically in the quickstart I would better say something like : =Configuring logging= JWebUnit use slf4j to log (link to slf4j website). You can use any implementation you like. For example you can use logback (link to logback website). Here is how to configure logback : 1) If you are using Maven you must add a dependency on logback <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.0.6</version> <scope>runtime</scope> </dependency> 2) You must provide a logback.xml configuration file in your classpath (example + link to logback documentation)... Regards, Julien [1] http://jwebunit.svn.sourceforge.net/viewvc/jwebunit/trunk/jwebunit-htmlunit-plugin/pom.xml?revision=952&content-type=text%2Fplain >________________________________ > De : jevon <je...@je...> >À : JWebUnit Development mail list <jwe...@li...> >Envoyé le : Jeudi 16 août 2012 3h27 >Objet : [JWebUnit-development] Adding sample logback.xml to JWebUnit homepage > >Hi, > >In r951, I've added some brief instructions on how to get the logback >logger to be quiet - by default, if no logback.xml is present, then >ALL logging information (including on-wire transmissions themselves) >will be dumped onto stdout. I've hit this problem twice now so I think >it's probably a good idea to include it in the quick how-to guide. > >See also: http://stackoverflow.com/a/8936580/39531 > >Thoughts? I haven't pushed the changes onto the SF homepage yet (I'm >not sure if I have the permissions anyway). > >Jevon > >------------------------------------------------------------------------------ >Live Security Virtual Conference >Exclusive live event will cover all the ways today's security and >threat landscape has changed and how IT managers can respond. Discussions >will include endpoint security, mobile security and the latest in malware >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >_______________________________________________ >JWebUnit-development mailing list >JWe...@li... >https://lists.sourceforge.net/lists/listinfo/jwebunit-development > > > |
|
From: <jev...@us...> - 2012-08-16 02:55:32
|
Revision: 952
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=952&view=rev
Author: jevonwright
Date: 2012-08-16 02:55:26 +0000 (Thu, 16 Aug 2012)
Log Message:
-----------
when a MultiException is thrown, the first exception will now be displayed as part of the log message (to play better with Maven, which wasn't displaying any of the contained exceptions)
Modified Paths:
--------------
trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java
Modified: trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java
===================================================================
--- trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java 2012-08-16 01:26:46 UTC (rev 951)
+++ trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java 2012-08-16 02:55:26 UTC (rev 952)
@@ -59,6 +59,7 @@
import org.apache.regexp.RE;
import org.apache.regexp.RESyntaxException;
import org.browsermob.proxy.ProxyServer;
+import org.browsermob.proxy.jetty.util.MultiException;
import org.openqa.selenium.By;
import org.openqa.selenium.Cookie;
import org.openqa.selenium.JavascriptExecutor;
@@ -182,7 +183,11 @@
}
catch (Exception e) {
if (i<TRY_COUNT) {
- logger.error("Error while starting BrowserMob proxy. Retry...", e);
+ logger.error("Error while starting BrowserMob proxy on port " + port + ". Retry...: " + e.getMessage(), e);
+ if (e instanceof MultiException) {
+ Exception e1 = ((MultiException) e).getException(0);
+ logger.error("First exception: " + e1.getMessage(), e1);
+ }
continue;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: jevon <je...@je...> - 2012-08-16 01:58:40
|
Hi, In r951, I've added some brief instructions on how to get the logback logger to be quiet - by default, if no logback.xml is present, then ALL logging information (including on-wire transmissions themselves) will be dumped onto stdout. I've hit this problem twice now so I think it's probably a good idea to include it in the quick how-to guide. See also: http://stackoverflow.com/a/8936580/39531 Thoughts? I haven't pushed the changes onto the SF homepage yet (I'm not sure if I have the permissions anyway). Jevon |
|
From: <jev...@us...> - 2012-08-16 01:26:54
|
Revision: 951
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=951&view=rev
Author: jevonwright
Date: 2012-08-16 01:26:46 +0000 (Thu, 16 Aug 2012)
Log Message:
-----------
adding quickstart documentation on configuring logback
Modified Paths:
--------------
trunk/src/site/xdoc/index.xml
trunk/src/site/xdoc/quickstart.xml
Modified: trunk/src/site/xdoc/index.xml
===================================================================
--- trunk/src/site/xdoc/index.xml 2012-07-25 17:20:51 UTC (rev 950)
+++ trunk/src/site/xdoc/index.xml 2012-08-16 01:26:46 UTC (rev 951)
@@ -91,7 +91,8 @@
</source>
For some more examples on how to use JWebUnit in your project, please look at the
- <a href="quickstart.html">quick start guide</a>.
+ <a href="quickstart.html">quick start guide</a>. If you are having problems with
+ excessive Httpclient logging, you will also need to <a href="quickstart.html#Configuring_Logback">configure logback correctly</a>.
<!--
waiting on issue 2367400:
and the <a href="">generated WebTestCase documentation</a>.
Modified: trunk/src/site/xdoc/quickstart.xml
===================================================================
--- trunk/src/site/xdoc/quickstart.xml 2012-07-25 17:20:51 UTC (rev 950)
+++ trunk/src/site/xdoc/quickstart.xml 2012-08-16 01:26:46 UTC (rev 951)
@@ -146,6 +146,34 @@
</p>
</subsection>
+<subsection name="Configuring Logback">
+<p>
+ <a href="http://hc.apache.org/">Apache Commons' HTTP Components project</a>, one of the dependencies of JWebUnit, uses the <a href="http://logback.qos.ch/">logback logging framework</a> extensively.
+ This means that if you do not have logback correctly configured, you will get <a href="http://stackoverflow.com/questions/4915414/disable-httpclient-logging">a lot of debug information</a> piped to stdout.
+</p>
+
+<p>
+ A simple way to configure logback is to create a file called <i>logback.xml</i> with the following contents, and placing it in your source folder (for example, <i>src</i>).
+ This will suppress all debugging messages unless they are at the ERROR level or higher.
+</p>
+
+<source>
+<configuration debug="false">
+ <!-- definition of appender STDOUT -->
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>%-4relative [%thread] %-5level %logger{35} - %msg %n</pattern>
+ </encoder>
+ </appender>
+
+ <root level="ERROR">
+ <!-- appender referenced after it is defined -->
+ <appender-ref ref="STDOUT"/>
+ </root>
+</configuration>
+</source>
+</subsection>
+
<subsection name="Selecting the plugin you want to use">
<p>
JWebUnit can use different plugins to execute the tests you write. Only one line makes the difference:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2012-07-25 17:21:02
|
Revision: 950
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=950&view=rev
Author: henryju
Date: 2012-07-25 17:20:51 +0000 (Wed, 25 Jul 2012)
Log Message:
-----------
Workaround for issue 1466.
Modified Paths:
--------------
trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/FixedHtmlUnitDriver.java
trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java
Modified: trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/FixedHtmlUnitDriver.java
===================================================================
--- trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/FixedHtmlUnitDriver.java 2012-07-25 16:01:36 UTC (rev 949)
+++ trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/FixedHtmlUnitDriver.java 2012-07-25 17:20:51 UTC (rev 950)
@@ -10,7 +10,6 @@
if (getCurrentWindow() != null) {
if (getWebClient().getWebWindows().size() > 1) {
((TopLevelWindow) getCurrentWindow().getTopWindow()).close();
-
}
else {
quit();
Modified: trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java
===================================================================
--- trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java 2012-07-25 16:01:36 UTC (rev 949)
+++ trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java 2012-07-25 17:20:51 UTC (rev 950)
@@ -335,7 +335,11 @@
public void closeWindow() {
formIdent = null;
- driver.close();//FIXME Issue 1466
+ driver.close();
+ //FIXME Issue 1466 & 2834
+ if (getWindowCount() > 0) {
+ driver.switchTo().window(driver.getWindowHandles().iterator().next());
+ }
}
public boolean hasFrame(String frameNameOrId) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2012-07-25 16:01:47
|
Revision: 949
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=949&view=rev
Author: henryju
Date: 2012-07-25 16:01:36 +0000 (Wed, 25 Jul 2012)
Log Message:
-----------
Add support for User-Agent override based on TestContext. Limitation: only works for server-side.
Modified Paths:
--------------
trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java
Modified: trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java
===================================================================
--- trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java 2012-07-25 15:58:53 UTC (rev 948)
+++ trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java 2012-07-25 16:01:36 UTC (rev 949)
@@ -18,8 +18,6 @@
*/
package net.sourceforge.jwebunit.webdriver;
-import com.gargoylesoftware.htmlunit.WebClient;
-import com.gargoylesoftware.htmlunit.WebResponse;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
@@ -32,6 +30,7 @@
import java.util.Map;
import java.util.Random;
import java.util.Set;
+
import net.sourceforge.jwebunit.api.HttpHeader;
import net.sourceforge.jwebunit.api.IElement;
import net.sourceforge.jwebunit.api.ITestingEngine;
@@ -46,7 +45,8 @@
import net.sourceforge.jwebunit.javascript.JavascriptConfirm;
import net.sourceforge.jwebunit.javascript.JavascriptPrompt;
import net.sourceforge.jwebunit.util.TestContext;
-import org.apache.commons.io.IOUtils;
+
+import org.apache.commons.lang.StringUtils;
import org.apache.http.Header;
import org.apache.http.HttpException;
import org.apache.http.HttpRequest;
@@ -74,6 +74,9 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.gargoylesoftware.htmlunit.WebClient;
+import com.gargoylesoftware.htmlunit.WebResponse;
+
/**
* Acts as the wrapper for Webdriver access. A testing engine is initialized with a given URL, and maintains
* conversational state as the dialog progresses through link navigation, form submission, etc.
@@ -98,7 +101,6 @@
private String formIdent;
private boolean throwExceptionOnScriptError = true;//TODO
private boolean ignoreFailingStatusCodes = false;
- private Map<String, String> requestHeaders;
/**
* Is Javascript enabled.
*/
@@ -111,6 +113,7 @@
this.setTestContext(aTestContext);
// start the proxy
Proxy proxy = startBrowserMobProxy();
+
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.PROXY, proxy);
capabilities.setCapability(CapabilityType.SUPPORTS_JAVASCRIPT, jsEnabled);
@@ -143,9 +146,6 @@
.getName(), c.getValue(), domain, c.getPath() != null ? c
.getPath() : "", expiry, c.getSecure()));
}
- // Deal with custom request header
- this.requestHeaders = aTestContext.getRequestHeaders();
-
gotoPage(aInitialURL);
}
@@ -161,13 +161,23 @@
WebDriverTestingEngineImpl.this.response = response;
}
});
- proxyServer.addRequestInterceptor(new HttpRequestInterceptor() {
- public void process(HttpRequest request, HttpContext context) throws HttpException, IOException {
- for (Map.Entry<String, String> requestHeader : requestHeaders.entrySet()) {
- request.addHeader(requestHeader.getKey(), requestHeader.getValue());
- }
- }
- });
+ if (testContext.getRequestHeaders() != null && !testContext.getRequestHeaders().isEmpty()) {
+ proxyServer.addRequestInterceptor(new HttpRequestInterceptor() {
+ public void process(HttpRequest request, HttpContext context) throws HttpException, IOException {
+ for (Map.Entry<String, String> requestHeader : testContext.getRequestHeaders().entrySet()) {
+ request.addHeader(requestHeader.getKey(), requestHeader.getValue());
+ }
+ }
+ });
+ }
+ if (StringUtils.isNotBlank(testContext.getUserAgent())) {
+ proxyServer.addRequestInterceptor(new HttpRequestInterceptor() {
+ public void process(HttpRequest request, HttpContext context) throws HttpException, IOException {
+ request.removeHeaders("User-Agent");
+ request.addHeader("User-Agent", testContext.getUserAgent());
+ }
+ });
+ }
return proxyServer.seleniumProxy();
}
catch (Exception e) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2012-07-25 15:59:03
|
Revision: 948
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=948&view=rev
Author: henryju
Date: 2012-07-25 15:58:53 +0000 (Wed, 25 Jul 2012)
Log Message:
-----------
Add a test to distinguish User-Agent override from client side and server side point of view.
Modified Paths:
--------------
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/TestContextTest.java
trunk/jwebunit-commons-tests/src/main/resources/testcases/WEB-INF/web.xml
Added Paths:
-----------
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/util/HeadersServlet.java
Modified: trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/TestContextTest.java
===================================================================
--- trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/TestContextTest.java 2012-07-25 14:08:13 UTC (rev 947)
+++ trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/TestContextTest.java 2012-07-25 15:58:53 UTC (rev 948)
@@ -46,7 +46,8 @@
}
- @Test public void testInit() {
+ @Test
+ public void testInit() {
assertTrue(context.hasAuthorization());
assertTrue(context.hasCookies());
assertEquals(context.getUser(), "user");
@@ -61,13 +62,23 @@
assertNull(context.getResourceBundleName());
}
- @Test public void testResourceBundle() {
+ @Test
+ public void testResourceBundle() {
String name = "/TestContextBundle";
context.setResourceBundleName("/TestContextBundle");
assertEquals(name, context.getResourceBundleName());
}
- @Test public void testUserAgent() {
+ @Test
+ public void testServerSideUserAgentOverride() {
+ String userAgent = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3";
+ getTestContext().setUserAgent(userAgent);
+ beginAt("/headers.jsp");
+ assertTextPresent("User-Agent=[" + userAgent + "]");
+ }
+
+ @Test
+ public void testClientSideUserAgentOverride() {
getTestContext().setBaseUrl(HOST_PATH + "/TestContextTest");
String userAgent = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3";
getTestContext().setUserAgent(userAgent);
Added: trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/util/HeadersServlet.java
===================================================================
--- trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/util/HeadersServlet.java (rev 0)
+++ trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/util/HeadersServlet.java 2012-07-25 15:58:53 UTC (rev 948)
@@ -0,0 +1,81 @@
+/**
+ * Copyright (c) 2011, JWebUnit team.
+ *
+ * This file is part of JWebUnit.
+ *
+ * JWebUnit is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * JWebUnit is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with JWebUnit. If not, see <http://www.gnu.org/licenses/>.
+ */
+package net.sourceforge.jwebunit.tests.util;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.FileItemFactory;
+import org.apache.commons.fileupload.FileUploadException;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
+import org.apache.commons.fileupload.servlet.ServletFileUpload;
+
+/**
+ * Servlet to dump HTTP headers received by server.
+ * @author henryju
+ *
+ */
+public class HeadersServlet extends HttpServlet {
+
+ private static final long serialVersionUID = 1L;
+
+ protected void doGet(HttpServletRequest request,
+ HttpServletResponse response) throws ServletException, IOException {
+ doPost(request, response);
+ }
+
+ protected void doPost(HttpServletRequest request,
+ HttpServletResponse response) throws ServletException, IOException {
+ response.setContentType("text/html");
+ PrintWriter out = response.getWriter();
+ out.write(HtmlHelper.getStart("Received headers"));
+ out.write("<h1>Received headers</h1>\n<p>Headers are:<br/>");
+ /*
+ * Prints headers as name=[value] separated
+ * by <BR/>
+ */
+ java.util.Enumeration headers = request.getHeaderNames();
+ for (; headers.hasMoreElements();) {
+ String h = headers.nextElement().toString();
+ String v = request.getHeader(h);
+ out.write(h + "=[" + v);
+ if (headers.hasMoreElements()) {
+ out.write("]<br/>\n");
+ }
+ }
+ out.write("]</p>\n");
+ String ref = request.getHeader("Referer");
+ if (ref == null) {
+ if (request.getParameterValues("myReferer") != null) {
+ ref = request.getParameterValues("myReferer")[0];
+ }
+ }
+ out.write(HtmlHelper.getLinkParagraph("return", ref));
+ out.write(HtmlHelper.getEnd());
+ }
+
+}
Property changes on: trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/util/HeadersServlet.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/jwebunit-commons-tests/src/main/resources/testcases/WEB-INF/web.xml
===================================================================
--- trunk/jwebunit-commons-tests/src/main/resources/testcases/WEB-INF/web.xml 2012-07-25 14:08:13 UTC (rev 947)
+++ trunk/jwebunit-commons-tests/src/main/resources/testcases/WEB-INF/web.xml 2012-07-25 15:58:53 UTC (rev 948)
@@ -29,6 +29,10 @@
<servlet-class>net.sourceforge.jwebunit.tests.util.ParamsServlet</servlet-class>
</servlet>
<servlet>
+ <servlet-name>HeadersServlet</servlet-name>
+ <servlet-class>net.sourceforge.jwebunit.tests.util.HeadersServlet</servlet-class>
+</servlet>
+<servlet>
<servlet-name>CookiesServlet</servlet-name>
<servlet-class>net.sourceforge.jwebunit.tests.util.CookiesServlet</servlet-class>
</servlet>
@@ -45,6 +49,10 @@
<url-pattern>/params.jsp</url-pattern>
</servlet-mapping>
<servlet-mapping>
+ <servlet-name>HeadersServlet</servlet-name>
+ <url-pattern>/headers.jsp</url-pattern>
+</servlet-mapping>
+<servlet-mapping>
<servlet-name>CookiesServlet</servlet-name>
<url-pattern>/cookies.jsp</url-pattern>
</servlet-mapping>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2012-07-25 14:08:19
|
Revision: 947
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=947&view=rev
Author: henryju
Date: 2012-07-25 14:08:13 +0000 (Wed, 25 Jul 2012)
Log Message:
-----------
Do not assert page content including line separator as it makes tests platform dependent.
Remove a wrong test (what is a frame title anyway?).
Modified Paths:
--------------
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FormSubmissionTest.java
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/JavaScriptEventsTest.java
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/util/ParamsServlet.java
Modified: trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FormSubmissionTest.java
===================================================================
--- trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FormSubmissionTest.java 2012-07-25 13:45:55 UTC (rev 946)
+++ trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FormSubmissionTest.java 2012-07-25 14:08:13 UTC (rev 947)
@@ -52,11 +52,11 @@
setTextField("color", "blue");
submit("button");
assertTextPresent("Submitted parameters");
- assertTextPresent("color=blue");
+ assertTextPresent("color=[blue]");
clickLink("return");
setTextField("color", "red");
submit();
- assertTextPresent("color=red");
+ assertTextPresent("color=[red]");
}
@Test
@@ -65,11 +65,11 @@
setTextField("text", "sometext");
submit("button");
assertTextPresent("Submitted parameters");
- assertTextPresent("Params are:" + System.getProperty("line.separator") + "text=sometext");
+ assertTextPresent("text=[sometext]");
clickLink("return");
setTextField("text", "anothertext");
submit();
- assertTextPresent("text=anothertext");
+ assertTextPresent("text=[anothertext]");
}
@Test
@@ -93,7 +93,7 @@
submit("button");
assertTextPresent("Submitted parameters");
//The following depend on the browser: IE send full path (i.e. temp.getAbsolutePath()) but FF send only file name.
- assertTextPresent("file=" + temp.getName() + "{abcdefgh}");
+ assertTextPresent("file=[" + temp.getName() + "{abcdefgh}]");
}
@Test
@@ -103,7 +103,7 @@
assertSubmitButtonPresent();
submit();
assertTextPresent("Submitted parameters");
- assertTextPresent("color=toto");
+ assertTextPresent("color=[toto]");
}
@Test
@@ -113,7 +113,7 @@
assertSubmitButtonPresent("image");
submit("image");
assertTextPresent("Submitted parameters");
- assertTextPresent("color=toto");
+ assertTextPresent("color=[toto]");
}
@Test
@@ -122,10 +122,10 @@
checkCheckbox("checkBox");
setTextField("color", "blue");
submit();
- assertTextPresent("color=blue");
+ assertTextPresent("color=[blue]");
// checkBox contains 2 parameters: one for the hidden input and one for
// the checkbox
- assertTextPresent("checkBox=,on");
+ assertTextPresent("checkBox=[,on]");
}
@Test
@@ -135,7 +135,7 @@
checkCheckbox("checkBox", "3");
checkCheckbox("checkBox", "3"); // check for duplicates
submit();
- assertTextPresent("checkBox=1,3" + System.getProperty("line.separator"));
+ assertTextPresent("checkBox=[1,3]");
}
@Test
@@ -145,7 +145,7 @@
checkCheckbox("checkBox", "3");
uncheckCheckbox("checkBox", "3");
submit();
- assertTextPresent("checkBox=1");
+ assertTextPresent("checkBox=[1]");
}
@Test
@@ -157,7 +157,7 @@
setTextField("color", "blue");
uncheckCheckbox("checkBox");
submit();
- assertTextPresent("color=blue" + System.getProperty("line.separator"));
+ assertTextPresent("color=[blue]");
}
@Test
@@ -166,7 +166,7 @@
clickRadioOption("radio", "1");
assertRadioOptionSelected("radio", "1");
submit();
- assertTextPresent("radio=1" + System.getProperty("line.separator"));
+ assertTextPresent("radio=[1]");
clickLink("return");
clickRadioOption("radio", "2");
clickRadioOption("radio", "3");
@@ -174,7 +174,7 @@
assertRadioOptionNotSelected("radio", "2");
assertRadioOptionSelected("radio", "3");
submit();
- assertTextPresent("radio=3" + System.getProperty("line.separator"));
+ assertTextPresent("radio=[3]");
}
@Test
@@ -182,7 +182,7 @@
beginAt("/SingleUnnamedButtonForm.html");
setTextField("color", "blue");
submit();
- assertTextPresent("color=blue" + System.getProperty("line.separator"));
+ assertTextPresent("color=[blue]");
}
@Test
@@ -190,17 +190,17 @@
beginAt("/SingleNamedButtonForm.html");
setTextField("color", "red");
submit();
- assertTextPresent("color=red");
+ assertTextPresent("color=[red]");
}
@Test
public void testSingleFormMultipleButtonSubmission() {
gotoMultiButtonPage();
submit("color");
- assertTextPresent("Params are:" + System.getProperty("line.separator") + "color=red");
+ assertTextPresent("color=[red]");
gotoMultiButtonPage();
submit("color", "blue");
- assertTextPresent("color=blue");
+ assertTextPresent("color=[blue]");
}
@Test
@@ -221,7 +221,7 @@
setWorkingForm("form2");
setTextField("param2", "anyvalue");
submit("button2a");
- assertTextPresent("param2=anyvalue");
+ assertTextPresent("param2=[anyvalue]");
}
@Test
@@ -231,16 +231,16 @@
setTextField("param2", "foo");
setTextField("email", "anyvalue");
submit();
- assertTextPresent("email=anyvalue");
- assertTextPresent("param2=foo");
+ assertTextPresent("email=[anyvalue]");
+ assertTextPresent("param2=[foo]");
closeBrowser();
beginAt("/MultiFormPage.html");
setWorkingForm("form3");
setTextField("param3", "foo");
setTextField("email", "anyvalue");
submit();
- assertTextPresent("param3=foo");
- assertTextPresent("email=anyvalue");
+ assertTextPresent("param3=[foo]");
+ assertTextPresent("email=[anyvalue]");
}
@Test
@@ -276,7 +276,7 @@
beginAt("/MultiFormPage.html");
setTextField("param4", "anyvalue");
submit();
- assertTextPresent("param4=anyvalue");
+ assertTextPresent("param4=[anyvalue]");
}
@Test
@@ -284,8 +284,8 @@
beginAt("/MultiFormPage.html");
setTextField("param2", "anyvalue");
submit("button2b");
- assertTextPresent("param2=anyvalue" + System.getProperty("line.separator"));
- assertTextPresent("button2b=b2b");
+ assertTextPresent("param2=[anyvalue]");
+ assertTextPresent("button2b=[b2b]");
}
@Test
@@ -294,8 +294,8 @@
setTextField("param2", "anyvalue");
reset();
submit("button2b");
- assertTextNotPresent("param2=anyvalue\n");
- assertTextPresent("button2b=b2b");
+ assertTextNotPresent("param2=[anyvalue]");
+ assertTextPresent("button2b=[b2b]");
}
@Test
@@ -346,7 +346,7 @@
setTextField("color", "blue");
clickButtonWithText("click me");
assertTextPresent("Submitted parameters");
- assertTextPresent("color=blue");
+ assertTextPresent("color=[blue]");
}
@Test
@@ -355,7 +355,7 @@
assertHiddenFieldPresent("hidden", "foo");
setHiddenField("hidden", "bar");
submit();
- assertTextPresent("hidden=bar");
+ assertTextPresent("hidden=[bar]");
}
Modified: trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java
===================================================================
--- trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java 2012-07-25 13:45:55 UTC (rev 946)
+++ trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java 2012-07-25 14:08:13 UTC (rev 947)
@@ -151,7 +151,7 @@
assertFormPresent();
setTextField("color", "red");
submit("submit");
- assertTextPresent("color=red" + System.getProperty("line.separator"));
+ assertTextPresent("color=[red]");
}
@Test public void testFormInputInInlineFrame() {
@@ -160,16 +160,7 @@
assertFormPresent();
setTextField("color", "red");
submit("submit");
- assertTextPresent("color=red" + System.getProperty("line.separator"));
+ assertTextPresent("color=[red]");
}
- //TODO this just posts to a new frameset inside the frame, is the test needed?
- @Test public void testFormInputInFrameToFrame() {
- beginAt("Frames.html");
- gotoFrame("ContentFrame");
- setTextField("color", "green");
- submit();
- assertTitleEquals("Submitted parameters");
- }
-
}
Modified: trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/JavaScriptEventsTest.java
===================================================================
--- trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/JavaScriptEventsTest.java 2012-07-25 13:45:55 UTC (rev 946)
+++ trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/JavaScriptEventsTest.java 2012-07-25 14:08:13 UTC (rev 947)
@@ -55,14 +55,14 @@
beginAt("FormOnSubmit.html");
submit();
gotoWindow("child");
- assertTextPresent("on=submit");
+ assertTextPresent("on=[submit]");
}
@Test public void testFormOnReset() {
beginAt("FormOnSubmit.html");
reset();
gotoWindow("child");
- assertTextPresent("on=reset");
+ assertTextPresent("on=[reset]");
}
@Test public void testButtonOnClick() {
@@ -70,7 +70,7 @@
assertButtonPresent("b1");
clickButton("b1");
gotoWindow("child");
- assertTextPresent("on=click");
+ assertTextPresent("on=[click]");
}
@@ -117,7 +117,7 @@
assertTitleEquals("The Title");
selectOption("testSelect", "Value2");
assertTitleEquals("Submitted parameters");
- assertTextPresent("testSelect=V2");
+ assertTextPresent("testSelect=[V2]");
}
@Test public void testGreenLink() {
Modified: trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/util/ParamsServlet.java
===================================================================
--- trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/util/ParamsServlet.java 2012-07-25 13:45:55 UTC (rev 946)
+++ trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/util/ParamsServlet.java 2012-07-25 14:08:13 UTC (rev 947)
@@ -50,7 +50,7 @@
out.write(HtmlHelper.getStart("Submitted parameters"));
out.write("<h1>Submitted parameters</h1>\n<p>Params are:<br/>");
/*
- * Prints POST and GET parameters as name=value1[,value2...] separated
+ * Prints POST and GET parameters as name=[value1[,value2...]] separated
* by <BR/>
*/
@@ -78,7 +78,7 @@
FileItem item = (FileItem) iter.next();
if (item.isFormField()) {
- out.write(" " + item.getFieldName() + "="
+ out.write(" " + item.getFieldName() + "=["
+ item.getString());
if (item.getFieldName().equals("myReferer")) {
ref = item.getString();
@@ -86,22 +86,22 @@
} else {
String fieldName = item.getFieldName();
String fileName = item.getName();
- out.write(" " + fieldName + "=" + fileName
+ out.write(" " + fieldName + "=[" + fileName
+ "{" + new String(item.get()) + "}");
}
if (iter.hasNext()) {
- out.write("<br/>\n");
+ out.write("]<br/>\n");
}
}
- out.write(" </p>\n");
+ out.write("]</p>\n");
out.write(HtmlHelper.getLinkParagraph("return", ref));
} else {
java.util.Enumeration params = request.getParameterNames();
for (; params.hasMoreElements();) {
String p = params.nextElement().toString();
String[] v = request.getParameterValues(p);
- out.write(p + "=");
+ out.write(p + "=[");
int n = v.length;
if (n > 0) {
out.write(v[0] != null ? v[0] : "");
@@ -110,10 +110,10 @@
}
}
if (params.hasMoreElements()) {
- out.write("<br/>\n");
+ out.write("]<br/>\n");
}
}
- out.write(" </p>\n");
+ out.write("]</p>\n");
String ref = request.getHeader("Referer");
if (ref == null) {
if (request.getParameterValues("myReferer") != null) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2012-07-25 13:46:04
|
Revision: 946
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=946&view=rev
Author: henryju
Date: 2012-07-25 13:45:55 +0000 (Wed, 25 Jul 2012)
Log Message:
-----------
MCHECKSTYLE-159 is fixed.
Modified Paths:
--------------
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-07-25 13:43:21 UTC (rev 945)
+++ trunk/pom.xml 2012-07-25 13:45:55 UTC (rev 946)
@@ -450,10 +450,6 @@
<xrefLocation>
${project.reporting.outputDirectory}/${topDirectoryLocation}/xref
</xrefLocation>
- <!-- Needed for MCHECKSTYLE-159 -->
- <propertyExpansion>
- cacheFile=${project.build.directory}/checkstyle-cachefile
- </propertyExpansion>
</configuration>
</plugin>
<plugin>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2012-07-25 13:43:28
|
Revision: 945
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=945&view=rev
Author: henryju
Date: 2012-07-25 13:43:21 +0000 (Wed, 25 Jul 2012)
Log Message:
-----------
Update Maven plugins.
Modified Paths:
--------------
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-07-25 13:37:29 UTC (rev 944)
+++ trunk/pom.xml 2012-07-25 13:43:21 UTC (rev 945)
@@ -472,6 +472,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
+ <version>2.7.1</version>
<inherited>false</inherited>
<reportSets>
<reportSet>
@@ -499,6 +500,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.8.1</version>
<reportSets>
<reportSet>
<id>aggregate</id>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2012-07-25 13:37:36
|
Revision: 944
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=944&view=rev
Author: henryju
Date: 2012-07-25 13:37:29 +0000 (Wed, 25 Jul 2012)
Log Message:
-----------
Update dependencies (including selenium).
Modified Paths:
--------------
trunk/jwebunit-webdriver-plugin/pom.xml
trunk/pom.xml
Modified: trunk/jwebunit-webdriver-plugin/pom.xml
===================================================================
--- trunk/jwebunit-webdriver-plugin/pom.xml 2012-07-25 13:10:22 UTC (rev 943)
+++ trunk/jwebunit-webdriver-plugin/pom.xml 2012-07-25 13:37:29 UTC (rev 944)
@@ -30,7 +30,7 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-htmlunit-driver</artifactId>
- <version>2.17.0</version>
+ <version>2.25.0</version>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
@@ -41,7 +41,7 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
- <version>2.17.0</version>
+ <version>2.25.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jwebunit</groupId>
@@ -70,7 +70,7 @@
<dependency>
<groupId>biz.neustar</groupId>
<artifactId>browsermob-proxy</artifactId>
- <version>2.0-beta-3</version>
+ <version>2.0-beta-6</version>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-07-25 13:10:22 UTC (rev 943)
+++ trunk/pom.xml 2012-07-25 13:37:29 UTC (rev 944)
@@ -369,38 +369,38 @@
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
- <version>1.3.RC2</version>
+ <version>1.3</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
- <version>1.3.RC2</version>
+ <version>1.3</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
- <version>7.3.1.v20110307</version>
+ <version>7.3.0.v20110203</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <version>1.6.1</version>
+ <version>1.6.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
- <version>1.6.1</version>
+ <version>1.6.6</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
- <version>0.9.29</version>
+ <version>1.0.6</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>1.8.5</version>
+ <version>1.9.0</version>
<scope>test</scope>
</dependency>
</dependencies>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2012-07-25 13:10:32
|
Revision: 943
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=943&view=rev
Author: henryju
Date: 2012-07-25 13:10:22 +0000 (Wed, 25 Jul 2012)
Log Message:
-----------
Update Maven plugins.
Modified Paths:
--------------
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-07-25 12:38:29 UTC (rev 942)
+++ trunk/pom.xml 2012-07-25 13:10:22 UTC (rev 943)
@@ -19,6 +19,9 @@
<url>http://sourceforge.net/tracker/?group_id=61302</url>
</issueManagement>
<inceptionYear>2002</inceptionYear>
+ <prerequisites>
+ <maven>2.2.1</maven>
+ </prerequisites>
<modules>
<module>jwebunit-code-generator</module>
<module>jwebunit-core</module>
@@ -201,7 +204,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
+ <version>2.5.1</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
@@ -210,7 +213,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
- <version>2.4.1</version>
+ <version>2.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -220,12 +223,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <version>2.3.2</version>
+ <version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.10</version>
+ <version>2.12</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -245,7 +248,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
- <version>2.2.1</version>
+ <version>2.3</version>
<configuration>
<attach>false</attach>
<runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
@@ -267,7 +270,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
- <version>2.2.1</version>
+ <version>2.3.2</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<preparationGoals>clean install</preparationGoals>
@@ -287,12 +290,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
- <version>3.0</version>
+ <version>3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>2.8</version>
+ <version>2.8.1</version>
<configuration>
<quiet>true</quiet>
</configuration>
@@ -335,7 +338,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
- <version>2.6</version>
+ <version>2.7.1</version>
<inherited>false</inherited>
<executions>
<execution>
@@ -436,7 +439,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.8</version>
+ <version>2.9.1</version>
<configuration>
<configLocation>
${basedir}/${topDirectoryLocation}/src/checkstyle/jwebunit-checkstyle.xml
@@ -456,7 +459,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.10</version>
+ <version>2.12</version>
<configuration>
<aggregate>true</aggregate>
</configuration>
@@ -469,7 +472,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
- <version>2.4</version>
<inherited>false</inherited>
<reportSets>
<reportSet>
@@ -487,7 +489,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
- <version>2.3.2</version>
+ <version>2.5.1</version>
<configuration>
<xrefLocation>
${project.reporting.outputDirectory}/${topDirectoryLocation}/xref
@@ -497,7 +499,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>2.8</version>
<reportSets>
<reportSet>
<id>aggregate</id>
@@ -549,7 +550,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
- <version>2.6</version>
+ <version>2.7.1</version>
<configuration>
<aggregate>true</aggregate>
<targetJdk>1.5</targetJdk>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2012-07-25 12:38:41
|
Revision: 942
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=942&view=rev
Author: henryju
Date: 2012-07-25 12:38:29 +0000 (Wed, 25 Jul 2012)
Log Message:
-----------
Update HtmlUnit to version 2.10.
Modified Paths:
--------------
trunk/jwebunit-htmlunit-plugin/pom.xml
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitTestingEngineImpl.java
trunk/src/changes/changes.xml
Modified: trunk/jwebunit-htmlunit-plugin/pom.xml
===================================================================
--- trunk/jwebunit-htmlunit-plugin/pom.xml 2012-07-25 12:30:31 UTC (rev 941)
+++ trunk/jwebunit-htmlunit-plugin/pom.xml 2012-07-25 12:38:29 UTC (rev 942)
@@ -23,7 +23,7 @@
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
- <version>2.9</version>
+ <version>2.10</version>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
Modified: trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitTestingEngineImpl.java
===================================================================
--- trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitTestingEngineImpl.java 2012-07-25 12:30:31 UTC (rev 941)
+++ trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitTestingEngineImpl.java 2012-07-25 12:38:29 UTC (rev 942)
@@ -174,7 +174,7 @@
/**
* The default browser version.
*/
- private BrowserVersion defaultBrowserVersion = BrowserVersion.FIREFOX_3;
+ private BrowserVersion defaultBrowserVersion = BrowserVersion.FIREFOX_3_6;
/**
* Should we ignore failing status codes?
Modified: trunk/src/changes/changes.xml
===================================================================
--- trunk/src/changes/changes.xml 2012-07-25 12:30:31 UTC (rev 941)
+++ trunk/src/changes/changes.xml 2012-07-25 12:38:29 UTC (rev 942)
@@ -32,6 +32,9 @@
<body>
<release version="3.1" date="UNKNOW" description="Cleanup for Webdriver integration">
<action type="update" dev="henryju">
+ Updated to HtmlUnit 2.10.
+ </action>
+ <action type="update" dev="henryju">
getPageText() (and all related assertXX methods) now only deals with what is inside <body> element. Previously it was also returning page title for example.
</action>
<action type="update" dev="henryju">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2012-07-25 12:30:37
|
Revision: 941
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=941&view=rev
Author: henryju
Date: 2012-07-25 12:30:31 +0000 (Wed, 25 Jul 2012)
Log Message:
-----------
Revert change made for debugging purpose.
Modified Paths:
--------------
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/ConcurrentJWebUnitTest.java
Modified: trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/ConcurrentJWebUnitTest.java
===================================================================
--- trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/ConcurrentJWebUnitTest.java 2012-07-25 12:16:24 UTC (rev 940)
+++ trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/ConcurrentJWebUnitTest.java 2012-07-25 12:30:31 UTC (rev 941)
@@ -53,7 +53,7 @@
setBaseUrl(HOST_PATH + "/NavigationTest");
}
- @Rule public Timeout timeoutRule = new Timeout(1000000000);
+ @Rule public Timeout timeoutRule = new Timeout(10000);
@Rule public ConcurrentRule concurrently = new ConcurrentRule();
@Rule public RepeatingRule repeatedly = new RepeatingRule();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2012-07-25 12:16:33
|
Revision: 940
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=940&view=rev
Author: henryju
Date: 2012-07-25 12:16:24 +0000 (Wed, 25 Jul 2012)
Log Message:
-----------
Fix getting value of option element when no value attribute is specified.
Modified Paths:
--------------
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitElementImpl.java
Modified: trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitElementImpl.java
===================================================================
--- trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitElementImpl.java 2012-07-25 11:08:23 UTC (rev 939)
+++ trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitElementImpl.java 2012-07-25 12:16:24 UTC (rev 940)
@@ -29,6 +29,7 @@
import com.gargoylesoftware.htmlunit.html.DomNode;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlInput;
+import com.gargoylesoftware.htmlunit.html.HtmlOption;
import com.gargoylesoftware.htmlunit.html.HtmlTextArea;
/**
@@ -55,10 +56,15 @@
* @see net.sourceforge.jwebunit.api.IElement#attribute(java.lang.String)
*/
public String getAttribute(String name) {
- if (!element.hasAttribute(name))
- return null;
-
- return element.getAttribute(name);
+ if ("value".equals(name) && element instanceof HtmlOption) {
+ // for options, we want text if no value was specified
+ return ((HtmlOption) element).getValueAttribute();
+ } else {
+ if (!element.hasAttribute(name))
+ return null;
+
+ return element.getAttribute(name);
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2012-07-25 11:08:29
|
Revision: 939
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=939&view=rev
Author: henryju
Date: 2012-07-25 11:08:23 +0000 (Wed, 25 Jul 2012)
Log Message:
-----------
Fix concurrent test.
Modified Paths:
--------------
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/ConcurrentJWebUnitTest.java
Modified: trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/ConcurrentJWebUnitTest.java
===================================================================
--- trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/ConcurrentJWebUnitTest.java 2012-07-25 10:48:39 UTC (rev 938)
+++ trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/ConcurrentJWebUnitTest.java 2012-07-25 11:08:23 UTC (rev 939)
@@ -22,6 +22,7 @@
import static net.sourceforge.jwebunit.junit.JWebUnit.assertTitleEquals;
import static net.sourceforge.jwebunit.junit.JWebUnit.beginAt;
import static net.sourceforge.jwebunit.junit.JWebUnit.clickLinkWithText;
+import static net.sourceforge.jwebunit.junit.JWebUnit.getTestContext;
import static net.sourceforge.jwebunit.junit.JWebUnit.setBaseUrl;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
@@ -47,11 +48,12 @@
public class ConcurrentJWebUnitTest extends JWebUnitAPITestCase {
public void setUp() throws Exception {
- super.setUp();
- setBaseUrl(HOST_PATH + "/NavigationTest");
+ //don't call super.setUp to avoid temporary state where baseUrl = HOST_PATH
+ getTestContext().setAuthorization("admin", "admin");
+ setBaseUrl(HOST_PATH + "/NavigationTest");
}
- @Rule public Timeout timeoutRule = new Timeout(10000);
+ @Rule public Timeout timeoutRule = new Timeout(1000000000);
@Rule public ConcurrentRule concurrently = new ConcurrentRule();
@Rule public RepeatingRule repeatedly = new RepeatingRule();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2012-07-25 10:48:50
|
Revision: 938
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=938&view=rev
Author: henryju
Date: 2012-07-25 10:48:39 +0000 (Wed, 25 Jul 2012)
Log Message:
-----------
Remove selenium module (deprecated in favor of webdriver module).
Modified Paths:
--------------
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-07-25 10:47:20 UTC (rev 937)
+++ trunk/pom.xml 2012-07-25 10:48:39 UTC (rev 938)
@@ -24,7 +24,6 @@
<module>jwebunit-core</module>
<module>jwebunit-commons-tests</module>
<module>jwebunit-htmlunit-plugin</module>
- <module>jwebunit-selenium-plugin</module>
<module>jwebunit-webdriver-plugin</module>
</modules>
<mailingLists>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2012-07-25 10:47:29
|
Revision: 937
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=937&view=rev
Author: henryju
Date: 2012-07-25 10:47:20 +0000 (Wed, 25 Jul 2012)
Log Message:
-----------
Remove selenium module (deprecated in favor of webdriver module).
Removed Paths:
-------------
trunk/jwebunit-selenium-plugin/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jev...@us...> - 2012-02-14 23:35:33
|
Revision: 936
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=936&view=rev
Author: jevonwright
Date: 2012-02-14 23:35:26 +0000 (Tue, 14 Feb 2012)
Log Message:
-----------
adding FAQ entry on parsing JSON with JWebUnit
Modified Paths:
--------------
trunk/src/site/fml/faq.fml
Modified: trunk/src/site/fml/faq.fml
===================================================================
--- trunk/src/site/fml/faq.fml 2012-01-27 09:43:35 UTC (rev 935)
+++ trunk/src/site/fml/faq.fml 2012-02-14 23:35:26 UTC (rev 936)
@@ -54,6 +54,35 @@
Have a look at http://htmlunit.sourceforge.net/submittingJSBugs.html
</answer>
</faq>
+
+ <faq id="javascript-json">
+ <question>
+ How can I parse JSON output using JWebUnit or HtmlUnit?
+ </question>
+ <answer>
+ <p>HtmlUnit, one of the underlying engines of JWebUnit, <a href="http://stackoverflow.com/questions/2932857/html-handling-a-json-response">does not support direct
+ execution of Javascript functions</a>. You need to check beforehand that the <code>Content-Type</code>
+ of the response is <code>application/json</code>, and then use a different library to parse it.</p>
+
+ <p>For example, <a href="http://code.google.com/p/google-gson/">Google Gson</a> can be used to parse JSON, as follows:</p>
+
+ <source>WebResponse response = ((HtmlUnitTestingEngineImpl) JWebUnit.getTestingEngine()).getWebResponse();
+
+// check content type
+assertTrue("Response type should be application/json, was: " + response.getContentType(), "application/json".equals(response.getContentType()));
+
+// parse JSON
+Gson gson = new Gson();
+String json = response.getContentAsString();
+JsonObject obj = new JsonParser().parse(json).getAsJsonObject(); // or JsonArray, depending on the JSON content
+
+assertTrue("Object should have success field", obj.has("success"));
+String success = gson.fromJson(obj.get("success"), String.class);
+String username = gson.fromJson(obj.get("username"), String.class);
+String type = gson.fromJson(obj.get("type"), String.class);
+// etc</source>
+ </answer>
+ </faq>
</part>
<part id="JUnitPerf">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2012-01-27 09:43:46
|
Revision: 935
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=935&view=rev
Author: henryju
Date: 2012-01-27 09:43:35 +0000 (Fri, 27 Jan 2012)
Log Message:
-----------
Update WebDriver to version 2.17.0. Minor fixes.
Modified Paths:
--------------
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/ButtonAssertionsTest.java
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/ConcurrentJWebUnitTest.java
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/IElementTest.java
trunk/jwebunit-core/pom.xml
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/api/IElement.java
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/junit/WebTester.java
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitElementImpl.java
trunk/jwebunit-webdriver-plugin/pom.xml
trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverElementImpl.java
trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java
trunk/jwebunit-webdriver-plugin/src/test/java/net/sourceforge/jwebunit/webdriver/JWebUnitTest.java
Added Paths:
-----------
trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/FixedHtmlUnitDriver.java
Modified: trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/ButtonAssertionsTest.java
===================================================================
--- trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/ButtonAssertionsTest.java 2011-12-30 15:06:39 UTC (rev 934)
+++ trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/ButtonAssertionsTest.java 2012-01-27 09:43:35 UTC (rev 935)
@@ -47,7 +47,7 @@
}
@Test
- public void testAssertButtonwithTowFormsfound() {
+ public void testAssertButtonwithTwoFormsFound() {
beginAt("/pageWithTwoForms.html");
assertButtonPresent("button1");
assertButtonPresent("button2");
Modified: trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/ConcurrentJWebUnitTest.java
===================================================================
--- trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/ConcurrentJWebUnitTest.java 2011-12-30 15:06:39 UTC (rev 934)
+++ trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/ConcurrentJWebUnitTest.java 2012-01-27 09:43:35 UTC (rev 935)
@@ -51,7 +51,7 @@
setBaseUrl(HOST_PATH + "/NavigationTest");
}
- @Rule public Timeout timeoutRule = new Timeout(2000);
+ @Rule public Timeout timeoutRule = new Timeout(10000);
@Rule public ConcurrentRule concurrently = new ConcurrentRule();
@Rule public RepeatingRule repeatedly = new RepeatingRule();
Modified: trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java
===================================================================
--- trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java 2011-12-30 15:06:39 UTC (rev 934)
+++ trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java 2012-01-27 09:43:35 UTC (rev 935)
@@ -21,6 +21,8 @@
import static net.sourceforge.jwebunit.junit.JWebUnit.*;
import static org.junit.Assert.*;
+import static org.hamcrest.Matchers.containsString;
+
import org.junit.Test;
/**
@@ -113,9 +115,8 @@
@Test public void testGetFrameSource() {
beginAt("Frames.html");
- assertTrue(getPageSource().indexOf("<frameset rows=\"33%, 33%, 33%\">")>=0);
+ assertThat(getPageSource(), containsString("<frameset rows=\"33%, 33%, 33%\">"));
gotoFrame("TopFrame");
- assertEquals("<html><body>TopFrame</body></html>", getPageSource());
assertTextPresent("TopFrame");
}
Modified: trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/IElementTest.java
===================================================================
--- trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/IElementTest.java 2011-12-30 15:06:39 UTC (rev 934)
+++ trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/IElementTest.java 2012-01-27 09:43:35 UTC (rev 935)
@@ -55,7 +55,8 @@
beginAt("/template.html");
}
- @Test public void testSimple() {
+ @Test
+ public void testSimple() {
// test an element that exists
IElement element = getElementByXPath("//input[@id='test']");
assertNotNull(element);
@@ -65,7 +66,8 @@
assertEquals(element.getAttribute("value"), "test3");
}
- @Test public void testMissing() {
+ @Test
+ public void testMissing() {
// a missing element should throw an exception
try {
getElementByXPath("//input[@id='test2']");
@@ -78,7 +80,8 @@
/**
* Test parent, child methods
*/
- @Test public void testChildrenAndParent() {
+ @Test
+ public void testChildrenAndParent() {
assertElementPresent("first");
IElement element = getElementById("first");
assertEquals(element.getName(), "li");
@@ -105,7 +108,8 @@
/**
* Test getting the XPath for multiple possible results
*/
- @Test public void testMultiple() {
+ @Test
+ public void testMultiple() {
List<IElement> children = getElementsByXPath("//li");
assertEquals(children.size(), 4);
assertEquals(children.get(0).getTextContent(), "one");
@@ -118,7 +122,8 @@
/**
* change the element and make sure XPath has changed
*/
- @Test public void testChanging() {
+ @Test
+ public void testChanging() {
{
IElement element = getElementByXPath("//input[@id='test']");
assertNotNull(element);
@@ -147,7 +152,8 @@
}
- @Test public void testWithXpath() {
+ @Test
+ public void testWithXpath() {
IElement element = getElementByXPath("//body");
assertNotNull(element);
assertEquals("body", element.getName());
@@ -184,15 +190,16 @@
* Test that setting attributes manually (e.g setAttribute("value")
* properly calls any attached Javascript.
*/
- @Test public void testAttributeJavascript() {
+ @Test
+ public void testAttributeJavascript() {
String testingText = new Date().toString();
{
IElement js1 = getElementById("js1");
IElement js2 = getElementById("js2");
- assertEquals(js1.getAttribute("value"), "initial");
- assertEquals(js2.getAttribute("value"), "unchanged");
+ assertEquals("initial", js1.getAttribute("value"));
+ assertEquals("unchanged", js2.getAttribute("value"));
// change js1's value
js1.setAttribute("value", testingText);
@@ -203,8 +210,8 @@
IElement js1 = getElementById("js1");
IElement js2 = getElementById("js2");
- assertEquals(js1.getAttribute("value"), testingText);
- assertEquals(js2.getAttribute("value"), testingText);
+ assertEquals(testingText, js1.getAttribute("value"));
+ assertEquals(testingText, js2.getAttribute("value"));
}
}
@@ -228,7 +235,8 @@
* Test preceding element XPath.
* preceding: "Selects everything in the document that is before the start tag of the current node"
*/
- @Test public void testPreceding() {
+ @Test
+ public void testPreceding() {
IElement element = getElementById("first"); // li
// should get the first <input>, which is
// <input id="test" name="element_name" value="test3">
Modified: trunk/jwebunit-core/pom.xml
===================================================================
--- trunk/jwebunit-core/pom.xml 2011-12-30 15:06:39 UTC (rev 934)
+++ trunk/jwebunit-core/pom.xml 2012-01-27 09:43:35 UTC (rev 935)
@@ -31,6 +31,11 @@
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.6</version>
+ </dependency>
</dependencies>
<properties>
<topDirectoryLocation>..</topDirectoryLocation>
Modified: trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/api/IElement.java
===================================================================
--- trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/api/IElement.java 2011-12-30 15:06:39 UTC (rev 934)
+++ trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/api/IElement.java 2012-01-27 09:43:35 UTC (rev 935)
@@ -87,7 +87,7 @@
*
* @param string
*/
- public void setAttribute(String string);
+ public void setAttribute(String name);
/**
* Set an attribute on this element.
@@ -95,7 +95,7 @@
* @param string
* @param value
*/
- public void setAttribute(String string, String value);
+ public void setAttribute(String name, String value);
/**
* Set the text content on this element.
Modified: trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/junit/WebTester.java
===================================================================
--- trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/junit/WebTester.java 2011-12-30 15:06:39 UTC (rev 934)
+++ trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/junit/WebTester.java 2012-01-27 09:43:35 UTC (rev 935)
@@ -19,6 +19,15 @@
package net.sourceforge.jwebunit.junit;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.not;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.io.BufferedOutputStream;
@@ -36,8 +45,10 @@
import java.util.Locale;
import java.util.Map;
import java.util.ResourceBundle;
+
import javax.imageio.ImageIO;
import javax.servlet.http.Cookie;
+
import net.sourceforge.jwebunit.api.HttpHeader;
import net.sourceforge.jwebunit.api.IElement;
import net.sourceforge.jwebunit.api.ITestingEngine;
@@ -52,12 +63,10 @@
import net.sourceforge.jwebunit.javascript.JavascriptPrompt;
import net.sourceforge.jwebunit.util.TestContext;
import net.sourceforge.jwebunit.util.TestingEngineRegistry;
+
import org.apache.regexp.RE;
import org.apache.regexp.RESyntaxException;
-import static org.hamcrest.CoreMatchers.*;
-import static org.junit.Assert.*;
-
/**
* Provides a high-level API for basic web application navigation and validation by providing
* JUnit assertions. It supports use of a property file for web resources (a la Struts), though a resource file for the
@@ -2885,13 +2894,13 @@
// get the selected option
for (IElement child : field.getChildren()) {
if (child.getName().equals("option") && child.getAttribute("selected") != null) {
- value = child.getAttribute("value") == null ? child.getTextContent() : child.getAttribute("value");
+ value = child.getAttribute("value");
break;
}
if (child.getName().equals("optgroup")) {
for (IElement subchild : child.getChildren()) {
if (subchild.getName().equals("option") && subchild.getAttribute("selected") != null) {
- value = child.getAttribute("value") == null ? child.getTextContent() : child.getAttribute("value");
+ value = child.getAttribute("value");
break;
}
}
@@ -2962,8 +2971,7 @@
// get the selected option
for (IElement children : field.getChildren()) {
// find the option which matches the given value (we can't specify random values)
- if (children.getName().equals("option") &&
- (children.getAttribute("value") == null ? value.equals(children.getTextContent()) : value.equals(children.getAttribute("value")))) {
+ if (children.getName().equals("option") && value.equals(children.getAttribute("value"))) {
children.setAttribute("selected");
return;
}
Modified: trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitElementImpl.java
===================================================================
--- trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitElementImpl.java 2011-12-30 15:06:39 UTC (rev 934)
+++ trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitElementImpl.java 2012-01-27 09:43:35 UTC (rev 935)
@@ -146,12 +146,12 @@
/* (non-Javadoc)
* @see net.sourceforge.jwebunit.api.IElement#setAttribute(java.lang.String, java.lang.String)
*/
- public void setAttribute(String string, String value) {
- if ("value".equals(string) && element instanceof HtmlInput) {
+ public void setAttribute(String name, String value) {
+ if ("value".equals(name) && element instanceof HtmlInput) {
// for HtmlInputs, we want to run any onChange code if the value changes
((HtmlInput) element).setValueAttribute(value);
} else {
- element.setAttributeNS(null, string, value);
+ element.setAttribute(name, value);
}
}
Modified: trunk/jwebunit-webdriver-plugin/pom.xml
===================================================================
--- trunk/jwebunit-webdriver-plugin/pom.xml 2011-12-30 15:06:39 UTC (rev 934)
+++ trunk/jwebunit-webdriver-plugin/pom.xml 2012-01-27 09:43:35 UTC (rev 935)
@@ -30,7 +30,7 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-htmlunit-driver</artifactId>
- <version>2.8.0</version>
+ <version>2.17.0</version>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
@@ -41,7 +41,7 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
- <version>2.8.0</version>
+ <version>2.17.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jwebunit</groupId>
Added: trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/FixedHtmlUnitDriver.java
===================================================================
--- trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/FixedHtmlUnitDriver.java (rev 0)
+++ trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/FixedHtmlUnitDriver.java 2012-01-27 09:43:35 UTC (rev 935)
@@ -0,0 +1,21 @@
+package net.sourceforge.jwebunit.webdriver;
+
+import com.gargoylesoftware.htmlunit.TopLevelWindow;
+import org.openqa.selenium.htmlunit.HtmlUnitDriver;
+
+public class FixedHtmlUnitDriver extends HtmlUnitDriver {
+
+ @Override
+ public void close() {
+ if (getCurrentWindow() != null) {
+ if (getWebClient().getWebWindows().size() > 1) {
+ ((TopLevelWindow) getCurrentWindow().getTopWindow()).close();
+
+ }
+ else {
+ quit();
+ }
+ }
+ }
+
+}
Property changes on: trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/FixedHtmlUnitDriver.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverElementImpl.java
===================================================================
--- trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverElementImpl.java 2011-12-30 15:06:39 UTC (rev 934)
+++ trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverElementImpl.java 2012-01-27 09:43:35 UTC (rev 935)
@@ -21,21 +21,15 @@
*/
package net.sourceforge.jwebunit.webdriver;
-import org.openqa.selenium.JavascriptExecutor;
-
-import org.openqa.selenium.By;
-
-import org.openqa.selenium.WebElement;
-
import java.util.ArrayList;
import java.util.List;
import net.sourceforge.jwebunit.api.IElement;
-import com.gargoylesoftware.htmlunit.html.DomNode;
-import com.gargoylesoftware.htmlunit.html.HtmlElement;
-import com.gargoylesoftware.htmlunit.html.HtmlInput;
-import com.gargoylesoftware.htmlunit.html.HtmlTextArea;
+import org.openqa.selenium.By;
+import org.openqa.selenium.JavascriptExecutor;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
/**
* Webdriver implementation of IElement wrapper.
@@ -49,8 +43,14 @@
* The wrapped element.
*/
private WebElement element;
+
+ /**
+ * A reference to the driver.
+ */
+ private WebDriver driver;
- public WebDriverElementImpl(WebElement element) {
+ public WebDriverElementImpl(WebDriver driver, WebElement element) {
+ this.driver = driver;
if (element == null)
throw new NullPointerException("Cannot create an IElement for a null element.");
this.element = element;
@@ -83,7 +83,7 @@
List<IElement> children = new ArrayList<IElement>();
for (WebElement e : element.findElements(By.xpath("child::*"))) {
if (e != null)
- children.add(new WebDriverElementImpl(e));
+ children.add(new WebDriverElementImpl(driver, e));
}
return children;
}
@@ -94,7 +94,7 @@
* @see net.sourceforge.jwebunit.api.IElement#getParent()
*/
public IElement getParent() {
- return new WebDriverElementImpl(element.findElement(By.xpath("parent::*")));
+ return new WebDriverElementImpl(driver, element.findElement(By.xpath("parent::*")));
}
/*
@@ -112,7 +112,7 @@
* @see net.sourceforge.jwebunit.api.IElement#getElement(java.lang.String)
*/
public IElement getElement(String xpath) {
- return new WebDriverElementImpl((WebElement) element.findElement(By.xpath(xpath)));
+ return new WebDriverElementImpl(driver, (WebElement) element.findElement(By.xpath(xpath)));
}
/*
@@ -123,7 +123,7 @@
public List<IElement> getElements(String xpath) {
List<IElement> elements = new ArrayList<IElement>();
for (WebElement o : element.findElements(By.xpath(xpath))) {
- elements.add(new WebDriverElementImpl(o));
+ elements.add(new WebDriverElementImpl(driver, o));
}
return elements;
}
@@ -137,8 +137,8 @@
*
* @see net.sourceforge.jwebunit.api.IElement#setAttribute(java.lang.String)
*/
- public void setAttribute(String string) {
- throw new UnsupportedOperationException("Not supported yet.");
+ public void setAttribute(String name) {
+ ((JavascriptExecutor) driver).executeScript("return arguments[0].setAttribute(arguments[1], true);", element, name);
}
/*
@@ -146,8 +146,13 @@
*
* @see net.sourceforge.jwebunit.api.IElement#setAttribute(java.lang.String, java.lang.String)
*/
- public void setAttribute(String string, String value) {
- throw new UnsupportedOperationException("Not supported yet.");
+ public void setAttribute(String name, String value) {
+ if ("value".equals(name) && "input".equals(element.getTagName())) {
+ // for inputs, we want to run any onChange code if the value changes
+ element.sendKeys(value);
+ } else {
+ ((JavascriptExecutor) driver).executeScript("return arguments[0].setAttribute(arguments[1], arguments[2]);", element, name, value);
+ }
}
/*
@@ -156,7 +161,19 @@
* @see net.sourceforge.jwebunit.api.IElement#setTextContent(java.lang.String)
*/
public void setTextContent(String value) {
- throw new UnsupportedOperationException("Not supported yet.");
+ if (element.getTagName().equals("textarea")) {
+ element.clear();
+ element.sendKeys(value);
+ } else {
+ ((JavascriptExecutor) driver).executeScript(
+ "var parent = arguments[0];" +
+ "var children = parent.childNodes;" +
+ "for (i=0; i< children.length; i++) {" +
+ " parent.removeChild(children[i]);" +
+ "}" +
+ "parent.appendChild(document.createTextNode(arguments[1]));"
+ , element, value);
+ }
}
@Override
Modified: trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java
===================================================================
--- trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java 2011-12-30 15:06:39 UTC (rev 934)
+++ trunk/jwebunit-webdriver-plugin/src/main/java/net/sourceforge/jwebunit/webdriver/WebDriverTestingEngineImpl.java 2012-01-27 09:43:35 UTC (rev 935)
@@ -717,7 +717,7 @@
private WebElement getButton(String nameOrID) {
WebElement e = getWebElementByXPath("//input[(@type='submit' or @type='image' or @type='reset' or @type='button') and (@name=" + escapeQuotes(nameOrID) + " or @id=" + escapeQuotes(nameOrID) + ")]", false, true);
if (e == null) {
- e = getWebElementByXPath("//button[@type='submit' and (@name=" + escapeQuotes(nameOrID) + " or @id=" + escapeQuotes(nameOrID) + ")]", false, true);
+ e = getWebElementByXPath("//button[@name=" + escapeQuotes(nameOrID) + " or @id=" + escapeQuotes(nameOrID) + "]", false, true);
}
return e;
}
@@ -756,7 +756,7 @@
public String getPageText() {
try {
- return driver.findElement(By.xpath("//body")).getText();
+ return driver.findElement(By.tagName("body")).getText();
} catch (Exception e) {
//Maybe this is not HTML
return driver.getPageSource();
@@ -764,17 +764,19 @@
}
public String getPageSource() {
- String encoding = "ISO-8859-1";
- if (response.getEntity().getContentEncoding() != null) {
- encoding = response.getEntity().getContentEncoding().getValue();
- }
-
- try {
- return IOUtils.toString(response.getEntity().getContent(), encoding);
- }
- catch (IOException e) {
- throw new RuntimeException(e);
- }
+ return driver.getPageSource();
+ //Do not work when there are requests following loading of main page (like frames)
+// String encoding = "ISO-8859-1";
+// if (response.getEntity().getContentEncoding() != null) {
+// encoding = response.getEntity().getContentEncoding().getValue();
+// }
+//
+// try {
+// return IOUtils.toString(response.getEntity().getContent(), encoding);
+// }
+// catch (IOException e) {
+// throw new RuntimeException(e);
+// }
}
public String getPageTitle() {
@@ -1018,7 +1020,7 @@
public IElement getElementByXPath(String xpath) {
try {
- return new WebDriverElementImpl(driver.findElement(By.xpath(xpath)));
+ return new WebDriverElementImpl(driver, driver.findElement(By.xpath(xpath)));
}
catch (NoSuchElementException e) {
return null;
@@ -1027,7 +1029,7 @@
public IElement getElementByID(String id) {
try {
- return new WebDriverElementImpl(driver.findElement(By.id(id)));
+ return new WebDriverElementImpl(driver, driver.findElement(By.id(id)));
}
catch (NoSuchElementException e) {
return null;
@@ -1038,7 +1040,7 @@
List<IElement> result = new ArrayList<IElement>();
List<WebElement> elements = driver.findElements(By.xpath(xpath));
for (WebElement child : elements) {
- result.add(new WebDriverElementImpl(child));
+ result.add(new WebDriverElementImpl(driver, child));
}
return result;
}
Modified: trunk/jwebunit-webdriver-plugin/src/test/java/net/sourceforge/jwebunit/webdriver/JWebUnitTest.java
===================================================================
--- trunk/jwebunit-webdriver-plugin/src/test/java/net/sourceforge/jwebunit/webdriver/JWebUnitTest.java 2011-12-30 15:06:39 UTC (rev 934)
+++ trunk/jwebunit-webdriver-plugin/src/test/java/net/sourceforge/jwebunit/webdriver/JWebUnitTest.java 2012-01-27 09:43:35 UTC (rev 935)
@@ -18,10 +18,9 @@
*/
package net.sourceforge.jwebunit.webdriver;
-import org.junit.AfterClass;
-
import net.sourceforge.jwebunit.tests.ButtonAssertionsTest;
import net.sourceforge.jwebunit.tests.CharsetTest;
+import net.sourceforge.jwebunit.tests.ConcurrentJWebUnitTest;
import net.sourceforge.jwebunit.tests.CustomTesterTest;
import net.sourceforge.jwebunit.tests.ExpectedTableAssertionsHtmlTest;
import net.sourceforge.jwebunit.tests.ExpectedTableAssertionsXHtmlTest;
@@ -32,12 +31,10 @@
import net.sourceforge.jwebunit.tests.HtmlParsingTest;
import net.sourceforge.jwebunit.tests.IElementTest;
import net.sourceforge.jwebunit.tests.ImageTest;
-import net.sourceforge.jwebunit.tests.ConcurrentJWebUnitTest;
import net.sourceforge.jwebunit.tests.JavaScriptEventsTest;
import net.sourceforge.jwebunit.tests.JavaScriptTest;
import net.sourceforge.jwebunit.tests.NavigationTest;
import net.sourceforge.jwebunit.tests.NonHtmlContentTest;
-import net.sourceforge.jwebunit.tests.RedirectionTest;
import net.sourceforge.jwebunit.tests.ResourceBundleAssertionsTest;
import net.sourceforge.jwebunit.tests.ResponseServletTest;
import net.sourceforge.jwebunit.tests.SelectOptionsTest;
@@ -47,6 +44,8 @@
import net.sourceforge.jwebunit.tests.WebCookieTest;
import net.sourceforge.jwebunit.tests.XPathTest;
import net.sourceforge.jwebunit.tests.util.JettySetup;
+
+import org.junit.AfterClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: SourceForge.net <no...@so...> - 2012-01-24 23:32:52
|
Feature Requests item #3476459, was opened at 2012-01-19 20:04 Message generated for change (Comment added) made by jevonwright You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497985&aid=3476459&group_id=61302 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Documentation Group: None Status: Open Priority: 7 Private: No Submitted By: Jevon Wright (jevonwright) Assigned to: Nobody/Anonymous (nobody) Summary: Provide sample logback.xml in quick start guide Initial Comment: By default, if you extract JWebUnit into a new project with no existing logger configuration, JWebUnit now uses the logback logging framework. However the quick start documentation says nothing about this framework, or how to configure it. By default, ALL debug messages -- including debugging at the level of the sockets in HttpClient -- will be printed when executing a test. At the very least, the quick start guide should include a sample logback.xml file such as the one I discuss on StackOverflow: http://stackoverflow.com/questions/4915414/disable-httpclient-logging/8936580#8936580 That is: <configuration debug="false"> <!-- definition of appender STDOUT --> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%-4relative [%thread] %-5level %logger{35} - %msg %n</pattern> </encoder> </appender> <root level="ERROR"> <!-- appender referenced after it is defined --> <appender-ref ref="STDOUT"/> </root> </configuration> ---------------------------------------------------------------------- >Comment By: Jevon Wright (jevonwright) Date: 2012-01-24 15:32 Message: I don't mind either option, it just needs to be well documented :-) If JWebUnit includes HtmlUnit, then it should also include some logging framework (if a logging framework is necessary) and documentation on how to confiugre it (if necessary). Perhaps you can keep it an optional dependency for people who use Maven/POM, but for users who download the JWebUnit JARs directly, include logback & a sample logback.xml in those JARs. Alternatively, include log4j and sample log4j.properties. ---------------------------------------------------------------------- Comment By: Julien HENRY (henryju) Date: 2012-01-20 01:15 Message: Just checked and you are right, logback is in the dependency list. Seems that the optional flag is not working with dependency management... http://jira.codehaus.org/browse/MNG-4600 My purpose was to let users choose the logging framework they want. I see two options: A - don't provide any slf4j implementation by default. Mean users are forced to add another dependency in their poms (it was my first intention) B - continue to provide logback by default. Users that don't want logback can add an exclusion (it is the current situation) WDYT? ---------------------------------------------------------------------- Comment By: Julien HENRY (henryju) Date: 2012-01-20 01:07 Message: JWebUnit should not use logback but slf4j. Logback is an optional dependency that should not be taken transitively and is used for our unit tests. It is up to the end user to choose an slf4j implementation (logback, slf4j-log4j12, slf4j-jcl, ...) and provide the configuration. But you are right that it should be documented. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497985&aid=3476459&group_id=61302 |
|
From: SourceForge.net <no...@so...> - 2012-01-20 09:15:40
|
Feature Requests item #3476459, was opened at 2012-01-19 20:04 Message generated for change (Comment added) made by henryju You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497985&aid=3476459&group_id=61302 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Documentation Group: None Status: Open Priority: 7 Private: No Submitted By: Jevon Wright (jevonwright) Assigned to: Nobody/Anonymous (nobody) Summary: Provide sample logback.xml in quick start guide Initial Comment: By default, if you extract JWebUnit into a new project with no existing logger configuration, JWebUnit now uses the logback logging framework. However the quick start documentation says nothing about this framework, or how to configure it. By default, ALL debug messages -- including debugging at the level of the sockets in HttpClient -- will be printed when executing a test. At the very least, the quick start guide should include a sample logback.xml file such as the one I discuss on StackOverflow: http://stackoverflow.com/questions/4915414/disable-httpclient-logging/8936580#8936580 That is: <configuration debug="false"> <!-- definition of appender STDOUT --> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%-4relative [%thread] %-5level %logger{35} - %msg %n</pattern> </encoder> </appender> <root level="ERROR"> <!-- appender referenced after it is defined --> <appender-ref ref="STDOUT"/> </root> </configuration> ---------------------------------------------------------------------- >Comment By: Julien HENRY (henryju) Date: 2012-01-20 01:15 Message: Just checked and you are right, logback is in the dependency list. Seems that the optional flag is not working with dependency management... http://jira.codehaus.org/browse/MNG-4600 My purpose was to let users choose the logging framework they want. I see two options: A - don't provide any slf4j implementation by default. Mean users are forced to add another dependency in their poms (it was my first intention) B - continue to provide logback by default. Users that don't want logback can add an exclusion (it is the current situation) WDYT? ---------------------------------------------------------------------- Comment By: Julien HENRY (henryju) Date: 2012-01-20 01:07 Message: JWebUnit should not use logback but slf4j. Logback is an optional dependency that should not be taken transitively and is used for our unit tests. It is up to the end user to choose an slf4j implementation (logback, slf4j-log4j12, slf4j-jcl, ...) and provide the configuration. But you are right that it should be documented. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497985&aid=3476459&group_id=61302 |
|
From: SourceForge.net <no...@so...> - 2012-01-20 09:07:12
|
Feature Requests item #3476459, was opened at 2012-01-19 20:04 Message generated for change (Comment added) made by henryju You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497985&aid=3476459&group_id=61302 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Documentation Group: None Status: Open Priority: 7 Private: No Submitted By: Jevon Wright (jevonwright) Assigned to: Nobody/Anonymous (nobody) Summary: Provide sample logback.xml in quick start guide Initial Comment: By default, if you extract JWebUnit into a new project with no existing logger configuration, JWebUnit now uses the logback logging framework. However the quick start documentation says nothing about this framework, or how to configure it. By default, ALL debug messages -- including debugging at the level of the sockets in HttpClient -- will be printed when executing a test. At the very least, the quick start guide should include a sample logback.xml file such as the one I discuss on StackOverflow: http://stackoverflow.com/questions/4915414/disable-httpclient-logging/8936580#8936580 That is: <configuration debug="false"> <!-- definition of appender STDOUT --> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%-4relative [%thread] %-5level %logger{35} - %msg %n</pattern> </encoder> </appender> <root level="ERROR"> <!-- appender referenced after it is defined --> <appender-ref ref="STDOUT"/> </root> </configuration> ---------------------------------------------------------------------- >Comment By: Julien HENRY (henryju) Date: 2012-01-20 01:07 Message: JWebUnit should not use logback but slf4j. Logback is an optional dependency that should not be taken transitively and is used for our unit tests. It is up to the end user to choose an slf4j implementation (logback, slf4j-log4j12, slf4j-jcl, ...) and provide the configuration. But you are right that it should be documented. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497985&aid=3476459&group_id=61302 |
|
From: SourceForge.net <no...@so...> - 2012-01-20 04:04:11
|
Feature Requests item #3476459, was opened at 2012-01-19 20:04 Message generated for change (Tracker Item Submitted) made by jevonwright You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497985&aid=3476459&group_id=61302 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Documentation Group: None Status: Open Priority: 7 Private: No Submitted By: Jevon Wright (jevonwright) Assigned to: Nobody/Anonymous (nobody) Summary: Provide sample logback.xml in quick start guide Initial Comment: By default, if you extract JWebUnit into a new project with no existing logger configuration, JWebUnit now uses the logback logging framework. However the quick start documentation says nothing about this framework, or how to configure it. By default, ALL debug messages -- including debugging at the level of the sockets in HttpClient -- will be printed when executing a test. At the very least, the quick start guide should include a sample logback.xml file such as the one I discuss on StackOverflow: http://stackoverflow.com/questions/4915414/disable-httpclient-logging/8936580#8936580 That is: <configuration debug="false"> <!-- definition of appender STDOUT --> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%-4relative [%thread] %-5level %logger{35} - %msg %n</pattern> </encoder> </appender> <root level="ERROR"> <!-- appender referenced after it is defined --> <appender-ref ref="STDOUT"/> </root> </configuration> ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497985&aid=3476459&group_id=61302 |
|
From: Chris R <chr...@ya...> - 2012-01-12 13:03:38
|
http://lume.org/weblog/wp-content/themes/friends.php?hello158.png |