jwebunit-development Mailing List for JWebUnit (Page 8)
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: SourceForge.net <no...@so...> - 2010-11-25 08:22:47
|
Bugs item #3116839, was opened at 2010-11-23 19:52 Message generated for change (Settings changed) made by henryju You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497982&aid=3116839&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: Core API >Group: Release 3.0 >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Tony Qian (tonyqian) Assigned to: Julien HENRY (henryju) Summary: assertTitleNotSame works incorrectly Initial Comment: Accroding to javadoc, this method is to check if the page title is not equal to the value of title passed in the method. /** * Assert title of current html page in conversation is not * equal to another value. * * @param title * unexpected title value */ But this method calls Assert.assertNotSame(title, getTestEngine().getPageTitle()); Assert.assertNotSame calls following method static public void assertNotSame(String message, Object expected, Object actual) { if (expected == actual) failSame(message); } As you can see, we are comparing references (addresses in memory), not string values. Therefore, assertTitleNotSame(String title) always succeeds. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497982&aid=3116839&group_id=61302 |
|
From: Jevon W. <je...@je...> - 2010-11-24 21:49:37
|
Fantastic :)
Jevon
On Wed, Nov 24, 2010 at 9:09 PM, Julien HENRY <he...@ya...> wrote:
> (Moved to dev ML)
>
> +1
>
> This is not consistent.
>
> There is another call to Assert.assertNotSame in
> setLabeledFormElementField method that could be replaced by
> assertNotEquals.
>
> I'll do it and add a test case.
>
> Regards
>
> Julien
>
> ------------------------------
> *De :* Jevon Wright <je...@je...>
> *À :* Usage problems for JWebUnit <jwe...@li...>
> *Envoyé le :* Mer 24 novembre 2010, 1h 43min 57s
> *Objet :* Re: [JWebUnit-users] Re : a question regarding
> assertTitleNotSame
>
> I suggest renaming assertTitleNotSame() to assertTitleNotEquals(), and
> deprecating the assertTitleNotSame() method (which calls
> assertTitleNotEquals()). There are no other xxxNotSame() methods in the API.
>
> Jevon
>
> On Wed, Nov 24, 2010 at 3:40 AM, Julien HENRY <he...@ya...> wrote:
>
>> Hi Tony,
>>
>> As I can't say it is a feature, I guess it's a bug
>>
>> Could you please submit a bug on Sourceforge?
>>
>> Thanks
>>
>> Julien
>>
>> ------------------------------
>> *De :* "Qian, Daqi" <dq...@ca...>
>> *À :* jwe...@li...
>> *Envoyé le :* Mar 23 novembre 2010, 14h 57min 07s
>> *Objet :* [JWebUnit-users] a question regarding assertTitleNotSame
>>
>>
>>
>> All,
>>
>>
>>
>> I have a question regarding assertTitleNotSame(String title).
>>
>>
>>
>> Accroding to javadoc, this method is to check if the page title is not
>> equal to the value of title passed in the method.
>>
>>
>>
>> /**
>>
>> * Assert title of current html page in conversation is not
>>
>> * equal to another value.
>>
>> *
>>
>> * *@param* title
>>
>> * unexpected title value
>>
>> */
>>
>>
>>
>> But this method calls Assert.assertNotSame(title,
>> getTestEngine().getPageTitle()); Assert.assertNotSame calls following method
>>
>>
>>
>> *static* *public* *void* assertNotSame(String message, Object expected,
>> Object actual) {
>>
>> *if* (expected == actual)
>>
>> *failSame*(message);
>>
>> }
>>
>>
>>
>> As you can see, we are comparing references (addresses in memory), not
>> string values. Therefore, assertTitleNotSame(String title) always
>> succeeds.
>>
>>
>>
>> Thanks,
>>
>> Tony
>>
>>
>>
>> *Confidentiality Notice*: This electronic message transmission, including
>> any attachment(s), may contain confidential, proprietary, or privileged
>> information from Chemical Abstracts Service (“CAS”), a division of the
>> American Chemical Society (“ACS”). If you have received this transmission in
>> error, be advised that any disclosure, copying, distribution, or use of the
>> contents of this information is strictly prohibited. Please destroy all
>> copies of the message and contact the sender immediately by either replying
>> to this message or calling 614-447-3600.
>>
>>
>> ------------------------------------------------------------------------------
>> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
>> Tap into the largest installed PC base & get more eyes on your game by
>> optimizing for Intel(R) Graphics Technology. Get started today with the
>> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
>> http://p.sf.net/sfu/intelisp-dev2dev
>> _______________________________________________
>> JWebUnit-users mailing list
>> JWe...@li...
>> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>>
>>
>
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> JWebUnit-development mailing list
> JWe...@li...
> https://lists.sourceforge.net/lists/listinfo/jwebunit-development
>
>
|
|
From: <he...@us...> - 2010-11-24 16:13:15
|
Revision: 888
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=888&view=rev
Author: henryju
Date: 2010-11-24 16:13:09 +0000 (Wed, 24 Nov 2010)
Log Message:
-----------
[3116839] Deprecated assertTitleNotSame and replaced by a working assertTitleNotEquals. Thanks to Tony Qian for reporting the bug.
Modified Paths:
--------------
trunk/jwebunit-commons-tests/pom.xml
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/WebAssertionsTest.java
trunk/jwebunit-core/pom.xml
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/junit/WebTester.java
trunk/jwebunit-htmlunit-plugin/pom.xml
trunk/jwebunit-selenium-plugin/pom.xml
trunk/pom.xml
trunk/src/changes/changes.xml
Modified: trunk/jwebunit-commons-tests/pom.xml
===================================================================
--- trunk/jwebunit-commons-tests/pom.xml 2010-11-10 11:15:41 UTC (rev 887)
+++ trunk/jwebunit-commons-tests/pom.xml 2010-11-24 16:13:09 UTC (rev 888)
@@ -12,7 +12,7 @@
<dependencies>
<dependency>
<groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <artifactId>junit-dep</artifactId>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
Modified: trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/WebAssertionsTest.java
===================================================================
--- trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/WebAssertionsTest.java 2010-11-10 11:15:41 UTC (rev 887)
+++ trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/WebAssertionsTest.java 2010-11-24 16:13:09 UTC (rev 888)
@@ -53,46 +53,50 @@
beginAt("/testPage.html");
}
- @Test public void testAssertTitleEquals() throws Throwable {
+ @Test
+ public void testAssertTitleEquals() throws Throwable {
assertPass("assertTitleEquals", new String[] { "testPage" });
assertFail("assertTitleEquals", "wrong title");
}
- @Test public void testAssertTitleMatch() throws Throwable {
+ @Test
+ public void testAssertTitleMatch() throws Throwable {
assertPass("assertTitleMatch", new String[] { "test[Pp]age" });
assertFail("assertTitleMatch", "[Ww]rong title");
}
- @Test public void testAssertTextPresent() throws Throwable {
- assertPassFail("assertTextPresent", "This is a test.",
- "no such text");
- }
- @Test public void testAssertMatch() throws Throwable {
+ @Test
+ public void testAssertTitleNotEquals() throws Throwable {
+ assertPass("assertTitleNotEquals", new String[] { "wrong title" });
+ assertFail("assertTitleNotEquals", "testPage");
+ }
+
+ @Test
+ public void testAssertTextPresent() throws Throwable {
+ assertPassFail("assertTextPresent", "This is a test.", "no such text");
+ }
+
+ @Test
+ public void testAssertMatch() throws Throwable {
assertPassFail("assertMatch", "This (is)* a .* test.", "no.*text");
}
- @Test public void testAssertTextNotPresent() throws Throwable {
- assertTextNotPresent("no such text");
- //assertPassFail("assertTextNotPresent", "no such text",
- // "This is a test page.");
- }
+ @Test
+ public void testAssertTextNotPresent() throws Throwable {
+ assertPassFail("assertTextNotPresent", "no such text", "This is a test.");
+ }
@Test public void testAssertNoMatch() throws Throwable {
- assertNoMatch("no.*text");
- //assertPassFail("assertNoMatch", "no.*text", "This (is)* a .* page.");
+ assertPassFail("assertNoMatch", "no.*text", "This (is)* a .* test.");
}
/**
* Check that {@link #assertNoMatch(String)} can actually fail.
*/
- @Test public void testAssertNoMatchFails() throws Throwable {
- try {
- // 'Span Text' definitely exists in the source page text
- assertNoMatch("Span Text");
- fail("assertNoMatch() did not throw expected failure"); // should not get this far
- } catch (AssertionError e) {
- // expected
- }
+ @Test(expected=AssertionError.class)
+ public void testAssertNoMatchFails() throws Throwable {
+ // 'Span Text' definitely exists in the source page text
+ assertNoMatch("Span Text");
}
@Test public void testAssertLinkPresentWithText() throws Throwable {
Modified: trunk/jwebunit-core/pom.xml
===================================================================
--- trunk/jwebunit-core/pom.xml 2010-11-10 11:15:41 UTC (rev 887)
+++ trunk/jwebunit-core/pom.xml 2010-11-24 16:13:09 UTC (rev 888)
@@ -14,13 +14,13 @@
<dependencies>
<dependency>
<groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <artifactId>junit-dep</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.7</version>
- <scope>test</scope>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>regexp</groupId>
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 2010-11-10 11:15:41 UTC (rev 887)
+++ trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/junit/WebTester.java 2010-11-24 16:13:09 UTC (rev 888)
@@ -58,6 +58,7 @@
import org.apache.regexp.RE;
import org.apache.regexp.RESyntaxException;
+import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
/**
@@ -420,12 +421,25 @@
*
* @param title
* unexpected title value
+ * @deprecated Replaced by {@link #assertTitleNotEquals(String)}
*/
+ @Deprecated
public void assertTitleNotSame(String title) {
- assertNotSame(title, getTestingEngine().getPageTitle());
+ assertTitleNotEquals(title);
}
/**
+ * Assert title of current html page in conversation is not
+ * equal to another value.
+ *
+ * @param title
+ * unexpected title value
+ */
+ public void assertTitleNotEquals(String title) {
+ assertThat(title, not(equalTo(getTestingEngine().getPageTitle())));
+ }
+
+ /**
* Assert title of current html page in conversation matches an expected regexp.
*
* @param regexp expected title regexp
@@ -2861,7 +2875,7 @@
assertNotNull("no label for id [" + id + "] found", label);
List<IElement> fields = getFieldsForLabel(label);
- assertNotSame("there should be at least one element referenced for label [" + id + "]", 0, fields.size());
+ assertFalse("there should be at least one element referenced for label [" + id + "]", fields.size()==0);
// find the first element that we can change
for (IElement field : fields) {
Modified: trunk/jwebunit-htmlunit-plugin/pom.xml
===================================================================
--- trunk/jwebunit-htmlunit-plugin/pom.xml 2010-11-10 11:15:41 UTC (rev 887)
+++ trunk/jwebunit-htmlunit-plugin/pom.xml 2010-11-24 16:13:09 UTC (rev 888)
@@ -12,7 +12,7 @@
<dependencies>
<dependency>
<groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <artifactId>junit-dep</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Modified: trunk/jwebunit-selenium-plugin/pom.xml
===================================================================
--- trunk/jwebunit-selenium-plugin/pom.xml 2010-11-10 11:15:41 UTC (rev 887)
+++ trunk/jwebunit-selenium-plugin/pom.xml 2010-11-24 16:13:09 UTC (rev 888)
@@ -49,7 +49,7 @@
<dependencies>
<dependency>
<groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <artifactId>junit-dep</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-11-10 11:15:41 UTC (rev 887)
+++ trunk/pom.xml 2010-11-24 16:13:09 UTC (rev 888)
@@ -357,7 +357,7 @@
<dependencies>
<dependency>
<groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <artifactId>junit-dep</artifactId>
<version>4.8.2</version>
</dependency>
<dependency>
Modified: trunk/src/changes/changes.xml
===================================================================
--- trunk/src/changes/changes.xml 2010-11-10 11:15:41 UTC (rev 887)
+++ trunk/src/changes/changes.xml 2010-11-24 16:13:09 UTC (rev 888)
@@ -32,6 +32,9 @@
</properties>
<body>
<release version="3.0" date="UNKNOW" description="Updated all internals to JUnit 4">
+ <action type="fix" dev="henryju" issue="3116839" due-to="Tony Qian">
+ assertTitleNotSame works incorrectly. Deprecated and replaced by a working assertTitleNotEquals.
+ </action>
<action type="update" dev="henryju" issue="2837745">
Updated to JUnit 4. See migration section of the documentation.
</action>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Julien H. <he...@ya...> - 2010-11-24 08:09:23
|
(Moved to dev ML)
+1
This is not consistent.
There is another call to Assert.assertNotSame in
setLabeledFormElementFieldmethod that could be replaced by assertNotEquals.
I'll do it and add a test case.
Regards
Julien
________________________________
De : Jevon Wright <je...@je...>
À : Usage problems for JWebUnit <jwe...@li...>
Envoyé le : Mer 24 novembre 2010, 1h 43min 57s
Objet : Re: [JWebUnit-users] Re : a question regarding assertTitleNotSame
I suggest renaming assertTitleNotSame() to assertTitleNotEquals(), and
deprecating the assertTitleNotSame() method (which calls
assertTitleNotEquals()). There are no other xxxNotSame() methods in the API.
Jevon
On Wed, Nov 24, 2010 at 3:40 AM, Julien HENRY <he...@ya...> wrote:
Hi Tony,
>
>As I can't say it is a feature, I guess it's a bug
>
>Could you please submit a bug on Sourceforge?
>
>Thanks
>
>Julien
>
>
>
>
________________________________
De : "Qian, Daqi" <dq...@ca...>
>À : jwe...@li...
>Envoyé le : Mar 23 novembre 2010, 14h 57min 07s
>Objet : [JWebUnit-users] a question regarding assertTitleNotSame
>
>
>
>
>All,
>
>I have a question regarding assertTitleNotSame(String title).
>
>Accroding to javadoc, this method is to check if the page title is not equal to
>the value of title passed in the method.
>
> /**
> * Assert title of current html page in conversation is not
> * equal to another value.
> *
> * @paramtitle
> * unexpected title value
> */
>
>But this method calls Assert.assertNotSame(title,
>getTestEngine().getPageTitle()); Assert.assertNotSame calls following method
>
>staticpublicvoidassertNotSame(String message, Object expected, Object actual) {
> if(expected == actual)
> failSame(message);
> }
>
>As you can see, we are comparing references (addresses in memory), not string
>values. Therefore, assertTitleNotSame(String title) always succeeds.
>
>Thanks,
>Tony
>
>Confidentiality Notice: This electronic message transmission, including any
>attachment(s), may contain confidential, proprietary, or privileged information
>from Chemical Abstracts Service (“CAS”), a division of the American Chemical
>Society (“ACS”). If you have received this transmission in error, be advised
>that any disclosure, copying, distribution, or use of the contents of this
>information is strictly prohibited. Please destroy all copies of the message and
>contact the sender immediately by either replying to this message or calling
>614-447-3600.
>------------------------------------------------------------------------------
>Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
>Tap into the largest installed PC base & get more eyes on your game by
>optimizing for Intel(R) Graphics Technology. Get started today with the
>Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
>http://p.sf.net/sfu/intelisp-dev2dev
>_______________________________________________
>JWebUnit-users mailing list
>JWe...@li...
>https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>
>
|
|
From: SourceForge.net <no...@so...> - 2010-11-23 18:54:48
|
Bugs item #3116839, was opened at 2010-11-23 13:52 Message generated for change (Settings changed) made by tonyqian You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497982&aid=3116839&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: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Tony Qian (tonyqian) >Assigned to: Julien HENRY (henryju) Summary: assertTitleNotSame works incorrectly Initial Comment: Accroding to javadoc, this method is to check if the page title is not equal to the value of title passed in the method. /** * Assert title of current html page in conversation is not * equal to another value. * * @param title * unexpected title value */ But this method calls Assert.assertNotSame(title, getTestEngine().getPageTitle()); Assert.assertNotSame calls following method static public void assertNotSame(String message, Object expected, Object actual) { if (expected == actual) failSame(message); } As you can see, we are comparing references (addresses in memory), not string values. Therefore, assertTitleNotSame(String title) always succeeds. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497982&aid=3116839&group_id=61302 |
|
From: SourceForge.net <no...@so...> - 2010-11-23 18:52:58
|
Bugs item #3116839, was opened at 2010-11-23 13:52 Message generated for change (Tracker Item Submitted) made by tonyqian You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497982&aid=3116839&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: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Tony Qian (tonyqian) Assigned to: Nobody/Anonymous (nobody) Summary: assertTitleNotSame works incorrectly Initial Comment: Accroding to javadoc, this method is to check if the page title is not equal to the value of title passed in the method. /** * Assert title of current html page in conversation is not * equal to another value. * * @param title * unexpected title value */ But this method calls Assert.assertNotSame(title, getTestEngine().getPageTitle()); Assert.assertNotSame calls following method static public void assertNotSame(String message, Object expected, Object actual) { if (expected == actual) failSame(message); } As you can see, we are comparing references (addresses in memory), not string values. Therefore, assertTitleNotSame(String title) always succeeds. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497982&aid=3116839&group_id=61302 |
|
From: SourceForge.net <no...@so...> - 2010-11-18 10:34:40
|
Support Requests item #3111426, was opened at 2010-11-18 11:34 Message generated for change (Tracker Item Submitted) made by fbenault You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497983&aid=3111426&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: None Group: None Status: Open Priority: 5 Private: No Submitted By: Franck Benault (fbenault) Assigned to: Nobody/Anonymous (nobody) Summary: JWebUnit 2.5 TestEngineREsponseException -1 httpStatusCode Initial Comment: I have in my project a small regression between JWebUnit 2.4 to 2.5 TestEngineResponseException does not contain the good httpStatusCode the method getHttpStatusCode returns -1 whereas the real http error is 403 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497983&aid=3111426&group_id=61302 |
|
From: <he...@us...> - 2010-11-10 11:15:48
|
Revision: 887
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=887&view=rev
Author: henryju
Date: 2010-11-10 11:15:41 +0000 (Wed, 10 Nov 2010)
Log Message:
-----------
Fixed some code style to please Sonar
Modified Paths:
--------------
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitTestingEngineImpl.java
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 2010-10-27 08:41:56 UTC (rev 886)
+++ trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitTestingEngineImpl.java 2010-11-10 11:15:41 UTC (rev 887)
@@ -154,22 +154,22 @@
/**
* Javascript alerts.
*/
- private LinkedList<JavascriptAlert> expectedJavascriptAlerts = new LinkedList<JavascriptAlert>();
+ private List<JavascriptAlert> expectedJavascriptAlerts = new LinkedList<JavascriptAlert>();
/**
* Javascript confirms.
*/
- private LinkedList<JavascriptConfirm> expectedJavascriptConfirms = new LinkedList<JavascriptConfirm>();
+ private List<JavascriptConfirm> expectedJavascriptConfirms = new LinkedList<JavascriptConfirm>();
/**
* Javascript prompts.
*/
- private LinkedList<JavascriptPrompt> expectedJavascriptPrompts = new LinkedList<JavascriptPrompt>();
+ private List<JavascriptPrompt> expectedJavascriptPrompts = new LinkedList<JavascriptPrompt>();
/**
* The default browser version.
*/
- BrowserVersion defaultBrowserVersion = BrowserVersion.FIREFOX_3;
+ private BrowserVersion defaultBrowserVersion = BrowserVersion.FIREFOX_3;
/**
* Should we ignore failing status codes?
@@ -603,23 +603,24 @@
*/
public String[] getSelectOptionValues(String selectName, int index) {
List<HtmlSelect> sels = getForm().getSelectsByName(selectName);
- if ( sels == null || sels.size() < index+1)
- throw new RuntimeException("Did not find select with name [" + selectName
+ if ( sels == null || sels.size() < index+1) {
+ throw new RuntimeException("Did not find select with name [" + selectName
+ "] at index " + index);
-
+ }
HtmlSelect sel = sels.get(index);
ArrayList<String> result = new ArrayList<String>();
for (HtmlOption opt : sel.getOptions()) {
result.add(opt.getValueAttribute());
}
- return (String[]) result.toArray(new String[0]);
+ return (String[]) result.toArray(new String[result.size()]);
}
private String[] getSelectedOptions(HtmlSelect sel) {
String[] result = new String[sel.getSelectedOptions().size()];
int i = 0;
- for (HtmlOption opt : sel.getSelectedOptions())
+ for (HtmlOption opt : sel.getSelectedOptions()) {
result[i++] = opt.getValueAttribute();
+ }
return result;
}
@@ -631,9 +632,10 @@
public String[] getSelectedOptions(String selectName, int index) {
List<HtmlSelect> sels = getForm().getSelectsByName(selectName);
- if ( sels == null || sels.size() < index+1)
- throw new RuntimeException("Did not find select with name [" + selectName
+ if ( sels == null || sels.size() < index+1) {
+ throw new RuntimeException("Did not find select with name [" + selectName
+ "] at index " + index);
+ }
HtmlSelect sel = sels.get(index);
return getSelectedOptions(sel);
}
@@ -641,8 +643,9 @@
private String getSelectOptionValueForLabel(HtmlSelect sel, String label) {
for (HtmlOption opt : sel.getOptions()) {
- if (opt.asText().equals(label))
+ if (opt.asText().equals(label)) {
return opt.getValueAttribute();
+ }
}
throw new RuntimeException("Unable to find option " + label + " for "
+ sel.getNameAttribute());
@@ -655,17 +658,19 @@
public String getSelectOptionValueForLabel(String selectName, int index, String label) {
List<HtmlSelect> sels = getForm().getSelectsByName(selectName);
- if ( sels == null || sels.size() < index+1)
- throw new RuntimeException("Did not find select with name [" + selectName
+ if ( sels == null || sels.size() < index+1) {
+ throw new RuntimeException("Did not find select with name [" + selectName
+ "] at index " + index);
+ }
HtmlSelect sel = (HtmlSelect)sels.get(index);
return getSelectOptionValueForLabel(sel, label);
}
private String getSelectOptionLabelForValue(HtmlSelect sel, String value) {
for (HtmlOption opt : sel.getOptions()) {
- if (opt.getValueAttribute().equals(value))
+ if (opt.getValueAttribute().equals(value)) {
return opt.asText();
+ }
}
throw new RuntimeException("Unable to find option " + value + " for "
+ sel.getNameAttribute());
@@ -678,10 +683,10 @@
public String getSelectOptionLabelForValue(String selectName, int index, String value) {
List<HtmlSelect> sels = getForm().getSelectsByName(selectName);
- if ( sels == null || sels.size() < index+1)
- throw new RuntimeException("Did not find select with name [" + selectName
+ if ( sels == null || sels.size() < index+1) {
+ throw new RuntimeException("Did not find select with name [" + selectName
+ "] at index " + index);
-
+ }
HtmlSelect sel = (HtmlSelect)sels.get(index);
return getSelectOptionLabelForValue(sel, value);
}
@@ -703,17 +708,22 @@
public String getPageText() {
Page page = win.getEnclosedPage();
- if (page instanceof HtmlPage)
+ if (page instanceof HtmlPage) {
return ((HtmlPage) page).asText();
- if (page instanceof TextPage)
+ }
+ if (page instanceof TextPage) {
return ((TextPage) page).getContent();
- if (page instanceof JavaScriptPage)
+ }
+ if (page instanceof JavaScriptPage) {
return ((JavaScriptPage) page).getContent();
- if (page instanceof XmlPage)
+ }
+ if (page instanceof XmlPage) {
return ((XmlPage) page).getContent();
- if (page instanceof UnexpectedPage)
+ }
+ if (page instanceof UnexpectedPage) {
return ((UnexpectedPage) page).getWebResponse()
.getContentAsString();
+ }
throw new RuntimeException(
"Unexpected error in getPageText(). This method need to be updated.");
}
@@ -855,18 +865,20 @@
Page oldPage = event.getOldPage();
Page newPage = event.getNewPage();
String oldPageTitle = "no_html";
- if (oldPage instanceof HtmlPage)
+ if (oldPage instanceof HtmlPage) {
oldPageTitle = ((HtmlPage) oldPage).getTitleText();
+ }
String newPageTitle = "no_html";
- if (newPage instanceof HtmlPage)
+ if (newPage instanceof HtmlPage) {
newPageTitle = ((HtmlPage) newPage).getTitleText();
+ }
logger.debug("Window \"{}\" changed : \"{}\" became \"{}", new Object[] {winName, oldPageTitle, newPageTitle});
}
public void webWindowOpened(WebWindowEvent event) {
String win = event.getWebWindow().getName();
Page newPage = event.getNewPage();
- if (newPage != null && newPage instanceof HtmlPage) {
+ if (newPage instanceof HtmlPage) {
logger.debug("Window {} opened : {}", win, ((HtmlPage) newPage).getTitleText());
} else {
logger.info("Window {} opened", win);
@@ -880,7 +892,7 @@
throw new UnexpectedJavascriptAlertException(msg);
} else {
JavascriptAlert expected = (JavascriptAlert) expectedJavascriptAlerts
- .removeFirst();
+ .remove(0);
if (!msg.equals(expected.getMessage())) {
throw new UnexpectedJavascriptAlertException(msg);
}
@@ -894,7 +906,7 @@
throw new UnexpectedJavascriptConfirmException(msg);
} else {
JavascriptConfirm expected = (JavascriptConfirm) expectedJavascriptConfirms
- .removeFirst();
+ .remove(0);
if (!msg.equals(expected.getMessage())) {
throw new UnexpectedJavascriptConfirmException(msg);
} else {
@@ -910,7 +922,7 @@
throw new UnexpectedJavascriptPromptException(msg);
} else {
JavascriptPrompt expected = (JavascriptPrompt) expectedJavascriptPrompts
- .removeFirst();
+ .remove(0);
if (!msg.equals(expected.getMessage())) {
throw new UnexpectedJavascriptPromptException(msg);
} else {
@@ -1104,14 +1116,16 @@
private HtmlPage getCurrentPage() {
Page page = win.getEnclosedPage();
- if (page instanceof HtmlPage)
+ if (page instanceof HtmlPage) {
return (HtmlPage) page;
+ }
throw new RuntimeException("Non HTML content");
}
private void setWorkingForm(HtmlForm newForm) {
- if (newForm == null)
+ if (newForm == null) {
throw new UnableToSetFormException("Attempted to set form to null.");
+ }
form = newForm;
}
@@ -1137,13 +1151,14 @@
* @param value value to search for
* @return the element found, or null
*/
- private HtmlElement getHtmlElementWithAttribute(String attributeName, String value) {
- for (HtmlElement e : getCurrentPage().getAllHtmlChildElements()) {
- if (e.getAttribute(attributeName).equals(value))
- return e;
- }
- return null;
- }
+ private HtmlElement getHtmlElementWithAttribute(String attributeName, String value) {
+ for (HtmlElement e : getCurrentPage().getAllHtmlChildElements()) {
+ if (e.getAttribute(attributeName).equals(value)) {
+ return e;
+ }
+ }
+ return null;
+ }
/**
* Return true if a form parameter (input element) is present on the current response.
@@ -1328,8 +1343,9 @@
btn = getCurrentPage().getHtmlElementById(buttonId);
if (btn instanceof HtmlButton || btn instanceof HtmlButtonInput
|| btn instanceof HtmlSubmitInput
- || btn instanceof HtmlResetInput)
+ || btn instanceof HtmlResetInput) {
return btn;
+ }
} catch (ElementNotFoundException e) {
return null;
}
@@ -1365,17 +1381,17 @@
.getHtmlElementsByTagNames(
Arrays.asList(new String[] { "button", "input" }));
for (HtmlElement e : l) {
- if ( e instanceof HtmlButton )
- {
- if (((HtmlButton) e).asText().equals(buttonValueText))
- return e;
+ if ( e instanceof HtmlButton ) {
+ if (((HtmlButton) e).asText().equals(buttonValueText)) {
+ return e;
+ }
}
else if ( e instanceof HtmlButtonInput ||
e instanceof HtmlSubmitInput ||
- e instanceof HtmlResetInput )
- {
- if ( buttonValueText.equals(e.getAttribute("value")) )
- return e;
+ e instanceof HtmlResetInput ) {
+ if ( buttonValueText.equals(e.getAttribute("value")) ) {
+ return e;
+ }
}
}
return null;
@@ -1422,8 +1438,9 @@
HtmlTableCell cell = table.getCellAt(row, col);
if (cell != null) {
String cellHtml = cell.asText();
- if (cellHtml.indexOf(text) != -1)
+ if (cellHtml.indexOf(text) != -1) {
return true;
+ }
}
}
}
@@ -1502,10 +1519,10 @@
} catch (FailingHttpStatusCodeException e) {
// entirely possible that it can fail here
- if (!ignoreFailingStatusCodes)
+ if (!ignoreFailingStatusCodes) {
throw new TestingEngineResponseException(
e.getStatusCode(), e);
-
+ }
return;
} catch (IOException e) {
throw new RuntimeException(
@@ -1599,10 +1616,10 @@
}
} catch (FailingHttpStatusCodeException e) {
// entirely possible that it can fail here
- if (!ignoreFailingStatusCodes)
+ if (!ignoreFailingStatusCodes) {
throw new TestingEngineResponseException(
e.getStatusCode(), e);
-
+ }
return;
} catch (IOException e) {
throw new RuntimeException(
@@ -1658,9 +1675,10 @@
public void clickLinkWithText(String linkText, int index) {
HtmlAnchor link = getLinkWithText(linkText, index);
- if (link == null)
+ if (link == null) {
throw new RuntimeException("No Link found for \"" + linkText
+ "\" with index " + index);
+ }
try {
link.click();
} catch (IOException e) {
@@ -1670,9 +1688,10 @@
public void clickLinkWithExactText(String linkText, int index) {
HtmlAnchor link = getLinkWithExactText(linkText, index);
- if (link == null)
+ if (link == null) {
throw new RuntimeException("No Link found for \"" + linkText
+ "\" with index " + index);
+ }
try {
link.click();
} catch (IOException e) {
@@ -1683,8 +1702,9 @@
private HtmlCheckBoxInput getCheckbox(String checkBoxName) {
Object[] l = getForm().getInputsByName(checkBoxName).toArray();
for (int i = 0; i < l.length; i++) {
- if (l[i] instanceof HtmlCheckBoxInput)
+ if (l[i] instanceof HtmlCheckBoxInput) {
return (HtmlCheckBoxInput) l[i];
+ }
}
throw new RuntimeException("No checkbox with name [" + checkBoxName
+ "] was found in current form.");
@@ -1693,10 +1713,11 @@
private HtmlCheckBoxInput getCheckbox(String checkBoxName, String value) {
Object[] l = getForm().getInputsByName(checkBoxName).toArray();
for (int i = 0; i < l.length; i++) {
- if (l[i] instanceof HtmlCheckBoxInput)
- if (((HtmlCheckBoxInput) l[i]).getValueAttribute()
- .equals(value))
- return (HtmlCheckBoxInput) l[i];
+ if ((l[i] instanceof HtmlCheckBoxInput) &&
+ ((HtmlCheckBoxInput) l[i]).getValueAttribute()
+ .equals(value)) {
+ return (HtmlCheckBoxInput) l[i];
+ }
}
throw new RuntimeException("No checkbox with name [" + checkBoxName
+ "] and value [" + value + "] was found in current form.");
@@ -1709,23 +1730,25 @@
*/
public void checkCheckbox(String checkBoxName) {
HtmlCheckBoxInput cb = getCheckbox(checkBoxName);
- if (!cb.isChecked())
+ if (!cb.isChecked()) {
try {
cb.click();
} catch (IOException e) {
throw new RuntimeException("checkCheckbox failed", e);
}
+ }
}
public void checkCheckbox(String checkBoxName, String value) {
HtmlCheckBoxInput cb = getCheckbox(checkBoxName, value);
- if (!cb.isChecked())
+ if (!cb.isChecked()) {
try {
cb.click();
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException("checkCheckbox failed", e);
}
+ }
}
/**
@@ -1735,24 +1758,26 @@
*/
public void uncheckCheckbox(String checkBoxName) {
HtmlCheckBoxInput cb = getCheckbox(checkBoxName);
- if (cb.isChecked())
+ if (cb.isChecked()) {
try {
cb.click();
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException("checkCheckbox failed", e);
}
+ }
}
public void uncheckCheckbox(String checkBoxName, String value) {
HtmlCheckBoxInput cb = getCheckbox(checkBoxName, value);
- if (cb.isChecked())
+ if (cb.isChecked()) {
try {
cb.click();
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException("uncheckCheckbox failed", e);
}
+ }
}
private HtmlRadioButtonInput getRadioOption(String radioGroup, String radioOption) {
@@ -1775,13 +1800,14 @@
*/
public void clickRadioOption(String radioGroup, String radioOption) {
HtmlRadioButtonInput rb = getRadioOption(radioGroup, radioOption);
- if (!rb.isChecked())
+ if (!rb.isChecked()) {
try {
rb.click();
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException("checkCheckbox failed", e);
}
+ }
}
/**
@@ -1803,8 +1829,9 @@
List<HtmlAnchor> lnks = ((HtmlPage) win.getEnclosedPage()).getAnchors();
int count = 0;
for (HtmlAnchor lnk : lnks) {
- if ((lnk.asText().indexOf(linkText) >= 0) && (count++ == index))
+ if ((lnk.asText().indexOf(linkText) >= 0) && (count++ == index)) {
return lnk;
+ }
}
return null;
}
@@ -1813,8 +1840,9 @@
List<HtmlAnchor> lnks = ((HtmlPage) win.getEnclosedPage()).getAnchors();
int count = 0;
for (HtmlAnchor lnk : lnks) {
- if ((lnk.asText().equals(linkText)) && (count++ == index))
+ if ((lnk.asText().equals(linkText)) && (count++ == index)) {
return lnk;
+ }
}
return null;
}
@@ -1829,9 +1857,10 @@
*/
public void clickLinkWithImage(String imageFileName, int index) {
HtmlAnchor link = getLinkWithImage(imageFileName, index);
- if (link == null)
+ if (link == null) {
throw new RuntimeException("No Link found with filename \""
+ imageFileName + "\" and index " + index);
+ }
try {
link.click();
} catch (IOException e) {
@@ -1849,9 +1878,10 @@
public void clickElementByXPath(String xpath) {
HtmlElement e = getHtmlElementByXPath(xpath);
- if (e == null)
+ if (e == null) {
throw new RuntimeException("No element found with xpath \"" + xpath
+ "\"");
+ }
try {
e.click();
} catch (IOException exp) {
@@ -1861,16 +1891,18 @@
public String getElementAttributByXPath(String xpath, String attribut) {
HtmlElement e = getHtmlElementByXPath(xpath);
- if (e == null)
+ if (e == null) {
return null;
+ }
return e.getAttribute(attribut);
}
public String getElementTextByXPath(String xpath) {
HtmlElement e = getHtmlElementByXPath(xpath);
- if (e == null)
+ if (e == null) {
return null;
+ }
return e.asText();
}
@@ -1897,17 +1929,17 @@
* content by converting it to text. or an HTML <button> tag.
*/
public void clickButtonWithText(String buttonValueText) {
- HtmlElement b = getButtonWithText(buttonValueText);
- if (b != null) {
- try {
- b.click();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
- else {
- throw new RuntimeException("No button found with text: " + buttonValueText);
- }
+ HtmlElement b = getButtonWithText(buttonValueText);
+ if (b != null) {
+ try {
+ b.click();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+ else {
+ throw new RuntimeException("No button found with text: " + buttonValueText);
+ }
}
/**
@@ -1923,9 +1955,9 @@
public String getSelectedRadio(String radioGroup) {
List<HtmlRadioButtonInput> radios = getForm().getRadioButtonsByName(radioGroup);
for (HtmlRadioButtonInput radio : radios) {
- if (radio.isChecked()) {
- return radio.getValueAttribute();
- }
+ if (radio.isChecked()) {
+ return radio.getValueAttribute();
+ }
}
throw new RuntimeException("Unexpected state: no radio button was selected in radio group ["+radioGroup+"]. Is it possible in a real browser?");
}
@@ -1940,8 +1972,9 @@
String[] opts = getSelectOptionValues(selectName);
for (int i = 0; i < opts.length; i++) {
String label = getSelectOptionLabelForValue(selectName, opts[i]);
- if (label.equals(optionLabel))
+ if (label.equals(optionLabel)) {
return true;
+ }
}
return false;
}
@@ -1955,8 +1988,9 @@
public boolean hasSelectOptionValue(String selectName, String optionValue) {
String[] opts = getSelectOptionValues(selectName);
for (int i = 0; i < opts.length; i++) {
- if (opts[i].equals(optionValue))
+ if (opts[i].equals(optionValue)) {
return true;
+ }
}
return false;
}
@@ -1980,9 +2014,10 @@
break;
}
}
- if (!found)
+ if (!found) {
throw new RuntimeException("Option " + option
+ " not found");
+ }
}
}
@@ -1998,8 +2033,9 @@
String[] opts = getSelectOptionValues(selectName, index);
for (int i = 0; i < opts.length; i++) {
String label = getSelectOptionLabelForValue(selectName, index, opts[i]);
- if (label.equals(optionLabel))
+ if (label.equals(optionLabel)) {
return true;
+ }
}
return false;
}
@@ -2015,8 +2051,9 @@
public boolean hasSelectOptionValue(String selectName, int index, String optionValue) {
String[] opts = getSelectOptionValues(selectName, index);
for (int i = 0; i < opts.length; i++) {
- if (opts[i].equals(optionValue))
+ if (opts[i].equals(optionValue)) {
return true;
+ }
}
return false;
}
@@ -2031,12 +2068,14 @@
*/
public void selectOptions(String selectName, int index, String[] options) {
List<HtmlSelect> sels = getForm().getSelectsByName(selectName);
- if ( sels == null || sels.size() < index+1 )
- throw new RuntimeException("Did not find select with name [" + selectName
- + "] at index " + index);
+ if ( sels == null || sels.size() < index+1 ) {
+ throw new RuntimeException("Did not find select with name [" + selectName
+ + "] at index " + index);
+ }
HtmlSelect sel = (HtmlSelect)sels.get(index);
- if (!sel.isMultipleSelectEnabled() && options.length > 1)
+ if (!sel.isMultipleSelectEnabled() && options.length > 1) {
throw new RuntimeException("Multiselect not enabled");
+ }
for (String option : options) {
boolean found = false;
for (HtmlOption opt : sel.getOptions()) {
@@ -2046,17 +2085,19 @@
break;
}
}
- if (!found)
+ if (!found) {
throw new RuntimeException("Option " + option
+ " not found");
+ }
}
}
public void unselectOptions(String selectName, String[] options) {
HtmlSelect sel = getForm().getSelectByName(selectName);
- if (!sel.isMultipleSelectEnabled() && options.length > 1)
+ if (!sel.isMultipleSelectEnabled() && options.length > 1) {
throw new RuntimeException("Multiselect not enabled");
+ }
for (String option : options) {
boolean found = false;
for (HtmlOption opt : sel.getOptions()) {
@@ -2066,19 +2107,22 @@
break;
}
}
- if (!found)
+ if (!found) {
throw new RuntimeException("Option " + option
+ " not found");
+ }
}
}
public void unselectOptions(String selectName, int index, String[] options) {
List<HtmlSelect> sels = getForm().getSelectsByName(selectName);
- if ( sels == null || sels.size() < index+1)
- throw new RuntimeException("Did not find select with name [" + selectName
- + "] at index " + index);
+ if ( sels == null || sels.size() < index+1) {
+ throw new RuntimeException("Did not find select with name [" + selectName
+ + "] at index " + index);
+ }
HtmlSelect sel = sels.get(index);
- if (!sel.isMultipleSelectEnabled() && options.length > 1)
+ if (!sel.isMultipleSelectEnabled() && options.length > 1) {
throw new RuntimeException("Multiselect not enabled");
+ }
for (String option : options) {
boolean found = false;
for (HtmlOption opt : sel.getOptions()) {
@@ -2088,9 +2132,10 @@
break;
}
}
- if (!found)
+ if (!found) {
throw new RuntimeException("Option " + option
+ " not found");
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2010-10-27 08:42:04
|
Revision: 886
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=886&view=rev
Author: henryju
Date: 2010-10-27 08:41:56 +0000 (Wed, 27 Oct 2010)
Log Message:
-----------
Updated Selenium deps version and test configuration.
Modified Paths:
--------------
trunk/jwebunit-htmlunit-plugin/pom.xml
trunk/jwebunit-selenium-plugin/pom.xml
trunk/pom.xml
Modified: trunk/jwebunit-htmlunit-plugin/pom.xml
===================================================================
--- trunk/jwebunit-htmlunit-plugin/pom.xml 2010-10-24 11:50:58 UTC (rev 885)
+++ trunk/jwebunit-htmlunit-plugin/pom.xml 2010-10-27 08:41:56 UTC (rev 886)
@@ -9,24 +9,6 @@
<artifactId>jwebunit-htmlunit-plugin</artifactId>
<name>HtmlUnit Plugin</name>
<description>HtmlUnit plugin for JWebUnit.</description>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <includes>
- <include>**/*Test.java</include>
- <include>**/*Tests.java</include>
- </includes>
- <excludes>
- <exclude>**/*AbstractTest.java</exclude>
- <exclude>**/*AbstractTests.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
<dependencies>
<dependency>
<groupId>junit</groupId>
Modified: trunk/jwebunit-selenium-plugin/pom.xml
===================================================================
--- trunk/jwebunit-selenium-plugin/pom.xml 2010-10-24 11:50:58 UTC (rev 885)
+++ trunk/jwebunit-selenium-plugin/pom.xml 2010-10-27 08:41:56 UTC (rev 886)
@@ -17,20 +17,12 @@
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<skip>true</skip>
- <includes>
- <include>**/*Test.java</include>
- <include>**/*Tests.java</include>
- </includes>
- <excludes>
- <exclude>**/*AbstractTest.java</exclude>
- <exclude>**/*AbstractTests.java</exclude>
- </excludes>
</configuration>
</plugin>
- <!-- Requires java 1.5 -->
- <!--plugin>
+ <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
+ <version>1.1</version>
<executions>
<execution>
<id>start</id>
@@ -43,15 +35,15 @@
<multiWindow>true</multiWindow>
</configuration>
</execution>
+ <execution>
+ <id>stop</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>stop-server</goal>
+ </goals>
+ </execution>
</executions>
- <dependencies>
- <dependency>
- <groupId>org.openqa.selenium.server</groupId>
- <artifactId>selenium-server</artifactId>
- <version>1.0-beta-1</version>
- </dependency>
- </dependencies>
- </plugin-->
+ </plugin>
</plugins>
</build>
<dependencies>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-10-24 11:50:58 UTC (rev 885)
+++ trunk/pom.xml 2010-10-27 08:41:56 UTC (rev 886)
@@ -383,7 +383,7 @@
<dependency>
<groupId>org.seleniumhq.selenium.client-drivers</groupId>
<artifactId>selenium-java-client-driver</artifactId>
- <version>1.0.1</version>
+ <version>1.0.2</version>
</dependency>
<dependency>
<groupId>regexp</groupId>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2010-10-24 11:51:05
|
Revision: 885
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=885&view=rev
Author: henryju
Date: 2010-10-24 11:50:58 +0000 (Sun, 24 Oct 2010)
Log Message:
-----------
Updated documentation to reflect new release process on sourceforge.
Modified Paths:
--------------
trunk/src/changes/changes.xml
trunk/src/site/xdoc/how-to-release.xml
Modified: trunk/src/changes/changes.xml
===================================================================
--- trunk/src/changes/changes.xml 2010-10-24 10:05:25 UTC (rev 884)
+++ trunk/src/changes/changes.xml 2010-10-24 11:50:58 UTC (rev 885)
@@ -36,7 +36,7 @@
Updated to JUnit 4. See migration section of the documentation.
</action>
</release>
- <release version="2.5" date="UNKNOW" description="Small fixes and dependency updates">
+ <release version="2.5" date="October 24, 2010" description="Small fixes and dependency updates">
<action type="fix" dev="henryju" issue="2970512" due-to="Todd Owen">
Fixed handling of absolute image path (when src attribute start with a /).
</action>
Modified: trunk/src/site/xdoc/how-to-release.xml
===================================================================
--- trunk/src/site/xdoc/how-to-release.xml 2010-10-24 10:05:25 UTC (rev 884)
+++ trunk/src/site/xdoc/how-to-release.xml 2010-10-24 11:50:58 UTC (rev 885)
@@ -26,7 +26,7 @@
<title>How-To Release JWebUnit</title>
</properties>
<body class="default">
- <section name="How-To Release JWebUnit with Maven 2">
+ <section name="How-To Release JWebUnit with Maven">
<p>
This todo list if a reminder for JWebUnit release manager.
</p>
@@ -85,7 +85,7 @@
</p>
<p>
Now the process is done by maven-release-plugin.
- <source>mvn release:perform</source>
+ <source>mvn release:perform -Darguments="-Dgpg.passphrase=XXXXXXXXXX"</source>
</p>
<p>
This will automatically checkout the tag from SVN in target/checkout folder then run <tt>mvn deploy site-deploy</tt>.
@@ -113,49 +113,26 @@
And finally create a zip of the whole target/checkout folder content with name <tt>jwebunit-XX-sources.zip</tt>
</p>
<p>
- Open your browser at <a href="https://frs.sourceforge.net/webupload">http://frs.sourceforge.net/webupload</a>.<br/>
+ Open your browser at <a href="https://sourceforge.net/projects/jwebunit/">JWebUnir admin page</a>.<br/>
Use your Sourceforge account to log in.<br/>
- Upload the two files:
- <ul>
- <li>jwebunit-XX-release.zip</li>
- <li>jwebunit-XX-sources.zip</li>
- </ul>
- Now open <a href="https://sourceforge.net/projects/jwebunit/">https://sourceforge.net/projects/jwebunit/</a> and in the menu
- select Admin -> File Releases.<br/>
- Click on the [Add Release] link in front of the JWebUnit package.<br/>
+ In the menu select Project Admin -> File Manager (beta).<br/>
+ Click on JWebUnit folder.<br/>
+ Click on the [Add Folder] button.<br/>
Type the name of the new release: JWebUnit-XX<br/>
- </p>
- <p>
- <em>Step1:</em>
- Paste URL: http://jwebunit.sourceforge.net/changes-report.html in Change Log textarea.<br/>
- Submit/Refresh
- </p>
- <p>
- <em>Step2:</em>
- Select the two files:
+ Select the folder you just have created<br/>
+ Click on the [Add File] button.<br/>
+ Browse and select for upload:
<ul>
<li>jwebunit-XX-release.zip</li>
<li>jwebunit-XX-sources.zip</li>
+ <li>README.txt</li>
</ul>
- Add files/Refresh view
+ Click on the [Upload] button.<br/>
</p>
- <p>
- <em>Step3:</em>
- For each file:
- <ul>
- <li>Select Processor: Plateform Independant</li>
- <li>Select File Type: .zip</li>
- <li>Update/Refresh</li>
- </ul>
- </p>
- <p>
- <em>Step4:</em>
- Send email notification.
- </p>
</subsection>
<subsection name="Communication">
<p>
- Add a news on the website (Admin -> News). You can copy/paste and adapt the previous one.
+ Add a news on the website (Develop -> News). You can copy/paste and adapt the previous one.
</p>
<p>
Post an email on the user mailing list.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2010-10-24 10:05:31
|
Revision: 884
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=884&view=rev
Author: henryju
Date: 2010-10-24 10:05:25 +0000 (Sun, 24 Oct 2010)
Log Message:
-----------
[maven-release-plugin] prepare for next development iteration
Modified Paths:
--------------
branches/2.x/jwebunit-commons-tests/pom.xml
branches/2.x/jwebunit-core/pom.xml
branches/2.x/jwebunit-htmlunit-plugin/pom.xml
branches/2.x/jwebunit-selenium-plugin/pom.xml
branches/2.x/jwebunit-webtestcase-generator/pom.xml
branches/2.x/pom.xml
Modified: branches/2.x/jwebunit-commons-tests/pom.xml
===================================================================
--- branches/2.x/jwebunit-commons-tests/pom.xml 2010-10-24 10:05:12 UTC (rev 883)
+++ branches/2.x/jwebunit-commons-tests/pom.xml 2010-10-24 10:05:25 UTC (rev 884)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5</version>
+ <version>2.6-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-core/pom.xml
===================================================================
--- branches/2.x/jwebunit-core/pom.xml 2010-10-24 10:05:12 UTC (rev 883)
+++ branches/2.x/jwebunit-core/pom.xml 2010-10-24 10:05:25 UTC (rev 884)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5</version>
+ <version>2.6-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-htmlunit-plugin/pom.xml
===================================================================
--- branches/2.x/jwebunit-htmlunit-plugin/pom.xml 2010-10-24 10:05:12 UTC (rev 883)
+++ branches/2.x/jwebunit-htmlunit-plugin/pom.xml 2010-10-24 10:05:25 UTC (rev 884)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5</version>
+ <version>2.6-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-selenium-plugin/pom.xml
===================================================================
--- branches/2.x/jwebunit-selenium-plugin/pom.xml 2010-10-24 10:05:12 UTC (rev 883)
+++ branches/2.x/jwebunit-selenium-plugin/pom.xml 2010-10-24 10:05:25 UTC (rev 884)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5</version>
+ <version>2.6-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-webtestcase-generator/pom.xml
===================================================================
--- branches/2.x/jwebunit-webtestcase-generator/pom.xml 2010-10-24 10:05:12 UTC (rev 883)
+++ branches/2.x/jwebunit-webtestcase-generator/pom.xml 2010-10-24 10:05:25 UTC (rev 884)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5</version>
+ <version>2.6-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/pom.xml
===================================================================
--- branches/2.x/pom.xml 2010-10-24 10:05:12 UTC (rev 883)
+++ branches/2.x/pom.xml 2010-10-24 10:05:25 UTC (rev 884)
@@ -3,7 +3,7 @@
<groupId>net.sourceforge.jwebunit</groupId>
<artifactId>jwebunit</artifactId>
<name>JWebUnit</name>
- <version>2.5</version>
+ <version>2.6-SNAPSHOT</version>
<packaging>pom</packaging>
<description>
JWebUnit is a Java framework that facilitates creation of
@@ -180,9 +180,9 @@
</license>
</licenses>
<scm>
- <connection>scm:svn:http://jwebunit.svn.sourceforge.net/svnroot/jwebunit/tags/jwebunit-2.5</connection>
- <developerConnection>scm:svn:https://jwebunit.svn.sourceforge.net/svnroot/jwebunit/tags/jwebunit-2.5</developerConnection>
- <url>http://jwebunit.svn.sourceforge.net/viewvc/jwebunit/tags/jwebunit-2.5</url>
+ <connection>scm:svn:http://jwebunit.svn.sourceforge.net/svnroot/jwebunit/branches/2.x</connection>
+ <developerConnection>scm:svn:https://jwebunit.svn.sourceforge.net/svnroot/jwebunit/branches/2.x</developerConnection>
+ <url>http://jwebunit.svn.sourceforge.net/viewvc/jwebunit/trunk</url>
</scm>
<organization>
<name>SourceForge</name>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2010-10-24 10:05:18
|
Revision: 883
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=883&view=rev
Author: henryju
Date: 2010-10-24 10:05:12 +0000 (Sun, 24 Oct 2010)
Log Message:
-----------
[maven-release-plugin] copy for tag jwebunit-2.5
Added Paths:
-----------
tags/jwebunit-2.5/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2010-10-24 10:05:00
|
Revision: 882
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=882&view=rev
Author: henryju
Date: 2010-10-24 10:04:53 +0000 (Sun, 24 Oct 2010)
Log Message:
-----------
[maven-release-plugin] prepare release jwebunit-2.5
Modified Paths:
--------------
branches/2.x/jwebunit-commons-tests/pom.xml
branches/2.x/jwebunit-core/pom.xml
branches/2.x/jwebunit-htmlunit-plugin/pom.xml
branches/2.x/jwebunit-selenium-plugin/pom.xml
branches/2.x/jwebunit-webtestcase-generator/pom.xml
branches/2.x/pom.xml
Modified: branches/2.x/jwebunit-commons-tests/pom.xml
===================================================================
--- branches/2.x/jwebunit-commons-tests/pom.xml 2010-10-24 10:03:10 UTC (rev 881)
+++ branches/2.x/jwebunit-commons-tests/pom.xml 2010-10-24 10:04:53 UTC (rev 882)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-core/pom.xml
===================================================================
--- branches/2.x/jwebunit-core/pom.xml 2010-10-24 10:03:10 UTC (rev 881)
+++ branches/2.x/jwebunit-core/pom.xml 2010-10-24 10:04:53 UTC (rev 882)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-htmlunit-plugin/pom.xml
===================================================================
--- branches/2.x/jwebunit-htmlunit-plugin/pom.xml 2010-10-24 10:03:10 UTC (rev 881)
+++ branches/2.x/jwebunit-htmlunit-plugin/pom.xml 2010-10-24 10:04:53 UTC (rev 882)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-selenium-plugin/pom.xml
===================================================================
--- branches/2.x/jwebunit-selenium-plugin/pom.xml 2010-10-24 10:03:10 UTC (rev 881)
+++ branches/2.x/jwebunit-selenium-plugin/pom.xml 2010-10-24 10:04:53 UTC (rev 882)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-webtestcase-generator/pom.xml
===================================================================
--- branches/2.x/jwebunit-webtestcase-generator/pom.xml 2010-10-24 10:03:10 UTC (rev 881)
+++ branches/2.x/jwebunit-webtestcase-generator/pom.xml 2010-10-24 10:04:53 UTC (rev 882)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/pom.xml
===================================================================
--- branches/2.x/pom.xml 2010-10-24 10:03:10 UTC (rev 881)
+++ branches/2.x/pom.xml 2010-10-24 10:04:53 UTC (rev 882)
@@ -1,10 +1,9 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.jwebunit</groupId>
<artifactId>jwebunit</artifactId>
<name>JWebUnit</name>
- <version>2.5-SNAPSHOT</version>
+ <version>2.5</version>
<packaging>pom</packaging>
<description>
JWebUnit is a Java framework that facilitates creation of
@@ -181,9 +180,9 @@
</license>
</licenses>
<scm>
- <connection>scm:svn:http://jwebunit.svn.sourceforge.net/svnroot/jwebunit/branches/2.x</connection>
- <developerConnection>scm:svn:https://jwebunit.svn.sourceforge.net/svnroot/jwebunit/branches/2.x</developerConnection>
- <url>http://jwebunit.svn.sourceforge.net/viewvc/jwebunit/trunk</url>
+ <connection>scm:svn:http://jwebunit.svn.sourceforge.net/svnroot/jwebunit/tags/jwebunit-2.5</connection>
+ <developerConnection>scm:svn:https://jwebunit.svn.sourceforge.net/svnroot/jwebunit/tags/jwebunit-2.5</developerConnection>
+ <url>http://jwebunit.svn.sourceforge.net/viewvc/jwebunit/tags/jwebunit-2.5</url>
</scm>
<organization>
<name>SourceForge</name>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2010-10-24 10:03:17
|
Revision: 881
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=881&view=rev
Author: henryju
Date: 2010-10-24 10:03:10 +0000 (Sun, 24 Oct 2010)
Log Message:
-----------
Updated SVN path
Modified Paths:
--------------
branches/2.x/pom.xml
Modified: branches/2.x/pom.xml
===================================================================
--- branches/2.x/pom.xml 2010-10-24 10:01:21 UTC (rev 880)
+++ branches/2.x/pom.xml 2010-10-24 10:03:10 UTC (rev 881)
@@ -181,8 +181,8 @@
</license>
</licenses>
<scm>
- <connection>scm:svn:http://jwebunit.svn.sourceforge.net/svnroot/jwebunit/trunk</connection>
- <developerConnection>scm:svn:https://jwebunit.svn.sourceforge.net/svnroot/jwebunit/trunk</developerConnection>
+ <connection>scm:svn:http://jwebunit.svn.sourceforge.net/svnroot/jwebunit/branches/2.x</connection>
+ <developerConnection>scm:svn:https://jwebunit.svn.sourceforge.net/svnroot/jwebunit/branches/2.x</developerConnection>
<url>http://jwebunit.svn.sourceforge.net/viewvc/jwebunit/trunk</url>
</scm>
<organization>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2010-10-24 10:01:27
|
Revision: 880
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=880&view=rev
Author: henryju
Date: 2010-10-24 10:01:21 +0000 (Sun, 24 Oct 2010)
Log Message:
-----------
Cleanup
Removed Paths:
-------------
tags/jwebunit-2.4-test-release/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2010-10-24 10:00:36
|
Revision: 879
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=879&view=rev
Author: henryju
Date: 2010-10-24 10:00:30 +0000 (Sun, 24 Oct 2010)
Log Message:
-----------
Reverted release
Removed Paths:
-------------
tags/jwebunit-2.5/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2010-10-24 09:58:53
|
Revision: 878
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=878&view=rev
Author: henryju
Date: 2010-10-24 09:58:47 +0000 (Sun, 24 Oct 2010)
Log Message:
-----------
[maven-release-plugin] rollback the release of jwebunit-2.5
Modified Paths:
--------------
branches/2.x/jwebunit-commons-tests/pom.xml
branches/2.x/jwebunit-core/pom.xml
branches/2.x/jwebunit-htmlunit-plugin/pom.xml
branches/2.x/jwebunit-selenium-plugin/pom.xml
branches/2.x/jwebunit-webtestcase-generator/pom.xml
branches/2.x/pom.xml
Modified: branches/2.x/jwebunit-commons-tests/pom.xml
===================================================================
--- branches/2.x/jwebunit-commons-tests/pom.xml 2010-10-24 09:48:43 UTC (rev 877)
+++ branches/2.x/jwebunit-commons-tests/pom.xml 2010-10-24 09:58:47 UTC (rev 878)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.6-SNAPSHOT</version>
+ <version>2.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-core/pom.xml
===================================================================
--- branches/2.x/jwebunit-core/pom.xml 2010-10-24 09:48:43 UTC (rev 877)
+++ branches/2.x/jwebunit-core/pom.xml 2010-10-24 09:58:47 UTC (rev 878)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.6-SNAPSHOT</version>
+ <version>2.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-htmlunit-plugin/pom.xml
===================================================================
--- branches/2.x/jwebunit-htmlunit-plugin/pom.xml 2010-10-24 09:48:43 UTC (rev 877)
+++ branches/2.x/jwebunit-htmlunit-plugin/pom.xml 2010-10-24 09:58:47 UTC (rev 878)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.6-SNAPSHOT</version>
+ <version>2.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-selenium-plugin/pom.xml
===================================================================
--- branches/2.x/jwebunit-selenium-plugin/pom.xml 2010-10-24 09:48:43 UTC (rev 877)
+++ branches/2.x/jwebunit-selenium-plugin/pom.xml 2010-10-24 09:58:47 UTC (rev 878)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.6-SNAPSHOT</version>
+ <version>2.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-webtestcase-generator/pom.xml
===================================================================
--- branches/2.x/jwebunit-webtestcase-generator/pom.xml 2010-10-24 09:48:43 UTC (rev 877)
+++ branches/2.x/jwebunit-webtestcase-generator/pom.xml 2010-10-24 09:58:47 UTC (rev 878)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.6-SNAPSHOT</version>
+ <version>2.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/pom.xml
===================================================================
--- branches/2.x/pom.xml 2010-10-24 09:48:43 UTC (rev 877)
+++ branches/2.x/pom.xml 2010-10-24 09:58:47 UTC (rev 878)
@@ -1,9 +1,10 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.jwebunit</groupId>
<artifactId>jwebunit</artifactId>
<name>JWebUnit</name>
- <version>2.6-SNAPSHOT</version>
+ <version>2.5-SNAPSHOT</version>
<packaging>pom</packaging>
<description>
JWebUnit is a Java framework that facilitates creation of
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2010-10-24 09:49:09
|
Revision: 877
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=877&view=rev
Author: henryju
Date: 2010-10-24 09:48:43 +0000 (Sun, 24 Oct 2010)
Log Message:
-----------
[maven-release-plugin] prepare for next development iteration
Modified Paths:
--------------
branches/2.x/jwebunit-commons-tests/pom.xml
branches/2.x/jwebunit-core/pom.xml
branches/2.x/jwebunit-htmlunit-plugin/pom.xml
branches/2.x/jwebunit-selenium-plugin/pom.xml
branches/2.x/jwebunit-webtestcase-generator/pom.xml
branches/2.x/pom.xml
Modified: branches/2.x/jwebunit-commons-tests/pom.xml
===================================================================
--- branches/2.x/jwebunit-commons-tests/pom.xml 2010-10-24 09:48:29 UTC (rev 876)
+++ branches/2.x/jwebunit-commons-tests/pom.xml 2010-10-24 09:48:43 UTC (rev 877)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5</version>
+ <version>2.6-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-core/pom.xml
===================================================================
--- branches/2.x/jwebunit-core/pom.xml 2010-10-24 09:48:29 UTC (rev 876)
+++ branches/2.x/jwebunit-core/pom.xml 2010-10-24 09:48:43 UTC (rev 877)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5</version>
+ <version>2.6-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-htmlunit-plugin/pom.xml
===================================================================
--- branches/2.x/jwebunit-htmlunit-plugin/pom.xml 2010-10-24 09:48:29 UTC (rev 876)
+++ branches/2.x/jwebunit-htmlunit-plugin/pom.xml 2010-10-24 09:48:43 UTC (rev 877)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5</version>
+ <version>2.6-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-selenium-plugin/pom.xml
===================================================================
--- branches/2.x/jwebunit-selenium-plugin/pom.xml 2010-10-24 09:48:29 UTC (rev 876)
+++ branches/2.x/jwebunit-selenium-plugin/pom.xml 2010-10-24 09:48:43 UTC (rev 877)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5</version>
+ <version>2.6-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-webtestcase-generator/pom.xml
===================================================================
--- branches/2.x/jwebunit-webtestcase-generator/pom.xml 2010-10-24 09:48:29 UTC (rev 876)
+++ branches/2.x/jwebunit-webtestcase-generator/pom.xml 2010-10-24 09:48:43 UTC (rev 877)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5</version>
+ <version>2.6-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/pom.xml
===================================================================
--- branches/2.x/pom.xml 2010-10-24 09:48:29 UTC (rev 876)
+++ branches/2.x/pom.xml 2010-10-24 09:48:43 UTC (rev 877)
@@ -3,7 +3,7 @@
<groupId>net.sourceforge.jwebunit</groupId>
<artifactId>jwebunit</artifactId>
<name>JWebUnit</name>
- <version>2.5</version>
+ <version>2.6-SNAPSHOT</version>
<packaging>pom</packaging>
<description>
JWebUnit is a Java framework that facilitates creation of
@@ -180,9 +180,9 @@
</license>
</licenses>
<scm>
- <connection>scm:svn:http://jwebunit.svn.sourceforge.net/svnroot/jwebunit/tags/jwebunit-2.5</connection>
- <developerConnection>scm:svn:https://jwebunit.svn.sourceforge.net/svnroot/jwebunit/tags/jwebunit-2.5</developerConnection>
- <url>http://jwebunit.svn.sourceforge.net/viewvc/jwebunit/tags/jwebunit-2.5</url>
+ <connection>scm:svn:http://jwebunit.svn.sourceforge.net/svnroot/jwebunit/trunk</connection>
+ <developerConnection>scm:svn:https://jwebunit.svn.sourceforge.net/svnroot/jwebunit/trunk</developerConnection>
+ <url>http://jwebunit.svn.sourceforge.net/viewvc/jwebunit/trunk</url>
</scm>
<organization>
<name>SourceForge</name>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2010-10-24 09:48:35
|
Revision: 876
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=876&view=rev
Author: henryju
Date: 2010-10-24 09:48:29 +0000 (Sun, 24 Oct 2010)
Log Message:
-----------
[maven-release-plugin] copy for tag jwebunit-2.5
Added Paths:
-----------
tags/jwebunit-2.5/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2010-10-24 09:48:17
|
Revision: 875
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=875&view=rev
Author: henryju
Date: 2010-10-24 09:48:10 +0000 (Sun, 24 Oct 2010)
Log Message:
-----------
[maven-release-plugin] prepare release jwebunit-2.5
Modified Paths:
--------------
branches/2.x/jwebunit-commons-tests/pom.xml
branches/2.x/jwebunit-core/pom.xml
branches/2.x/jwebunit-htmlunit-plugin/pom.xml
branches/2.x/jwebunit-selenium-plugin/pom.xml
branches/2.x/jwebunit-webtestcase-generator/pom.xml
branches/2.x/pom.xml
Modified: branches/2.x/jwebunit-commons-tests/pom.xml
===================================================================
--- branches/2.x/jwebunit-commons-tests/pom.xml 2010-10-20 13:10:11 UTC (rev 874)
+++ branches/2.x/jwebunit-commons-tests/pom.xml 2010-10-24 09:48:10 UTC (rev 875)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-core/pom.xml
===================================================================
--- branches/2.x/jwebunit-core/pom.xml 2010-10-20 13:10:11 UTC (rev 874)
+++ branches/2.x/jwebunit-core/pom.xml 2010-10-24 09:48:10 UTC (rev 875)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-htmlunit-plugin/pom.xml
===================================================================
--- branches/2.x/jwebunit-htmlunit-plugin/pom.xml 2010-10-20 13:10:11 UTC (rev 874)
+++ branches/2.x/jwebunit-htmlunit-plugin/pom.xml 2010-10-24 09:48:10 UTC (rev 875)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-selenium-plugin/pom.xml
===================================================================
--- branches/2.x/jwebunit-selenium-plugin/pom.xml 2010-10-20 13:10:11 UTC (rev 874)
+++ branches/2.x/jwebunit-selenium-plugin/pom.xml 2010-10-24 09:48:10 UTC (rev 875)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/jwebunit-webtestcase-generator/pom.xml
===================================================================
--- branches/2.x/jwebunit-webtestcase-generator/pom.xml 2010-10-20 13:10:11 UTC (rev 874)
+++ branches/2.x/jwebunit-webtestcase-generator/pom.xml 2010-10-24 09:48:10 UTC (rev 875)
@@ -2,7 +2,7 @@
<parent>
<artifactId>jwebunit</artifactId>
<groupId>net.sourceforge.jwebunit</groupId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.5</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: branches/2.x/pom.xml
===================================================================
--- branches/2.x/pom.xml 2010-10-20 13:10:11 UTC (rev 874)
+++ branches/2.x/pom.xml 2010-10-24 09:48:10 UTC (rev 875)
@@ -1,10 +1,9 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.jwebunit</groupId>
<artifactId>jwebunit</artifactId>
<name>JWebUnit</name>
- <version>2.5-SNAPSHOT</version>
+ <version>2.5</version>
<packaging>pom</packaging>
<description>
JWebUnit is a Java framework that facilitates creation of
@@ -181,9 +180,9 @@
</license>
</licenses>
<scm>
- <connection>scm:svn:http://jwebunit.svn.sourceforge.net/svnroot/jwebunit/trunk</connection>
- <developerConnection>scm:svn:https://jwebunit.svn.sourceforge.net/svnroot/jwebunit/trunk</developerConnection>
- <url>http://jwebunit.svn.sourceforge.net/viewvc/jwebunit/trunk</url>
+ <connection>scm:svn:http://jwebunit.svn.sourceforge.net/svnroot/jwebunit/tags/jwebunit-2.5</connection>
+ <developerConnection>scm:svn:https://jwebunit.svn.sourceforge.net/svnroot/jwebunit/tags/jwebunit-2.5</developerConnection>
+ <url>http://jwebunit.svn.sourceforge.net/viewvc/jwebunit/tags/jwebunit-2.5</url>
</scm>
<organization>
<name>SourceForge</name>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Julien H. <he...@ya...> - 2010-10-20 14:06:30
|
Hi, I've deployed SNAPSHOTs of version 2.5 (I will do the release as soon as I manage to have a working GPG key) and version 3.0 (with all the JUnit 4 refactoring). Simply add this repository to your Maven config: http://oss.sonatype.org/content/repositories/snapshots Regards, Julien |
|
From: <he...@us...> - 2010-10-20 13:10:18
|
Revision: 874
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=874&view=rev
Author: henryju
Date: 2010-10-20 13:10:11 +0000 (Wed, 20 Oct 2010)
Log Message:
-----------
JUnit 4 migration part 6: updated documentation.
Modified Paths:
--------------
trunk/jwebunit-htmlunit-plugin/src/site/xdoc/index.xml
trunk/jwebunit-selenium-plugin/src/site/xdoc/index.xml
trunk/src/site/xdoc/articles.xml
trunk/src/site/xdoc/building-maven.xml
trunk/src/site/xdoc/how-to-contribute.xml
trunk/src/site/xdoc/index.xml
trunk/src/site/xdoc/installation.xml
trunk/src/site/xdoc/quickstart.xml
Modified: trunk/jwebunit-htmlunit-plugin/src/site/xdoc/index.xml
===================================================================
--- trunk/jwebunit-htmlunit-plugin/src/site/xdoc/index.xml 2010-10-20 12:19:47 UTC (rev 873)
+++ trunk/jwebunit-htmlunit-plugin/src/site/xdoc/index.xml 2010-10-20 13:10:11 UTC (rev 874)
@@ -53,10 +53,11 @@
import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
import com.gargoylesoftware.htmlunit.html.HtmlTextInput;
-import junit.framework.TestCase;
+import org.junit.Test;
-public class SearchExample extends TestCase {
+public class SearchExample {
+ @Test
public void testSearch() throws Exception {
final WebClient webClient = new WebClient();
final URL url = new URL("http://www.google.com");
@@ -76,17 +77,20 @@
</td>
<td valign="top" nowrap="nowrap">
<source>
-import net.sourceforge.jwebunit.util.TestingEngineRegistry;
-import net.sourceforge.jwebunit.junit.WebTestCase;
+import org.junit.Before;
+import org.junit.Test;
-public class SearchExample extends WebTestCase {
+import static net.sourceforge.jwebunit.junit.JWebUnit.*;
+
+public class SearchExample {
- public void setUp() {
- setTestingEngineKey(TestingEngineRegistry.TESTING_ENGINE_HTMLUNIT);
- getTestContext().setBaseUrl("http://www.google.com");
- }
+ @Before
+ public void prepare() {
+ setBaseUrl("http://www.google.com");
+ }
- public void testSearch() throws Exception {
+ @Test
+ public void testSearch() {
beginAt("/");
setTextField("q", "htmlunit");
submit("btnG");
@@ -111,7 +115,7 @@
<dependency>
<groupId>net.sourceforge.jwebunit</groupId>
<artifactId>jwebunit-htmlunit-plugin</artifactId>
- <version>2.0</version>
+ <version>3.0</version>
</dependency>
...
</dependencies>
Modified: trunk/jwebunit-selenium-plugin/src/site/xdoc/index.xml
===================================================================
--- trunk/jwebunit-selenium-plugin/src/site/xdoc/index.xml 2010-10-20 12:19:47 UTC (rev 873)
+++ trunk/jwebunit-selenium-plugin/src/site/xdoc/index.xml 2010-10-20 13:10:11 UTC (rev 874)
@@ -49,7 +49,7 @@
<dependency>
<groupId>net.sourceforge.jwebunit</groupId>
<artifactId>jwebunit-selenium-plugin</artifactId>
- <version>2.0</version>
+ <version>3.0</version>
</dependency>
...
</dependencies>
Modified: trunk/src/site/xdoc/articles.xml
===================================================================
--- trunk/src/site/xdoc/articles.xml 2010-10-20 12:19:47 UTC (rev 873)
+++ trunk/src/site/xdoc/articles.xml 2010-10-20 13:10:11 UTC (rev 874)
@@ -30,9 +30,11 @@
<p>
<ul>
- <li><a href="http://www.brodwall.com/johannes/blog/2006/12/10/in-process-web-integration-tests-with-jetty-and-jwebunit/">In-process Web Integration Tests with Jetty and JWebUnit</a></li>
+ <li><a href="http://johannesbrodwall.com/2006/12/10/in-process-web-integration-tests-with-jetty-and-jwebunit/">In-process Web Integration Tests with Jetty and JWebUnit</a></li>
<li><a href="http://portletwork.blogspot.com/2007/08/testing-portlets-with-jetty-pluto-and.html">Testing Portlets with Jetty, Pluto and JWebUnit</a></li>
<li><a href="http://blog.ippon.fr/2008/11/14/testez-vos-applications-graphiques-web">Testez vos applications graphiques web (FR)</a></li>
+ <li><a href="http://www.wakaleo.com/component/content/article/183">Web testing BDD-style with JWebUnit and Easyb</a></li>
+ <li><a href="http://cvalcarcel.wordpress.com/2009/12/13/and-now-by-popular-demand-jwebunit/">Eclipse development, Software Development, Testing > And Now By Popular Demand: jWebUnit</a></li>
</ul>
</p>
Modified: trunk/src/site/xdoc/building-maven.xml
===================================================================
--- trunk/src/site/xdoc/building-maven.xml 2010-10-20 12:19:47 UTC (rev 873)
+++ trunk/src/site/xdoc/building-maven.xml 2010-10-20 13:10:11 UTC (rev 874)
@@ -26,18 +26,12 @@
<title>Building JWebUnit</title>
</properties>
<body class="default">
- <section name="Building JWebUnit with Maven 2">
+ <section name="Building JWebUnit">
<p>
- Maven is, just like ant, a build tool. However, where
- you have to tell ant what it needs to do and how, you
- only have to tell Maven what you need, if you adhere to
- the Maven standards.
- </p>
- <p>
- In order to use Maven to build JWebUnit, you need to
- have Maven 2 installed. This should not be any more
+ In order to build JWebUnit, you need to
+ have Maven installed. This should not be any more
difficult than installing ant. We've included a best
- practise installation and configuration for Maven.
+ practice installation and configuration for Maven.
</p>
<subsection name="Installing Sun JDK 1.5">
<p>
@@ -46,35 +40,35 @@
<p>
You need to download and install latest Sun JDK 1.5 for your platform.
Let's say the JDK location is:
- <source>/opt/jdk1.5.0_15</source>
+ <source>/opt/jdk1.5.0_22</source>
</p>
</subsection>
<subsection name="Installing Maven">
<p>
- First you need to download the latest Maven 2, which
+ First you need to download the latest Maven, which
currently is
<a href="http://maven.apache.org">
- <tt>Maven-2.2.1</tt>
+ <tt>Maven-3.0</tt>
</a>
, make sure you download the binary archive
- (e.g. apache-maven-2.2.1-bin.tar.bz2).
+ (e.g. apache-maven-3.0-bin.tar.bz2).
</p>
<p>
- Installing Maven should be easy: unzip the file to
+ Installing Maven should be easy: extract the file to
any directory you like, let's say:
- <source>/opt/apache-maven-2.2.1</source>
+ <source>/opt/apache-maven-3.0</source>
</p>
<p>
Next you need to do 2 things:
<ul>
<li>
- add an environment variable MAVEN_HOME which
+ add an environment variable M2_HOME which
points to the install directory of Maven,
- i.e. /opt/apache-maven-2.2.1
+ i.e. /opt/apache-maven-3.0
</li>
<li>
add
- <tt>$MAVEN_HOME/bin</tt>
+ <tt>$M2_HOME/bin</tt> (Linux) or <tt>%M2_HOME%\bin</tt> (Windows)
to your path (using the variable you can
switch more easily when a new version
arrives)
@@ -89,7 +83,7 @@
<subsection name="Configure Maven toolchains">
<p>
You can run Maven with any JDK (let's say JDK 1.6) but JWebUnit should be compiled
- with JDK 1.5. To achieve this we are using Maven toolchains mecanism.
+ with JDK 1.5. To achieve this we are using <a href="http://maven.apache.org/guides/mini/guide-using-toolchains.html">Maven toolchains mecanism</a>.
</p>
<p>
Create a file <tt>~/.m2/toolchains.xml</tt> with the given content:
@@ -105,7 +99,7 @@
<id>1.5</id>
</provides>
<configuration>
- <jdkHome>/opt/jdk1.5.0_15</jdkHome>
+ <jdkHome>/opt/jdk1.5.0_22</jdkHome>
</configuration>
</toolchain>
</toolchains>]]>
Modified: trunk/src/site/xdoc/how-to-contribute.xml
===================================================================
--- trunk/src/site/xdoc/how-to-contribute.xml 2010-10-20 12:19:47 UTC (rev 873)
+++ trunk/src/site/xdoc/how-to-contribute.xml 2010-10-20 13:10:11 UTC (rev 874)
@@ -41,7 +41,7 @@
Improve Web 2.0 support (AJAX, drag&drop, focus, mouse clicks, keypress, ...). Will need additions/modifications of the API.
</li>
<li>
- Take advantage of Java 5 (migrate to JUnit 4, use generics, ...)
+ Take advantage of Java 5 (use generics, ...)
</li>
<li>
Create a record tool like SeleniumIDE or WebTestRecorder.
Modified: trunk/src/site/xdoc/index.xml
===================================================================
--- trunk/src/site/xdoc/index.xml 2010-10-20 12:19:47 UTC (rev 873)
+++ trunk/src/site/xdoc/index.xml 2010-10-20 13:10:11 UTC (rev 874)
@@ -55,7 +55,7 @@
</p>
<p>
- The current version of JWebUnit is 2.4. This is the "stable" version of
+ The current version of JWebUnit is 3.0. This is the "stable" version of
JWebUnit, and requires Java 1.5.
</p>
</section>
Modified: trunk/src/site/xdoc/installation.xml
===================================================================
--- trunk/src/site/xdoc/installation.xml 2010-10-20 12:19:47 UTC (rev 873)
+++ trunk/src/site/xdoc/installation.xml 2010-10-20 13:10:11 UTC (rev 874)
@@ -29,7 +29,7 @@
<section name="JWebUnit Installation">
<subsection name="Using Maven">
<p>
- If your project use Maven 2, it's very simple. Just add the plugin you want as dependency:
+ If your project use Maven, it's very simple. Just add the plugin you want as dependency:
</p>
<source><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
@@ -43,7 +43,7 @@
<dependency>
<groupId>net.sourceforge.jwebunit</groupId>
<artifactId>jwebunit-htmlunit-plugin</artifactId>
- <version>2.2</version>
+ <version>3.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Modified: trunk/src/site/xdoc/quickstart.xml
===================================================================
--- trunk/src/site/xdoc/quickstart.xml 2010-10-20 12:19:47 UTC (rev 873)
+++ trunk/src/site/xdoc/quickstart.xml 2010-10-20 13:10:11 UTC (rev 874)
@@ -32,9 +32,67 @@
of the methods available, consult the <a href="apidocs/index.html">Javadocs</a> - particularly
the WebTestCase class for full documentation.
</p>
-<subsection name="Creating a TestCase">
+<subsection name="Creating a JUnit 4 TestCase">
<p>
- JWebUnit uses two approaches for creating test cases: inheritance and delegation. The simplest is
+ JWebUnit uses two approaches for creating JUnit 4 test cases: static import and delegation. The simplest is
+ to statically import all methods of net.sourceforge.jwebunit.junit.JWebUnit.
+
+ <source>
+import static net.sourceforge.jwebunit.junit.JWebUnit.*;
+
+public class ExampleWebTestCase {
+
+ @Before
+ public void prepare() {
+ setBaseUrl("http://localhost:8080/test");
+ }
+
+ @Test
+ public void test1() {
+ beginAt("home.xhtml"); //Open the browser on http://localhost:8080/test/home.xhtml
+ clickLink("login");
+ assertTitleEquals("Login");
+ setTextField("username", "test");
+ setTextField("password", "test123");
+ submit();
+ assertTitleEquals("Welcome, test!");
+ }
+}
+ </source>
+ An alternative is to include an instance of the WebTester class in your TestCase and delegate navigation
+ and assertions to it. This is provided in case you need or prefer delegation.
+
+ <source>
+import net.sourceforge.jwebunit.junit.WebTester;
+
+public class ExampleWebTestCase {
+ private WebTester tester;
+
+ @Before
+ public void prepare() {
+ tester = new WebTester();
+ tester.setBaseUrl("http://localhost:8080/test");
+ }
+
+ @Test
+ public void test1() {
+ tester.beginAt("home.xhtml"); //Open the browser on http://localhost:8080/test/home.xhtml
+ tester.clickLink("login");
+ tester.assertTitleEquals("Login");
+ tester.setTextField("username", "test");
+ tester.setTextField("password", "test123");
+ tester.submit();
+ tester.assertTitleEquals("Welcome, test!");
+ }
+}
+ </source>
+In the following samples, JUnit 4 and static import will be used.
+</p>
+</subsection>
+
+<subsection name="Creating a JUnit 3 TestCase (deprecated)">
+<p>
+ JWebUnit uses two approaches for creating JUnit 3 test cases: inheritance and delegation. The simplest is
to inherit from WebTestCase rather than junit.framework.TestCase.
<source>
@@ -48,7 +106,7 @@
}
public void test1() {
- beginAt("/home");
+ beginAt("home.xhtml"); //Open the browser on http://localhost:8080/test/home.xhtml
clickLink("login");
assertTitleEquals("Login");
setTextField("username", "test");
@@ -60,7 +118,8 @@
</source>
An alternative is to include an instance of the WebTester class in your TestCase and delegate navigation
and assertions to it. This is provided in case you need or prefer delegation.
-
+ <b>WARNING: WebTester was migrated to JUnit 4. As a result all assertXX will throw java.lang.AssertionError
+ instead of old junit.framework.AssertionFailedError.</b>
<source>
import junit.framework.TestCase;
import net.sourceforge.jwebunit.junit.WebTester;
@@ -71,10 +130,11 @@
public void setUp() {
super.setUp();
tester = new WebTester();
+ tester.setBaseUrl("http://localhost:8080/test");
}
public void test1() {
- tester.beginAt("/home");
+ tester.beginAt("home.xhtml"); //Open the browser on http://localhost:8080/test/home.xhtml
tester.clickLink("login");
tester.assertTitleEquals("Login");
tester.setTextField("username", "test");
@@ -84,7 +144,6 @@
}
}
</source>
-In the following samples, inheritance will be used.
</p>
</subsection>
@@ -92,12 +151,15 @@
<p>
JWebUnit can use different plugins to execute the tests you write. Only one line makes the difference:
<source>
-import net.sourceforge.jwebunit.junit.WebTestCase;
import net.sourceforge.jwebunit.util.TestingEngineRegistry;
+import org.junit.Before;
-public class ExampleWebTestCase extends WebTestCase {
- public void setUp() {
- super.setUp();
+import static net.sourceforge.jwebunit.junit.JWebUnit.*;
+
+public class ExampleWebTestCase {
+
+ @Before
+ public void prepare() {
setTestingEngineKey(TestingEngineRegistry.TESTING_ENGINE_HTMLUNIT); <i>// use HtmlUnit</i>
setTestingEngineKey(TestingEngineRegistry.TESTING_ENGINE_SELENIUM); <i>// use Selenium</i>
}
@@ -113,11 +175,11 @@
The primary way that JWebUnit allows you to test your web application is through navigation
of the application itself. You can consider each test case as a use case through the
application itself. The first step is to point where the testable application is hosted
- so that it may be accessed by JWebUnit.
+ so that it may be accessed by JWebUnit. It can generally be done in a test fixture.
<source>
- public void setUp() throws Exception {
- super.setUp();
+ @Before
+ public void prepare() {
setBaseUrl("http://myserver:8080/myapp");
}
</source>
@@ -135,8 +197,9 @@
under "Login", you may test these assertions through the following code:
<source>
+ @Test
public void testIndexLogin() {
- beginAt("/index.html"); <i>// start at index.html</i>
+ beginAt("index.html"); <i>// start at index.html</i>
assertTitleEquals("Home"); <i>// the home page should be titled "Home"</i>
assertLinkPresent("Login"); <i>// there should be a "Login" link</i>
clickLink("Login"); <i>// click the link</i>
@@ -155,8 +218,9 @@
that it works as expected.
<source>
+ @Test
public void testFormSubmission() {
- beginAt("/login.html");
+ beginAt("login.html");
assertTitleEquals("Login"); <i>// we should be on the login page</i>
// fill out the form
@@ -186,16 +250,18 @@
For pages with more than one form, JWebUnit will usually establish which form is being worked with
implicitly from the form elements being accessed. You can also set the form explicitly by form ID or name:
<source>
+ @Test
public void testBottomFormSubmission() {
- beginAt("/twoForm.html");
+ beginAt("twoForm.html");
setWorkingForm("bottomForm");
submit();
}
</source>
You can work with non-submit (type='button') buttons as well:
<source>
+ @Test
public void testPopupButton() {
- beginAt("/info.html");
+ beginAt("info.html");
assertButtonPresent("popupButtonId"); <i>// clickButton() will also check this</i>
clickButton("popupButtonId");
assertWindowPresent("popupWindow");
@@ -212,8 +278,9 @@
as follows:
</p>
<source>
+ @Test
public void testPopupWindow() {
- beginAt("/rootPage.html");
+ beginAt("rootPage.html");
clickLink("popupLink");
assertWindowPresent("popupWindow): <i>// optional - gotoWindow will</i>
<i>// also perform this assertion.</i>
@@ -226,8 +293,9 @@
You can work with frames in a similar manner:
</p>
<source>
+ @Test
public void testFrame() {
- beginAt("/info.html");
+ beginAt("info.html");
assertFramePresent("contentFrame");
gotoFrame("contentFrame");
...
@@ -241,8 +309,9 @@
verify it's correctness.
</p>
<source>
+ @Test
public void testCorrectness() {
- beginAt("/mainPage");
+ beginAt("mainPage.xhtml");
assertTitleEquals("Main Page");
assertLinkPresentWithText("Add Widget");
clickLinkWithText("Add Widget");
@@ -271,8 +340,9 @@
</table>
</p>
<source>
+ @Test
public void testAgeTable() {
- beginAt("/agePage");
+ beginAt("agePage.html");
<i>// check that table is present</i>
assertTablePresent("ageTable");
@@ -303,8 +373,9 @@
</table>
</p>
<source>
+ @Test
public void testAgeTable() {
- beginAt("/agePage");
+ beginAt("agePage.html");
ExpectedTable ageTable = new Table(new Object[][] {
{new Cell("Age Table", 2, 1)},
{"Name", "Age"},
@@ -327,8 +398,9 @@
<p><![CDATA[<span id="welcomeMessage">Welcome, Joe User!</span>]]>
</p>
<source>
+ @Test
public void testWelcomeMessage() {
- beginAt("/mainPage");
+ beginAt("mainPage.xhtml");
<i>// check for presence of welcome message by text</i>
assertTextPresent("Welcome, Joe User!");
@@ -353,20 +425,21 @@
Locale (default is Locale.getDefault()).
</p>
<source>
- public void setUp() throws Exception {
- super.setUp();
- getTestContext().setbaseUrl("http://myserver:8080/myapp");
+ @Before
+ public void prepare() {
+ setbaseUrl("http://myserver:8080/myapp");
getTestContext().setResourceBundleName("ApplicationResources");
}
+ @Test
public void testMainPage() {
- beginAt("/mainPage");
+ beginAt("mainPage.html");
assertTitleEqualsKey("title.mainPage");
assertKeyPresent("message.welcome");
assertKeyInTable("mainPageTable", "header.mainPageTable");
}
</source>
- There is also a getMessage() method on WebTester and WebTestCase that can be used to access
+ There is also a getMessage() method on WebTester, WebTestCase and JWebUnit that can be used to access
resource bundle messages directly in your tests.
</p>
<p>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2010-10-20 12:19:53
|
Revision: 873
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=873&view=rev
Author: henryju
Date: 2010-10-20 12:19:47 +0000 (Wed, 20 Oct 2010)
Log Message:
-----------
JUnit 4 migration part 5 bis: renamed webtestcase generator module to reflect the fact it is now generating more than WebTestCase.
Modified Paths:
--------------
trunk/jwebunit-code-generator/pom.xml
trunk/jwebunit-core/pom.xml
trunk/pom.xml
Modified: trunk/jwebunit-code-generator/pom.xml
===================================================================
--- trunk/jwebunit-code-generator/pom.xml 2010-10-20 12:14:24 UTC (rev 872)
+++ trunk/jwebunit-code-generator/pom.xml 2010-10-20 12:19:47 UTC (rev 873)
@@ -6,9 +6,9 @@
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>jwebunit-webtestcase-generator</artifactId>
- <name>WebTestCase Generator</name>
- <description>A little parser that create WebTestCase from WebTester.</description>
+ <artifactId>jwebunit-code-generator</artifactId>
+ <name>Code Generator</name>
+ <description>JavaCC parsers that create WebTestCase and JWebUnit based on WebTester.</description>
<properties>
<topDirectoryLocation>..</topDirectoryLocation>
<!-- Prevents deployment as this module is not intended to be used by end-users -->
Modified: trunk/jwebunit-core/pom.xml
===================================================================
--- trunk/jwebunit-core/pom.xml 2010-10-20 12:14:24 UTC (rev 872)
+++ trunk/jwebunit-core/pom.xml 2010-10-20 12:19:47 UTC (rev 873)
@@ -85,9 +85,7 @@
<dependencies>
<dependency>
<groupId>net.sourceforge.jwebunit</groupId>
- <artifactId>
- jwebunit-webtestcase-generator
- </artifactId>
+ <artifactId>jwebunit-code-generator</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-10-20 12:14:24 UTC (rev 872)
+++ trunk/pom.xml 2010-10-20 12:19:47 UTC (rev 873)
@@ -314,7 +314,8 @@
<exclude>COPYING*</exclude>
<exclude>src/test/clover/clover.license</exclude>
<exclude>src/site/resources/images/jwebunit-architecture.odg</exclude>
- <exclude>src/main/javacc/Java1.5.jj</exclude>
+ <exclude>src/main/javacc/WebTestCase.jj</exclude>
+ <exclude>src/main/javacc/JWebUnit.jj</exclude>
<exclude>src/main/javacc/Token.java</exclude>
<exclude>src/main/resources/testcases/CharsetTest/charset.html_utf-8</exclude>
<exclude>src/main/resources/testcases/NonHtmlContentTest/text.bin</exclude>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2010-10-20 12:14:30
|
Revision: 872
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=872&view=rev
Author: henryju
Date: 2010-10-20 12:14:24 +0000 (Wed, 20 Oct 2010)
Log Message:
-----------
JUnit 4 migration part 5: renamed webtestcase generator module to reflect the fact it is now generating more than WebTestCase.
Modified Paths:
--------------
trunk/pom.xml
Added Paths:
-----------
trunk/jwebunit-code-generator/
Removed Paths:
-------------
trunk/jwebunit-webtestcase-generator/
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-10-20 12:04:14 UTC (rev 871)
+++ trunk/pom.xml 2010-10-20 12:14:24 UTC (rev 872)
@@ -21,7 +21,7 @@
</issueManagement>
<inceptionYear>2002</inceptionYear>
<modules>
- <module>jwebunit-webtestcase-generator</module>
+ <module>jwebunit-code-generator</module>
<module>jwebunit-core</module>
<module>jwebunit-commons-tests</module>
<module>jwebunit-htmlunit-plugin</module>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2010-10-20 12:04:23
|
Revision: 871
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=871&view=rev
Author: henryju
Date: 2010-10-20 12:04:14 +0000 (Wed, 20 Oct 2010)
Log Message:
-----------
JUnit 4 migration part 4: transform JUnit 4 exceptions to JUnit 3 exceptions in WebTestCase.
Modified Paths:
--------------
trunk/jwebunit-webtestcase-generator/src/main/javacc/WebTestCase.jj
Modified: trunk/jwebunit-webtestcase-generator/src/main/javacc/WebTestCase.jj
===================================================================
--- trunk/jwebunit-webtestcase-generator/src/main/javacc/WebTestCase.jj 2010-10-20 12:03:13 UTC (rev 870)
+++ trunk/jwebunit-webtestcase-generator/src/main/javacc/WebTestCase.jj 2010-10-20 12:04:14 UTC (rev 871)
@@ -817,7 +817,8 @@
( Block() | ";" )
{if (append) {
sb.append(" {\n");
- sb.append(" ");
+ sb.append(" try {\n");
+ sb.append(" ");
if (!isVoid) sb.append("return ");
sb.append("tester.").append(params.remove(0)).append("(");
for (Iterator i = params.iterator(); i.hasNext();) {
@@ -826,6 +827,11 @@
if (i.hasNext()) sb.append(", ");
}
sb.append(");\n");
+ sb.append(" } catch (org.junit.ComparisonFailure e) {\n");
+ sb.append(" throw new junit.framework.ComparisonFailure(e.getMessage(), e.getExpected(), e.getActual());\n");
+ sb.append(" } catch (java.lang.AssertionError e) {\n");
+ sb.append(" throw new junit.framework.AssertionFailedError(e.getMessage());\n");
+ sb.append(" }\n");
sb.append(" }\n\n");
}}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|