You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2003/11/21 22:35:53 UTC
cvs commit: cocoon-lenya/src/test/anteater tests.xml
andreas 2003/11/21 13:35:53
Modified: src/webapp/lenya/pubs/default/test/anteater tests.xml
src/targets test-build.xml
src/test/anteater tests.xml
Added: src/test/webtest tests.xml config.xml
src/webapp/lenya/pubs/default/test/webtest tests.xml
Log:
adding canoo webtest files
Revision Changes Path
1.1 cocoon-lenya/src/test/webtest/tests.xml
Index: tests.xml
===================================================================
<?xml version="1.0"?>
<!DOCTYPE project [
<!ENTITY default SYSTEM "../../webapp/lenya/pubs/default/test/webtest/tests.xml">
<!ENTITY config SYSTEM "config.xml">
]>
<project name="Lenya webtest tests" default="tests">
<taskdef file="${webtest.home}/webtestTaskdefs.properties">
<classpath>
<fileset dir="${webtest.home}" includes="**/lib/*.jar"/>
</classpath>
</taskdef>
<target name="tests" depends="pubs.default"/>
&default;
</project>
1.1 cocoon-lenya/src/test/webtest/config.xml
Index: config.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<config
host="localhost"
port="8888"
protocol="http"
saveresponse="true"
resultpath="src/test/webtest/results/"
verbose="true"
basepath="" />
1.1 cocoon-lenya/src/webapp/lenya/pubs/default/test/webtest/tests.xml
Index: tests.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<property name="publication-id" value="default"/>
<target name="pubs.default">
<testSpec name="pubs.default.intro">
&config;
<steps>
<invoke url="${publication-id}/introduction.html"/>
<verifytitle text="Lenya CMS Publication: Default Publication"/>
</steps>
</testSpec>
<testSpec name="pubs.default.login">
&config;
<steps>
<invoke url="${publication-id}/introduction.html"/>
<clicklink label="Login as Editor"/>
<verifytitle text="LOGIN"/>
<setinputfield name="username" value="lenya"/>
<setinputfield name="password" value="wrong"/>
<clickbutton label="login"/>
<verifytitle text="LOGIN"/>
<verifytext text="Authentication failed"/>
<!--
<setinputfield name="username" value="lenya"/>
<setinputfield name="password" value="levi"/>
<clickbutton label="login"/>
<verifytitle text="Apache Lenya - default"/>
-->
</steps>
</testSpec>
</target>
1.2 +47 -6 cocoon-lenya/src/webapp/lenya/pubs/default/test/anteater/tests.xml
Index: tests.xml
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/default/test/anteater/tests.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- tests.xml 21 Nov 2003 13:33:25 -0000 1.1
+++ tests.xml 21 Nov 2003 21:35:53 -0000 1.2
@@ -1,16 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
-<target name="pubs.default">
+<property name="publication-id" value="default"/>
+
+<target name="pubs.default" depends="
+ pubs.default.intro,
+ pubs.default.login,
+ pubs.default.admin
+ "/>
+
+<target name="pubs.default.intro">
<echo>Testing the default publication</echo>
-
- <property name="publication-id" value="default"/>
-
<echo>Testing introduction</echo>
<httpRequest path="/${publication-id}/introduction.html">
<match>
-<!-- <responseCode value="200"/>-->
+ <responseCode value="200"/>
<regexp>Default Publication</regexp>
</match>
</httpRequest>
+</target>
+
+<target name="pubs.default.login">
+ <echo>Testing login</echo>
+
+ <httpRequest
+ path="/${publication-id}/admin/index.html"
+ followRedirects="true">
+ <match>
+ <responseCode value="200"/>
+ <regexp>Username:</regexp>
+ </match>
+ </httpRequest>
+
+ <httpRequest
+ path="/${publication-id}/admin/index.html"
+ followRedirects="true">
+ <parameter name="username" value="lenya"/>
+ <parameter name="password" value="levi"/>
+ <match>
+ <responseCode value="200"/>
+ <regexp>Welcome</regexp>
+ </match>
+ </httpRequest>
-</target>
\ No newline at end of file
+</target>
+
+<target name="pubs.default.admin" depends="pubs.default.admin.user"/>
+
+<target name="pubs.default.admin.user">
+ <echo>Testing user administration</echo>
+ <httpRequest path="/${publication-id}/admin/index.html">
+ <match>
+ <responseCode value="200"/>
+ <regexp>Default Publication</regexp>
+ </match>
+ </httpRequest>
+</target>
1.15 +22 -1 cocoon-lenya/src/targets/test-build.xml
Index: test-build.xml
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/targets/test-build.xml,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- test-build.xml 20 Nov 2003 17:00:12 -0000 1.14
+++ test-build.xml 21 Nov 2003 21:35:53 -0000 1.15
@@ -13,7 +13,9 @@
</path>
<!-- Runs all tests -->
- <target name="test" depends="tests.junit, tests.anteater" description="Runs all tests"/>
+ <target name="test"
+ description="Runs all tests"
+ depends="tests.junit, tests.anteater, tests.webtest"/>
<!-- Prepares the test publication -->
<target name="test.pub.prepare">
@@ -182,6 +184,25 @@
<!--
<arg value="-Ddefault.debug=10"/>
-->
+ </java>
+ </target>
+
+
+ <!-- ================================================ -->
+ <!-- Canoo Webtest tests -->
+ <!-- ================================================ -->
+ <target name="tests.webtest">
+ <property name="webtest.home" value=""/>
+ <property name="webtest.buildfile" value="src/test/webtest/tests.xml"/>
+ <java classname="org.apache.tools.ant.Main" fork="true">
+ <classpath>
+ <fileset dir="${webtest.home}">
+ <include name="lib/**/*.jar"/>
+ </fileset>
+ <pathelement location="${webtest.home}/lib"/>
+ </classpath>
+ <jvmarg value="-Dwebtest.home=${webtest.home}" />
+ <arg line="-f ${webtest.buildfile}"/>
</java>
</target>
1.3 +3 -2 cocoon-lenya/src/test/anteater/tests.xml
Index: tests.xml
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/test/anteater/tests.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- tests.xml 21 Nov 2003 13:33:25 -0000 1.2
+++ tests.xml 21 Nov 2003 21:35:53 -0000 1.3
@@ -6,16 +6,17 @@
<project name="Lenya Anteater Tests" default="tests">
- &default;
-
<taskdef resource="META-INF/Anteater.tasks"/>
<typedef resource="META-INF/Anteater.types"/>
<property name="default.port" value="8888"/>
+ <property name="default.haltonerror" value="true"/>
<target name="tests"
depends="
pubs.default
"/>
+
+ &default;
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org