Revision: 554
Author: solsson
Date: 2006-08-02 05:01:20 -0700 (Wed, 02 Aug 2006)
ViewCVS: http://svn.sourceforge.net/jwebunit/?rev=554&view=rev
Log Message:
-----------
Moved the FIT test suite to more maven-like folders.
Modified Paths:
--------------
trunk/jwebfit/pom.xml
trunk/jwebfit/src/test/java/net/sourceforge/jwebunit/fit/WebFixtureTest.java
Added Paths:
-----------
trunk/jwebfit/src/test/fit/
trunk/jwebfit/src/test/resources/testSite/
Removed Paths:
-------------
trunk/jwebfit/src/test/fit/testCallPage.fit.html
trunk/jwebfit/src/test/fit/testCheckbox.fit.html
trunk/jwebfit/src/test/fit/testForms.fit.html
trunk/jwebfit/src/test/fit/testIgnoreAction.fit.html
trunk/jwebfit/src/test/fit/testNavigation.fit.html
trunk/jwebfit/src/test/fit/testRadioGroup.fit.html
trunk/jwebfit/src/test/fit/testSelectBox.fit.html
trunk/jwebfit/src/test/fit/testTable.fit.html
trunk/jwebfit/src/test/fit/testWindowNavigation.fit.html
trunk/jwebfit/src/test/resources/sampleHtml/
trunk/jwebfit/src/test/resources/testInput/
Modified: trunk/jwebfit/pom.xml
===================================================================
--- trunk/jwebfit/pom.xml 2006-08-02 11:31:42 UTC (rev 553)
+++ trunk/jwebfit/pom.xml 2006-08-02 12:01:20 UTC (rev 554)
@@ -26,7 +26,6 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <scope>test</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
Copied: trunk/jwebfit/src/test/fit (from rev 552,
trunk/jwebfit/src/test/resources/testInput)
Deleted: trunk/jwebfit/src/test/fit/testCallPage.fit.html
===================================================================
--- trunk/jwebfit/src/test/resources/testInput/testCallPage.fit.html
2006-08-02 09:07:05 UTC (rev 552)
+++ trunk/jwebfit/src/test/fit/testCallPage.fit.html 2006-08-02 12:01:20 UTC
(rev 554)
@@ -1,31 +0,0 @@
-<table border="1">
-<tr><td> net.sourceforge.jwebunit.fit.IncludeFixture</td></tr>
-<tr><td> testIncludedCheckbox <table
border="1">
-<tr><td colspan="2">net.sourceforge.jwebunit.fit.WebFixture </td></tr>
-<tr><td> baseUrl </td><td>http://localhost:8081 </td></tr>
-</table>
-<p>
-Test manipulation of checkbox input fields. Note that jWebUnit
-supports only single checkboxes with given name. Support for
-multiple checkboxes with same name and different values will be
-added later.
-<p>
-<table border="1">
-<tr><td colspan="3"> net.sourceforge.jwebunit.fit.WebFixture </td></tr>
-<tr><td> begin </td><td colspan="2"> personalInfoForm </td></tr>
-<tr><td> enter </td><td> fullName </td><td> Jim
</td></tr>
-<tr><td> select </td><td> checkbox </td><td> citizenCheckbox
</td></tr>
-<tr><td> press </td><td colspan="2"> submit </td></tr>
-<tr><td> check </td><td> title </td><td bgcolor="#cfffcf">
Personal Info Results </td></tr>
-<tr><td> check </td><td> text present </td><td bgcolor="#cfffcf"> Name
given is Jim </td></tr>
-<tr><td> check </td><td> text present </td><td bgcolor="#cfffcf"> You
indicated that you are a citizen </td></tr>
-<tr><td> begin </td><td colspan="2"> personalInfoForm </td></tr>
-<tr><td> enter </td><td> fullName </td><td> Wilkes
</td></tr>
-<tr><td> select </td><td> checkbox </td><td> citizenCheckbox
</td></tr>
-<tr><td> deselect </td><td> checkbox </td><td> citizenCheckbox
</td></tr>
-<tr><td> press </td><td colspan="2"> submit </td></tr>
-<tr><td> check </td><td> title </td><td bgcolor="#cfffcf">
Personal Info Results </td></tr>
-<tr><td> check </td><td> text present </td><td bgcolor="#cfffcf"> Name
given is Wilkes </td></tr>
-<tr><td> check </td><td> text present </td><td bgcolor="#cfffcf"> You
indicated that you are not a citizen </td></tr>
-</table></td></tr>
-</table>
\ No newline at end of file
Deleted: trunk/jwebfit/src/test/fit/testCheckbox.fit.html
===================================================================
--- trunk/jwebfit/src/test/resources/testInput/testCheckbox.fit.html
2006-08-02 09:07:05 UTC (rev 552)
+++ trunk/jwebfit/src/test/fit/testCheckbox.fit.html 2006-08-02 12:01:20 UTC
(rev 554)
@@ -1,28 +0,0 @@
-<table border="1">
-<tr><td colspan="2">net.sourceforge.jwebunit.fit.WebFixture </td></tr>
-<tr><td> baseUrl </td><td>http://localhost:8081 </td></tr>
-</table>
-<p>
-Test manipulation of checkbox input fields. Note that jWebUnit
-supports only single checkboxes with given name. Support for
-multiple checkboxes with same name and different values will be
-added later.
-<p>
-<table border="1">
-<tr><td colspan="3"> net.sourceforge.jwebunit.fit.WebFixture </td></tr>
-<tr><td> begin </td><td colspan="2"> personalInfoForm </td></tr>
-<tr><td> enter </td><td> fullName </td><td> Jim
</td></tr>
-<tr><td> select </td><td> checkbox </td><td> citizenCheckbox
</td></tr>
-<tr><td> press </td><td colspan="2"> submit </td></tr>
-<tr><td> check </td><td> title </td><td bgcolor="#cfffcf">
Personal Info Results </td></tr>
-<tr><td> check </td><td> text present </td><td bgcolor="#cfffcf"> Name
given is Jim </td></tr>
-<tr><td> check </td><td> text present </td><td bgcolor="#cfffcf"> You
indicated that you are a citizen </td></tr>
-<tr><td> begin </td><td colspan="2"> personalInfoForm </td></tr>
-<tr><td> enter </td><td> fullName </td><td> Wilkes
</td></tr>
-<tr><td> select </td><td> checkbox </td><td> citizenCheckbox
</td></tr>
-<tr><td> deselect </td><td> checkbox </td><td> citizenCheckbox
</td></tr>
-<tr><td> press </td><td colspan="2"> submit </td></tr>
-<tr><td> check </td><td> title </td><td bgcolor="#cfffcf">
Personal Info Results </td></tr>
-<tr><td> check </td><td> text present </td><td bgcolor="#cfffcf"> Name
given is Wilkes </td></tr>
-<tr><td> check </td><td> text present </td><td bgcolor="#cfffcf"> You
indicated that you are not a citizen </td></tr>
-</table>
\ No newline at end of file
Deleted: trunk/jwebfit/src/test/fit/testForms.fit.html
===================================================================
--- trunk/jwebfit/src/test/resources/testInput/testForms.fit.html
2006-08-02 09:07:05 UTC (rev 552)
+++ trunk/jwebfit/src/test/fit/testForms.fit.html 2006-08-02 12:01:20 UTC
(rev 554)
@@ -1,26 +0,0 @@
-Test text input field entry, inspection of form field values, and simple form
submission
-<p>
-<table border="1">
-<tr><td colspan="4"> net.sourceforge.jwebunit.fit.WebFixture </td></tr>
-<tr><td> baseUrl </td><td colspan="3"> http://localhost:8081 </td></tr>
-<tr><td> begin </td><td colspan="3"> menu </td></tr>
-<tr><td> press </td><td> link </td><td colspan="2"> Choose your
favorite color </td></tr>
-<tr><td> check </td><td> form element </td><td> color
</td><td bgcolor="#cfffcf"> red </td></tr>
-<tr><td> enter </td><td> color </td><td colspan="2"> pink
</td></tr>
-<tr><td> check </td><td> form element </td><td> color
</td><td bgcolor="#cfffcf"> pink </td></tr>
-<tr><td> press </td><td colspan="3"> submit </td></tr>
-<tr><td> check </td><td> title </td><td colspan="2"
bgcolor="#cfffcf"> Color Page </td></tr>
-<tr><td> check </td><td> text present </td><td colspan="2"
bgcolor="#cfffcf"> Your chosen color was pink </td></tr>
-</table>
-<p>
-<table border="1">
-<tr><td>net.sourceforge.jwebunit.fit.WebFixture</td></tr>
-<tr><td> begin </td><td colspan="2"> enterMoria </td></tr>
-<tr><td> enter </td><td> password </td><td> friend </td></tr>
-<tr><td> press </td><td> submit </td><td> EnterButton </td></tr>
-<tr><td> check </td><td> title </td><td bgcolor="#cfffcf"> Moria
</td></tr>
-<tr><td> begin </td><td colspan="2"> enterMoria </td></tr>
-<tr><td> enter </td><td> password </td><td> enemy </td></tr>
-<tr><td> press </td><td> submit </td><td> EnterButton </td></tr>
-<tr><td> check </td><td> title </td><td bgcolor="#cfffcf"> Moria Entry
Failure </td></tr>
-</table>
\ No newline at end of file
Deleted: trunk/jwebfit/src/test/fit/testIgnoreAction.fit.html
===================================================================
--- trunk/jwebfit/src/test/resources/testInput/testIgnoreAction.fit.html
2006-08-02 09:07:05 UTC (rev 552)
+++ trunk/jwebfit/src/test/fit/testIgnoreAction.fit.html 2006-08-02
12:01:20 UTC (rev 554)
@@ -1,4 +0,0 @@
-<table border="1">
-<tr><td>net.sourceforge.jwebunit.fit.WebFixture</td></tr>
-<tr><td colspan="2" bgcolor="#efefef">ignore </td></tr>
-</table>
\ No newline at end of file
Deleted: trunk/jwebfit/src/test/fit/testNavigation.fit.html
===================================================================
--- trunk/jwebfit/src/test/resources/testInput/testNavigation.fit.html
2006-08-02 09:07:05 UTC (rev 552)
+++ trunk/jwebfit/src/test/fit/testNavigation.fit.html 2006-08-02 12:01:20 UTC
(rev 554)
@@ -1,18 +0,0 @@
-Test starting at a URL, link navigation, and checking page title.
-<p>
-Story:
-Beginning at the application menu, selecting the choose color link should
navigate to the color selection page.
-<p>
-Testing the story:
-We'll use baseUrl to establich the application root, navigate to the main
menu, press the link, and check that we have the expected page title.
-<p>
-Succesful run:
-<p>
-<table border="1">
-<tr><td>net.sourceforge.jwebunit.fit.WebFixture </td></tr>
-<tr><td>baseUrl </td><td colspan="2"> http://localhost:8081 </td></tr>
-<tr><td>begin </td><td colspan="2"> menu </td></tr>
-<tr><td>check </td><td> title </td><td bgcolor="#cfffcf"> Menu Page
</td></tr>
-<tr><td>press </td><td> link </td><td> Choose your favorite color
</td></tr>
-<tr><td>check </td><td> title </td><td bgcolor="#cfffcf"> Choose Color
</td></tr>
-</table>
\ No newline at end of file
Deleted: trunk/jwebfit/src/test/fit/testRadioGroup.fit.html
===================================================================
--- trunk/jwebfit/src/test/resources/testInput/testRadioGroup.fit.html
2006-08-02 09:07:05 UTC (rev 552)
+++ trunk/jwebfit/src/test/fit/testRadioGroup.fit.html 2006-08-02 12:01:20 UTC
(rev 554)
@@ -1,22 +0,0 @@
-Test manipulation of radio group boxes.
-<p>
-<table border="1">
-<tr><td colspan="2"> net.sourceforge.jwebunit.fit.WebFixture </td></tr>
-<tr><td> baseUrl </td><td> http://localhost:8081 </td></tr>
-</table>
-<p>
-<p>
-<table border="1">
-<tr><td> net.sourceforge.jwebunit.fit.WebFixture </td></tr>
-<tr><td> begin </td><td> personalInfoForm </td></tr>
-<tr><td> check </td><td> radio option present </td><td> sex
</td><td bgcolor="#cfffcf"> male </td></tr>
-<tr><td> check </td><td> radio option present </td><td> sex
</td><td bgcolor="#cfffcf"> female </td></tr>
-<tr><td> check </td><td> radio option not present </td><td> sex
</td><td bgcolor="#cfffcf"> other </td></tr>
-<tr><td> enter </td><td> sex </td><td colspan="2">
female </td></tr>
-<tr><td> check </td><td> radio option selected </td><td> sex
</td><td bgcolor="#cfffcf"> female </td></tr>
-<tr><td> check </td><td> radio option not selected </td><td> sex
</td><td bgcolor="#cfffcf"> male </td></tr>
-<tr><td> enter </td><td> fullName </td><td colspan="2"> Jim
</td></tr>
-<tr><td> press </td><td colspan="3"> submit </td></tr>
-<tr><td> check </td><td> title equals </td><td colspan="2"
bgcolor="#cfffcf"> Personal Info Results</td></tr>
-<tr><td> check </td><td> text present </td><td colspan="2"
bgcolor="#cfffcf"> You are female </td></tr>
-</table>
\ No newline at end of file
Deleted: trunk/jwebfit/src/test/fit/testSelectBox.fit.html
===================================================================
--- trunk/jwebfit/src/test/resources/testInput/testSelectBox.fit.html
2006-08-02 09:07:05 UTC (rev 552)
+++ trunk/jwebfit/src/test/fit/testSelectBox.fit.html 2006-08-02 12:01:20 UTC
(rev 554)
@@ -1,72 +0,0 @@
-Test manipulation of select boxes (drop lists). Multiple-select boxes
-not yet supported by jWebUnit.
-<p>
-<table border="1">
-<tr><td colspan="2"> net.sourceforge.jwebunit.fit.WebFixture </td></tr>
-<tr><td> baseUrl </td><td> http://localhost:8081 </td></tr>
-</table>
-<p>
-<p>
-<table border="1">
-<tr><td colspan="4">net.sourceforge.jwebunit.fit.WebFixture</td></tr>
-<tr><td>begin </td><td colspan="3"> personalInfoForm </td></tr>
-<tr><td>enter </td><td> fullName </td><td colspan="2"> Jim
</td></tr>
-<tr><td>select </td><td bgcolor="#ffffcf"> option state <hr><font
size=-2><pre>java.lang.RuntimeException: Unsupported select target
- at net.sourceforge.jwebunit.fit.WebFixture.select(WebFixture.java:101)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
- at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
- at java.lang.reflect.Method.invoke(Method.java:324)
- at net.sourceforge.jwebunit.fit.WebFixture.doCells(WebFixture.java:25)
- at fit.Fixture.doRow(Fixture.java:94)
- at fit.Fixture.doRows(Fixture.java:88)
- at fit.Fixture.doTable(Fixture.java:82)
- at fit.Fixture.doTables(Fixture.java:72)
- at net.sourceforge.jwebunit.fit.FileRunner.run(FileRunner.java:55)
- at
net.sourceforge.jwebunit.fit.DirectoryRunner.runFile(DirectoryRunner.java:56)
- at
net.sourceforge.jwebunit.fit.DirectoryRunner.run(DirectoryRunner.java:50)
- at
net.sourceforge.jwebunit.fit.DirectoryRunner.runFile(DirectoryRunner.java:56)
- at
net.sourceforge.jwebunit.fit.DirectoryRunner.run(DirectoryRunner.java:50)
- at
net.sourceforge.jwebunit.fit.DirectoryRunner.runFile(DirectoryRunner.java:56)
- at
net.sourceforge.jwebunit.fit.DirectoryRunner.run(DirectoryRunner.java:50)
- at
net.sourceforge.jwebunit.fit.DirectoryRunner.main(DirectoryRunner.java:25)
-</pre></font></td><td colspan="2"> Tennessee </td></tr>
-<tr><td>check </td><td> option equals </td><td> state
</td><td bgcolor="#ffcfcf"> Tennessee <font size=-1
color=#c08080><i>expected</i></font><hr>expected:<Tennessee> but
was:<></td></tr>
-<tr><td>press </td><td colspan="3"> submit </td></tr>
-<tr><td>check </td><td> title equals </td><td colspan="2"
bgcolor="#cfffcf"> Personal Info Results </td></tr>
-<tr><td>check </td><td> text present </td><td colspan="2"
bgcolor="#ffcfcf"> You live in Tennessee <font size=-1
color=#c08080><i>expected</i></font><hr>Expected text not found in response:
[You live in Tennessee]</td></tr>
-</table>
-<p>
-<p>
-Test row fixture for validating available options in select boxes.
-<p>
-<table border="1">
-<tr><td colspan="2"> net.sourceforge.jwebunit.fit.WebFixture </td></tr>
-<tr><td> begin </td><td> personalInfoForm </td></tr>
-</table>
-<p>
-We can validate the set of labels or values alone:
-<p>
-<table border="1">
-<tr><td>net.sourceforge.jwebunit.fit.OptionDisplay </td></tr>
-<tr><td>state </td></tr>
-<tr><td>label </td></tr>
-<tr><td bgcolor="#cfffcf">Tennessee </td></tr>
-<tr><td bgcolor="#cfffcf">Georgia </td></tr>
-<tr>
-<td bgcolor="#ffcfcf"> <font color=#808080></font> <font size=-1
color=#c08080><i>surplus</i></font></td></tr></table>
-<p>
-<p>
-Or vaidate both at once:
-<p>
-<table border="1">
-<tr><td> net.sourceforge.jwebunit.fit.OptionDisplay </td></tr>
-<tr><td colspan="2"> state </td></tr>
-<tr><td> label </td><td> value </td></tr>
-<tr><td bgcolor="#cfffcf"> Tennessee </td><td bgcolor="#cfffcf"> Tennessee
</td></tr>
-<tr><td> <font color=#808080></font></td><td bgcolor="#cfffcf"> None
</td></tr>
-<tr><td bgcolor="#cfffcf"> Georgia </td><td bgcolor="#cfffcf"> Georgia
</td></tr>
-</table>
-<p>
-<p>
-Hmmm, in the tests above, why does the empty label not get colored green? It
is not being validated?
Deleted: trunk/jwebfit/src/test/fit/testTable.fit.html
===================================================================
--- trunk/jwebfit/src/test/resources/testInput/testTable.fit.html
2006-08-02 09:07:05 UTC (rev 552)
+++ trunk/jwebfit/src/test/fit/testTable.fit.html 2006-08-02 12:01:20 UTC
(rev 554)
@@ -1,28 +0,0 @@
-Test validation of html tables.
-<p>
-<table border="1">
-<tr><td colspan="2"> net.sourceforge.jwebunit.fit.WebFixture </td></tr>
-<tr><td> baseUrl </td><td> http://localhost:8081 </td></tr>
-</table>
-<p>
-<p>
-<table border="1">
-<tr><td colspan="4"> net.sourceforge.jwebunit.fit.WebFixture </td></tr>
-<tr><td> begin </td><td colspan="3"> personalInfoForm </td></tr>
-<tr><td> enter </td><td> fullName </td><td colspan="2"> Jim
</td></tr>
-<tr><td> select </td><td> checkbox </td><td> citizenCheckbox
</td><td> on </td></tr>
-<tr><td> select </td><td> option </td><td> state
</td><td> Tennessee </td></tr>
-<tr><td> enter </td><td> sex </td><td colspan="2"> male
</td></tr>
-<tr><td> press </td><td colspan="3"> submit </td></tr>
-<tr><td> check </td><td> title </td><td colspan="2"
bgcolor="#cfffcf"> Personal Info Results </td></tr>
-</table>
-<p>
-Use a table fixture to validate the table containing the results.
-<p>
-<table border="1">
-<tr><td
colspan="4">net.sourceforge.jwebunit.fit.PersonalInfoTableFixture</td></tr>
-<tr><td>name </td><td> citizenship </td><td> state
</td><td> sex </td></tr>
-<tr><td bgcolor="#cfffcf">Jim </td><td bgcolor="#cfffcf"> a
citizen </td><td bgcolor="#cfffcf"> Tennessee </td><td
bgcolor="#cfffcf"> male </td></tr>
-<tr><td bgcolor="#cfffcf">Fred Evans </td><td bgcolor="#cfffcf"> a
citizen </td><td bgcolor="#cfffcf"> Tennessee </td><td
bgcolor="#cfffcf"> male </td></tr>
-<tr><td bgcolor="#cfffcf">Rebecca VonStavoren </td><td bgcolor="#cfffcf"> not
a citizen </td><td bgcolor="#cfffcf"> North Carolina </td><td
bgcolor="#cfffcf"> female </td></tr>
-</table>
\ No newline at end of file
Deleted: trunk/jwebfit/src/test/fit/testWindowNavigation.fit.html
===================================================================
--- trunk/jwebfit/src/test/resources/testInput/testWindowNavigation.fit.html
2006-08-02 09:07:05 UTC (rev 552)
+++ trunk/jwebfit/src/test/fit/testWindowNavigation.fit.html 2006-08-02
12:01:20 UTC (rev 554)
@@ -1,14 +0,0 @@
-Test setting focus between browser windows.<br>
-<p>
-<table border="1">
-<tr><td> net.sourceforge.jwebunit.fit.WebFixture </td></tr>
-<tr><td> baseUrl </td><td colspan="2"> http://localhost:8081</td></tr>
-<tr><td> begin </td><td colspan="2"> pageWithPopupLink </td></tr>
-<tr><td> check </td><td> title </td><td bgcolor="#cfffcf">
Page With Popup Link </td></tr>
-<tr><td> press </td><td> link id </td><td> popupLink
</td></tr>
-<tr><td> check </td><td> window present </td><td bgcolor="#cfffcf">
popupWindow </td></tr>
-<tr><td> window </td><td colspan="2"> popupWindow </td></tr>
-<tr><td> check </td><td> title </td><td bgcolor="#cfffcf">
Popup Window </td></tr>
-<tr><td colspan="3"> baseWindow </td></tr>
-<tr><td> check </td><td> title </td><td bgcolor="#cfffcf">
Page With Popup Link </td></tr>
-</table>
\ No newline at end of file
Modified:
trunk/jwebfit/src/test/java/net/sourceforge/jwebunit/fit/WebFixtureTest.java
===================================================================
---
trunk/jwebfit/src/test/java/net/sourceforge/jwebunit/fit/WebFixtureTest.java
2006-08-02 11:31:42 UTC (rev 553)
+++
trunk/jwebfit/src/test/java/net/sourceforge/jwebunit/fit/WebFixtureTest.java
2006-08-02 12:01:20 UTC (rev 554)
@@ -26,16 +26,24 @@
public class WebFixtureTest extends TestCase {
+ /**
+ * The minimum number of FIT checks in an accepted test suite.
+ * This is here so that the test won't pass in absence of FIT tables.
+ */
public static final int MINIMUM_TESTS = 50;
- public static final String SRC_FOLDER = "src/";
- public static final String TEST_HTML_FOLDER = "sampleHtml/";
+
+ // file locations for running FIT
+ public static final String FIT_FOLDER = "src/test/fit/";
+ public static final String OUTPUT_FOLDER = "target/fit-reports/";
+ public static final String TEST_HTML_FOLDER =
"src/test/resources/testSite/";
+
+ // server options
public static final int JETTY_PORT_DEFAULT = 8081;
public static final String JETTY_PORT_PROPERTY = "jetty.port";
public static final String JETTY_CONTEXT = "/";
public static final String JETTY_HOST = "localhost";
private HttpServer server = null;
- private String testRoot = "test/resources/";
// translation between urls used in old .fit files and the urls in jetty
context
private static Map oldUrls = null;
@@ -84,15 +92,14 @@
// run the tests
DirectoryRunner testRunner =
DirectoryRunner.parseArgs(new String[]
- {testRoot + "testInput",
- testRoot + "testOutput"});
+ {FIT_FOLDER, OUTPUT_FOLDER});
testRunner.run();
testRunner.getResultWriter().write();
// sanity check
assertTrue("Should find at least " + MINIMUM_TESTS + " tests",
0 < testRunner.getResultWriter().getTotal());
// report failures to JUnit
- String resultsUrl = testRoot + "testOutput/index.html";
+ String resultsUrl = OUTPUT_FOLDER + "index.html";
assertEquals("Failures detected. Check " + resultsUrl + ".", 0,
testRunner.getResultWriter().getCounts().wrong);
assertEquals("Exceptions detected. Check " + resultsUrl + ".", 0,
@@ -115,11 +122,11 @@
// add the files in sampleHtml to context
HttpContext context = server.addContext(JETTY_CONTEXT);
setUpPathToStaticContents(context);
- if (!context.getResource("readme.html").exists()) {
- // allow the test to run from parent project
- testRoot = SRC_FOLDER + testRoot;
- setUpPathToStaticContents(context);
- }
+// if (!context.getResource("readme.html").exists()) {
+// // allow the test to run from parent project
+// testRoot = FIT_FOLDER + testRoot;
+// setUpPathToStaticContents(context);
+// }
// check that the context root contains the web pages
assertTrue("Should find readme.html in the configured jetty context: "
+ context.getResourceBase(),
context.getResource("readme.html").exists());
@@ -127,7 +134,7 @@
}
private void setUpPathToStaticContents(HttpContext context) {
- context.setResourceBase(testRoot + TEST_HTML_FOLDER);
+ context.setResourceBase(TEST_HTML_FOLDER);
}
private void setUpContextHandlers(HttpContext context) {
Copied: trunk/jwebfit/src/test/resources/testSite (from rev 552,
trunk/jwebfit/src/test/resources/sampleHtml)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development