Return-Path: X-Original-To: apmail-wicket-commits-archive@www.apache.org Delivered-To: apmail-wicket-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9E00B10B49 for ; Tue, 28 Jan 2014 17:22:11 +0000 (UTC) Received: (qmail 93386 invoked by uid 500); 28 Jan 2014 17:22:10 -0000 Delivered-To: apmail-wicket-commits-archive@wicket.apache.org Received: (qmail 93356 invoked by uid 500); 28 Jan 2014 17:22:10 -0000 Mailing-List: contact commits-help@wicket.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@wicket.apache.org Delivered-To: mailing list commits@wicket.apache.org Received: (qmail 93347 invoked by uid 99); 28 Jan 2014 17:22:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 17:22:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 17:21:46 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 952112388C52; Tue, 28 Jan 2014 17:20:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1562129 [11/16] - in /wicket/common/site/trunk/_site/guide: ./ gapi/DefaultPackage/ gapi/spring/ guide/ guide/pages/ guide/src/docs/guide/ guide/src/docs/guide/nativewebsockets/ Date: Tue, 28 Jan 2014 17:20:49 -0000 To: commits@wicket.apache.org From: mgrigorov@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140128172058.952112388C52@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: wicket/common/site/trunk/_site/guide/guide/pages/testing_2.html URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/testing_2.html?rev=1562129&r1=1562128&r2=1562129&view=diff ============================================================================== --- wicket/common/site/trunk/_site/guide/guide/pages/testing_2.html (original) +++ wicket/common/site/trunk/_site/guide/guide/pages/testing_2.html Tue Jan 28 17:20:45 2014 @@ -2,7 +2,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - 21.2 Testing Wicket forms 6.x + 22.2 Testing Wicket forms 6.x @@ -81,28 +81,31 @@ function addJsClass() { -
20Security with Wicket + -
21Test Driven Development with Wicket + -
22Test Driven Development with Wicket and Spring + -
23Wicket Best Practices + -
24Working with Maven (Appendix) + -
25Project WicketStuff (Appendix) + -
26Lost In Redirection With Apache Wicket (Appendix) + - @@ -132,18 +135,18 @@ function addJsClass() {
- + (Quick Reference) - +
-

21.2 Testing Wicket forms - Reference Documentation

+

22.2 Testing Wicket forms - Reference Documentation

Authors: Andrea Del Bene, Carsten Hufe, Christian Kroemer, Daniel Bartl, Paul Borș

@@ -156,7 +159,7 @@ function addJsClass() { -

21.2 Testing Wicket forms

+

22.2 Testing Wicket forms

Wicket provides utility class FormTester that is expressly designed to test Wicket forms. A new FormTester is returned by WicketTester's method newFormTester(String, boolean) which takes in input the page-relative path of the form we want to test and a boolean flag indicating if its form components must be filled with a blank string:

//…
 //create a new form tester without filling its form components with a blank string
 FormTester formTester = tester.newFormTester("form", false);
@@ -212,9 +215,9 @@ formTester.submit(
- + - +
Modified: wicket/common/site/trunk/_site/guide/guide/pages/testing_3.html URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/testing_3.html?rev=1562129&r1=1562128&r2=1562129&view=diff ============================================================================== --- wicket/common/site/trunk/_site/guide/guide/pages/testing_3.html (original) +++ wicket/common/site/trunk/_site/guide/guide/pages/testing_3.html Tue Jan 28 17:20:45 2014 @@ -2,7 +2,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - 21.3 Testing markup with TagTester 6.x + 22.3 Testing markup with TagTester 6.x @@ -81,28 +81,31 @@ function addJsClass() { -
20Security with Wicket + -
21Test Driven Development with Wicket + -
22Test Driven Development with Wicket and Spring + -
23Wicket Best Practices + -
24Working with Maven (Appendix) + -
25Project WicketStuff (Appendix) + -
26Lost In Redirection With Apache Wicket (Appendix) + - @@ -132,18 +135,18 @@ function addJsClass() {
- + (Quick Reference) - +
-

21.3 Testing markup with TagTester - Reference Documentation

+

22.3 Testing markup with TagTester - Reference Documentation

Authors: Andrea Del Bene, Carsten Hufe, Christian Kroemer, Daniel Bartl, Paul Borș

@@ -156,7 +159,7 @@ function addJsClass() { -

21.3 Testing markup with TagTester

+

22.3 Testing markup with TagTester

If we need to test component markup at a more fine-grained level, we can use class TagTester from package org.apache.wicket.util.tester.

This test class allows to check if the generated markup contains one or more tags having a given attribute with a given value. TagTester can not be directly instantiated but it comes with three factory methods that return one or more TagTester matching the searching criteria. In the following test case (from project TagTesterExample) we retrieve the first tag of the home page (a <span> tag) having attribute class equal to myClass:

HomePage markup:

<html xmlns:wicket="http://wicket.apache.org">
 	<head>
 		<meta charset="utf-8" />
@@ -187,9 +190,9 @@ function addJsClass() {
 
                 
- + - +
Modified: wicket/common/site/trunk/_site/guide/guide/pages/testing_4.html URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/testing_4.html?rev=1562129&r1=1562128&r2=1562129&view=diff ============================================================================== --- wicket/common/site/trunk/_site/guide/guide/pages/testing_4.html (original) +++ wicket/common/site/trunk/_site/guide/guide/pages/testing_4.html Tue Jan 28 17:20:45 2014 @@ -2,7 +2,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - 21.4 Summary 6.x + 22.4 Summary 6.x @@ -81,28 +81,31 @@ function addJsClass() { -
20Security with Wicket + -
21Test Driven Development with Wicket + -
22Test Driven Development with Wicket and Spring + -
23Wicket Best Practices + -
24Working with Maven (Appendix) + -
25Project WicketStuff (Appendix) + -
26Lost In Redirection With Apache Wicket (Appendix) + - @@ -132,18 +135,18 @@ function addJsClass() {
- + (Quick Reference) - +
-

21.4 Summary - Reference Documentation

+

22.4 Summary - Reference Documentation

Authors: Andrea Del Bene, Carsten Hufe, Christian Kroemer, Daniel Bartl, Paul Borș

@@ -156,15 +159,15 @@ function addJsClass() { -

21.4 Summary

+

22.4 Summary

With a component-oriented framework we can test our pages and components as we use to do with any other Java entity. Wicket offers a complete support for writing testing code, offering built-in tools to test nearly all the elements that build up our applications (pages, containers, links, behaviors, etc...).

The main entity discussed in this chapter has been class WicketTester which can be used to write unit tests and acceptance tests for our application, but we have also seen how to test forms with FormTester and how to inspect markup with TagTester.

In addition to learning how to use the utility classes provided by Wicket for testing, we have also experienced the innovative approach of Wicket to web testing that allows to test components in isolation without the need of running our tests with a web server and depending only on JUnit as testing framework.

- + - +
Modified: wicket/common/site/trunk/_site/guide/guide/pages/testingspring_1.html URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/testingspring_1.html?rev=1562129&r1=1562128&r2=1562129&view=diff ============================================================================== --- wicket/common/site/trunk/_site/guide/guide/pages/testingspring_1.html (original) +++ wicket/common/site/trunk/_site/guide/guide/pages/testingspring_1.html Tue Jan 28 17:20:45 2014 @@ -2,7 +2,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - 22.1 Configuration of the runtime environment 6.x + 23.1 Configuration of the runtime environment 6.x @@ -81,28 +81,31 @@ function addJsClass() { -
20Security with Wicket + -
21Test Driven Development with Wicket + -
22Test Driven Development with Wicket and Spring + -
23Wicket Best Practices + -
24Working with Maven (Appendix) + -
25Project WicketStuff (Appendix) + -
26Lost In Redirection With Apache Wicket (Appendix) + - @@ -132,18 +135,18 @@ function addJsClass() {
- + (Quick Reference) - +
-

22.1 Configuration of the runtime environment - Reference Documentation

+

23.1 Configuration of the runtime environment - Reference Documentation

Authors: Andrea Del Bene, Carsten Hufe, Christian Kroemer, Daniel Bartl, Paul Borș

@@ -156,7 +159,7 @@ function addJsClass() { -

22.1 Configuration of the runtime environment

+

23.1 Configuration of the runtime environment

In order to get the Wicket framework up to speed when your server is up and running, you usually configure a WicketFilter instance in your web application deployment descriptor file (web.xml) while passing it a single init parameter called applicationClassName that points to your main implementation class extending org.apache.wicket.protocol.http.WebApplication where all of your application-wide settings and initialization requirements are dealt with:

<filter>
     <filter-name>wicketfilter</filter-name>
     <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
@@ -206,9 +209,9 @@ function addJsClass() {
 
                 
- + - +
Modified: wicket/common/site/trunk/_site/guide/guide/pages/testingspring_2.html URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/testingspring_2.html?rev=1562129&r1=1562128&r2=1562129&view=diff ============================================================================== --- wicket/common/site/trunk/_site/guide/guide/pages/testingspring_2.html (original) +++ wicket/common/site/trunk/_site/guide/guide/pages/testingspring_2.html Tue Jan 28 17:20:45 2014 @@ -2,7 +2,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - 22.2 Configuration of the JUnit based integration test environment 6.x + 23.2 Configuration of the JUnit based integration test environment 6.x @@ -81,28 +81,31 @@ function addJsClass() { -
20Security with Wicket + -
21Test Driven Development with Wicket + -
22Test Driven Development with Wicket and Spring + -
23Wicket Best Practices + -
24Working with Maven (Appendix) + -
25Project WicketStuff (Appendix) + -
26Lost In Redirection With Apache Wicket (Appendix) + - @@ -132,18 +135,18 @@ function addJsClass() {
- + (Quick Reference) - +
-

22.2 Configuration of the JUnit based integration test environment - Reference Documentation

+

23.2 Configuration of the JUnit based integration test environment - Reference Documentation

Authors: Andrea Del Bene, Carsten Hufe, Christian Kroemer, Daniel Bartl, Paul Borș

@@ -156,7 +159,7 @@ function addJsClass() { -

22.2 Configuration of the JUnit based integration test environment

+

23.2 Configuration of the JUnit based integration test environment

One of the main features of Apache Wicket framework is the ability to easily write and run plain unit tests for your Pages and all other kinds of Components that even include the verification of the rendering process itself by using JUnit framework and the WicketTester API only. When using Spring framework for application configuration together with Wicket, as we do, you can even use the same tools to easily write and run full blown integration tests for your web application as well. All you have to do is use Spring's TestContext framework additionally to configure and run your JUnit based integration tests. The Spring Framework provides a set of Spring specific annotations that you can use in your integration tests in conjunction with the TestContext framework itself in order to easily configure an according ApplicationContext instance for your tests as well as for appropriate transaction management before, during and after your test execution. Following code snippet represents a simple JUnit 4 based test case using Spring's specific annotations in order to initialize an ApplicationContext instance prior to executing the test itself:

@RunWith(SpringJUnit4ClassRunner.class)
 @ContextConfiguration(locations = {"classpath:WEB-INF/applicationContext.xml"})
 @TransactionConfiguration(transactionManager = "txManager", defaultRollback = false)
@@ -223,9 +226,9 @@ function addJsClass() {
 
                 
- + - +
Modified: wicket/common/site/trunk/_site/guide/guide/pages/testingspring_3.html URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/testingspring_3.html?rev=1562129&r1=1562128&r2=1562129&view=diff ============================================================================== --- wicket/common/site/trunk/_site/guide/guide/pages/testingspring_3.html (original) +++ wicket/common/site/trunk/_site/guide/guide/pages/testingspring_3.html Tue Jan 28 17:20:45 2014 @@ -2,7 +2,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - 22.3 Summary 6.x + 23.3 Summary 6.x @@ -81,28 +81,31 @@ function addJsClass() { -
20Security with Wicket + -
21Test Driven Development with Wicket + -
22Test Driven Development with Wicket and Spring + -
23Wicket Best Practices + -
24Working with Maven (Appendix) + -
25Project WicketStuff (Appendix) + -
26Lost In Redirection With Apache Wicket (Appendix) + - @@ -132,18 +135,18 @@ function addJsClass() {
- + (Quick Reference) - +
-

22.3 Summary - Reference Documentation

+

23.3 Summary - Reference Documentation

Authors: Andrea Del Bene, Carsten Hufe, Christian Kroemer, Daniel Bartl, Paul Borș

@@ -156,15 +159,15 @@ function addJsClass() { -

22.3 Summary

+

23.3 Summary

With the configuration outlined above, no additional modifications are required to the test itself. It's going to turn green now. This way you can use exactly the same Spring context configuration that you'd use in your runtime environment for running your JUnit based integration tests as well.

- + - +
Modified: wicket/common/site/trunk/_site/guide/guide/pages/urls_1.html URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/urls_1.html?rev=1562129&r1=1562128&r2=1562129&view=diff ============================================================================== --- wicket/common/site/trunk/_site/guide/guide/pages/urls_1.html (original) +++ wicket/common/site/trunk/_site/guide/guide/pages/urls_1.html Tue Jan 28 17:20:45 2014 @@ -81,28 +81,31 @@ function addJsClass() { -
20Security with Wicket + -
21Test Driven Development with Wicket + -
22Test Driven Development with Wicket and Spring + -
23Wicket Best Practices + -
24Working with Maven (Appendix) + -
25Project WicketStuff (Appendix) + -
26Lost In Redirection With Apache Wicket (Appendix) + - Modified: wicket/common/site/trunk/_site/guide/guide/pages/urls_2.html URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/urls_2.html?rev=1562129&r1=1562128&r2=1562129&view=diff ============================================================================== --- wicket/common/site/trunk/_site/guide/guide/pages/urls_2.html (original) +++ wicket/common/site/trunk/_site/guide/guide/pages/urls_2.html Tue Jan 28 17:20:45 2014 @@ -81,28 +81,31 @@ function addJsClass() { -
20Security with Wicket + -
21Test Driven Development with Wicket + -
22Test Driven Development with Wicket and Spring + -
23Wicket Best Practices + -
24Working with Maven (Appendix) + -
25Project WicketStuff (Appendix) + -
26Lost In Redirection With Apache Wicket (Appendix) + - Modified: wicket/common/site/trunk/_site/guide/guide/pages/urls_3.html URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/urls_3.html?rev=1562129&r1=1562128&r2=1562129&view=diff ============================================================================== --- wicket/common/site/trunk/_site/guide/guide/pages/urls_3.html (original) +++ wicket/common/site/trunk/_site/guide/guide/pages/urls_3.html Tue Jan 28 17:20:45 2014 @@ -81,28 +81,31 @@ function addJsClass() { -
20Security with Wicket + -
21Test Driven Development with Wicket + -
22Test Driven Development with Wicket and Spring + -
23Wicket Best Practices + -
24Working with Maven (Appendix) + -
25Project WicketStuff (Appendix) + -
26Lost In Redirection With Apache Wicket (Appendix) + - Modified: wicket/common/site/trunk/_site/guide/guide/pages/urls_4.html URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/urls_4.html?rev=1562129&r1=1562128&r2=1562129&view=diff ============================================================================== --- wicket/common/site/trunk/_site/guide/guide/pages/urls_4.html (original) +++ wicket/common/site/trunk/_site/guide/guide/pages/urls_4.html Tue Jan 28 17:20:45 2014 @@ -81,28 +81,31 @@ function addJsClass() { -
20Security with Wicket + -
21Test Driven Development with Wicket + -
22Test Driven Development with Wicket and Spring + -
23Wicket Best Practices + -
24Working with Maven (Appendix) + -
25Project WicketStuff (Appendix) + -
26Lost In Redirection With Apache Wicket (Appendix) + - Modified: wicket/common/site/trunk/_site/guide/guide/pages/urls_5.html URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/urls_5.html?rev=1562129&r1=1562128&r2=1562129&view=diff ============================================================================== --- wicket/common/site/trunk/_site/guide/guide/pages/urls_5.html (original) +++ wicket/common/site/trunk/_site/guide/guide/pages/urls_5.html Tue Jan 28 17:20:45 2014 @@ -81,28 +81,31 @@ function addJsClass() { -
20Security with Wicket + -
21Test Driven Development with Wicket + -
22Test Driven Development with Wicket and Spring + -
23Wicket Best Practices + -
24Working with Maven (Appendix) + -
25Project WicketStuff (Appendix) + -
26Lost In Redirection With Apache Wicket (Appendix) + - Modified: wicket/common/site/trunk/_site/guide/guide/pages/urls_6.html URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/urls_6.html?rev=1562129&r1=1562128&r2=1562129&view=diff ============================================================================== --- wicket/common/site/trunk/_site/guide/guide/pages/urls_6.html (original) +++ wicket/common/site/trunk/_site/guide/guide/pages/urls_6.html Tue Jan 28 17:20:45 2014 @@ -81,28 +81,31 @@ function addJsClass() { -
20Security with Wicket + -
21Test Driven Development with Wicket + -
22Test Driven Development with Wicket and Spring + -
23Wicket Best Practices + -
24Working with Maven (Appendix) + -
25Project WicketStuff (Appendix) + -
26Lost In Redirection With Apache Wicket (Appendix) + - Modified: wicket/common/site/trunk/_site/guide/guide/pages/urls_7.html URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/urls_7.html?rev=1562129&r1=1562128&r2=1562129&view=diff ============================================================================== --- wicket/common/site/trunk/_site/guide/guide/pages/urls_7.html (original) +++ wicket/common/site/trunk/_site/guide/guide/pages/urls_7.html Tue Jan 28 17:20:45 2014 @@ -81,28 +81,31 @@ function addJsClass() { -
20Security with Wicket + -
21Test Driven Development with Wicket + -
22Test Driven Development with Wicket and Spring + -
23Wicket Best Practices + -
24Working with Maven (Appendix) + -
25Project WicketStuff (Appendix) + -
26Lost In Redirection With Apache Wicket (Appendix) + - Modified: wicket/common/site/trunk/_site/guide/guide/pages/versioningCaching_1.html URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/versioningCaching_1.html?rev=1562129&r1=1562128&r2=1562129&view=diff ============================================================================== --- wicket/common/site/trunk/_site/guide/guide/pages/versioningCaching_1.html (original) +++ wicket/common/site/trunk/_site/guide/guide/pages/versioningCaching_1.html Tue Jan 28 17:20:45 2014 @@ -81,28 +81,31 @@ function addJsClass() { -
20Security with Wicket + -
21Test Driven Development with Wicket + -
22Test Driven Development with Wicket and Spring + -
23Wicket Best Practices + -
24Working with Maven (Appendix) + -
25Project WicketStuff (Appendix) + -
26Lost In Redirection With Apache Wicket (Appendix) + - Modified: wicket/common/site/trunk/_site/guide/guide/pages/versioningCaching_2.html URL: http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/guide/guide/pages/versioningCaching_2.html?rev=1562129&r1=1562128&r2=1562129&view=diff ============================================================================== --- wicket/common/site/trunk/_site/guide/guide/pages/versioningCaching_2.html (original) +++ wicket/common/site/trunk/_site/guide/guide/pages/versioningCaching_2.html Tue Jan 28 17:20:45 2014 @@ -81,28 +81,31 @@ function addJsClass() { -