Skip to content

Commit

Permalink
Merge branch 'master' into boost-log4jappender
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwechner committed Aug 8, 2012
2 parents 37ffcde + 1152414 commit 53c8d19
Show file tree
Hide file tree
Showing 18 changed files with 1,234 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/build/build.properties
Expand Up @@ -96,6 +96,9 @@ duplicated.libs=apache-jakarta-commons-codec-1.3.jar,\
commons-lang-2.2.jar,\
commons-lang-2.3.jar,\
commons-lang-2.4.jar,\
commons-logging-1.0.4.jar,\
apache-jakarta-commons-logging-1.0.4.jar,\
commons-logging-1.1.jar,\
commons-beanutils-1.6.jar,\
commons-collections-2.1.jar,\
commons-collections-3.1.jar,\
Expand Down
1 change: 1 addition & 0 deletions src/build/dependencies.xml
Expand Up @@ -41,6 +41,7 @@

<dependency groupId="log4j" artifactId="log4j" version="1.2.16"/>
<dependency groupId="org.slf4j" artifactId="slf4j-log4j12" version="1.5.8"/>
<dependency groupId="commons-logging" artifactId="commons-logging" version="1.1.1"/>

<!-- INFO: JAXB implementation -->
<dependency groupId="org.eclipse.persistence" artifactId="org.eclipse.persistence.moxy" version="2.3.2"/>
Expand Down
@@ -0,0 +1,4 @@
local.build.properties
results
definitions.xml
dtd/Project.dtd
49 changes: 49 additions & 0 deletions src/realms/from-scratch-realm-template/src/test/canoo/README.txt
@@ -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).
@@ -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 src/realms/from-scratch-realm-template/src/test/canoo/build.xml
@@ -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>
@@ -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']) &gt; 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>
@@ -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>


@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>

<!ENTITY % webtest SYSTEM "./WebTest.dtd" >
<!ENTITY % project SYSTEM "./Project.dtd">
%webtest;
%project;

0 comments on commit 53c8d19

Please sign in to comment.