Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into boost-log4jappender
- Loading branch information
Showing
18 changed files
with
1,234 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/realms/from-scratch-realm-template/src/test/canoo/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
local.build.properties | ||
results | ||
definitions.xml | ||
dtd/Project.dtd |
49 changes: 49 additions & 0 deletions
49
src/realms/from-scratch-realm-template/src/test/canoo/README.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
|
||
Canoo Webtests for From Scratch Realm | ||
===================================== | ||
|
||
How to install and run the tests | ||
-------------------------------- | ||
|
||
1. Download and install canoo webtest package | ||
http://webtest.canoo.com/webtest/manual/Downloads.html (Successfully tested with revision canoo-3.0-1758) | ||
|
||
2. Unzip build.zip e.g. to /home/USERNAME/local/canoo-VERSION_r_REVISION | ||
|
||
3. Copy build.properties to local.build.properties and edit local.build.properties according to your local settings, for example set | ||
webtest.home=/home/USERNAME/local/canoo-VERSION_r_REVISION | ||
|
||
4. Start web-application server (for example Tomcat) | ||
(IMPORTANT: Make sure to set target environment inside 'TOMCAT/webapps/yanel/WEB-INF/classes/yanel.xml' to 'ci-test') | ||
(IMPORTANT: Make sure that Yanel has SSL NOT configured, check YANEL_HOME/src/build/local.build.properties or TOMCAT/webapps/yanel/WEB-INF/web.xml) | ||
(IMPORTANT: The language is configured inside includes/config.xml, but also inside the user itself ac-identities/users/lenya.xml) | ||
|
||
5. Type 'ant' (IMPORTANT: Make sure to use version 1.7.x) to run all the tests (You might have to reset your PATH environment variable, for example 'export PATH=/home/USER/yanel/tools/apache-ant/bin:$PATH') | ||
|
||
In order to run just "one" particular test, please type 'ant -Dwt.testInWork=tests/single-page.xml' or 'ant -Dwt.testInWork=tests/single-page/add-related-content-element.xml' | ||
|
||
|
||
|
||
How to add new tests | ||
-------------------- | ||
|
||
0. Add new tests to ./tests/allTests.xml | ||
|
||
1. download and install the webtestrecorder firefox plugin | ||
http://webtestrecorder.canoo.com/install.html | ||
|
||
2. record a test in the browser | ||
|
||
3. make a copy of one of the test files under ./tests | ||
|
||
4. edit the file and replace the actual test code with the recorded code | ||
|
||
5. clean up the code if necessary | ||
|
||
|
||
|
||
Known bugs | ||
---------- | ||
|
||
the recorder plugin has a problem with XHTML strict. | ||
somehow it doesn't record all events (e.g. clickButton). |
11 changes: 11 additions & 0 deletions
11
src/realms/from-scratch-realm-template/src/test/canoo/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
# file system path of canoo webtest package (http://webtest.canoo.com/webtest/build.zip) | ||
webtest.home=/home/USERNAME/canoo-3.0-1758 | ||
|
||
# {protocol}://{host}:{port}/{basepath} | ||
webtest.config.host=127.0.0.1 | ||
webtest.config.port=8080 | ||
webtest.config.protocol=http | ||
webtest.config.basepath=yanel | ||
|
||
realm.path=from-scratch-realm/ |
19 changes: 19 additions & 0 deletions
19
src/realms/from-scratch-realm-template/src/test/canoo/build.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0"?> | ||
|
||
<project name="canoo-web-tests" default="wt.full"> | ||
|
||
<property file="local.build.properties"/> | ||
<property file="build.properties"/> | ||
|
||
<!-- <import file="definitions.xml" description="Import custom definitions (if any)"/> --> | ||
<import file="${webtest.home}/webtest.xml" description="Import all functionalities for a full build"/> | ||
|
||
<property name="wt.testInWork" value="tests/allTests.xml"/> | ||
|
||
<!-- | ||
Activate this if you are behind a proxy and want to test a server outside your local network | ||
See http://ant.apache.org/manual/OptionalTasks/setproxy.html | ||
<setproxy proxyhost="myProxy" proxyport="1234"/> | ||
--> | ||
|
||
</project> |
21 changes: 21 additions & 0 deletions
21
src/realms/from-scratch-realm-template/src/test/canoo/definitions/login.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!-- | ||
Like all files of this folder, this content will be executed in target wt.defineMacros | ||
and therefore made be available for the tests (here the macro <fillParticipantData .../>) | ||
--> | ||
<macrodef name="login" description="Login"> | ||
<sequential> | ||
<invoke description="Load the toolbar to procede with the login" | ||
url="${realm.path}de/index.html?yanel.toolbar=on" /> | ||
<ifStep> | ||
<condition> | ||
<verifyXPath description="Check if login available" | ||
xpath="count(//input[@name='yanel.login.username']) > 0" /> | ||
</condition> | ||
<!-- Log in --> | ||
<setInputField name="yanel.login.username" value="lenya" /> | ||
<setInputField name="yanel.login.password" value="levi" /> | ||
<clickButton label="Login" fieldIndex="0"/> | ||
</ifStep> | ||
<!-- Assume logged in --> | ||
</sequential> | ||
</macrodef> |
12 changes: 12 additions & 0 deletions
12
src/realms/from-scratch-realm-template/src/test/canoo/definitions/logout.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!-- | ||
Like all files of this folder, this content will be executed in target wt.defineMacros | ||
and therefore made be available for the tests (here the macro <fillParticipantData .../>) | ||
--> | ||
<macrodef name="logout" description="Logout"> | ||
<sequential> | ||
<invoke description="Logout" | ||
url="${realm.path}de/index.html?yanel.usecase=logout"/> | ||
</sequential> | ||
</macrodef> | ||
|
||
|
6 changes: 6 additions & 0 deletions
6
src/realms/from-scratch-realm-template/src/test/canoo/dtd/MyWebTest.dtd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
|
||
<!ENTITY % webtest SYSTEM "./WebTest.dtd" > | ||
<!ENTITY % project SYSTEM "./Project.dtd"> | ||
%webtest; | ||
%project; |
Oops, something went wrong.