jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From juanpa...@apache.org
Subject svn commit: r1487144 - in /incubator/jspwiki/trunk/jspwiki-war: build.xml src/test/config/selenium/
Date Tue, 28 May 2013 22:10:02 GMT
Author: juanpablo
Date: Tue May 28 22:10:02 2013
New Revision: 1487144

URL: http://svn.apache.org/r1487144
Log:
JSPWIKI-770: removed all Selenium related stuff from jspwiki-war

Removed:
    incubator/jspwiki/trunk/jspwiki-war/src/test/config/selenium/
Modified:
    incubator/jspwiki/trunk/jspwiki-war/build.xml

Modified: incubator/jspwiki/trunk/jspwiki-war/build.xml
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/jspwiki-war/build.xml?rev=1487144&r1=1487143&r2=1487144&view=diff
==============================================================================
--- incubator/jspwiki/trunk/jspwiki-war/build.xml (original)
+++ incubator/jspwiki/trunk/jspwiki-war/build.xml Tue May 28 22:10:02 2013
@@ -45,16 +45,6 @@
   <property name="libs.main" value="target/JSPWiki/WEB-INF/lib" />
 	
   <property name="central.url" value="http://repo.maven.apache.org/maven2" />
-  
-  <!-- Web unit test properties -->
-  <property name="webtests.browser"  value="*firefox" />
-  <property name="webtests.folder"   value="target/ant-webtests"/>
-  <property name="webtests.build"    value="${webtests.folder}/build" />
-  <property name="webtests.libs"     value="${webtests.folder}/lib" />  
-  <property name="webtests.reports"  value="${webtests.folder}/reports" />
-  <property name="webtests.port"     value="10024" />
-  <property name="webtests.temp"     value="${java.io.tmpdir}/webtests" />
-  <property name="selenium-rc.jar"   value="${webtests.libs}/selenium-server-standalone-2.25.0.jar"
/>
 
   <!-- The directory where the SVN sources are checked out. -->
   <property name="install.src" value="${tmpdir}/svnsrc" />
@@ -362,228 +352,6 @@
 
   </target>
 
-  <!-- This target runs web unit tests using Selenium. These tests run
-       using an enbedded Jetty server running on a hard-coded high port.
-       The webapps deployed to Jetty contain 2 sample users:
-       - 'janne' with password 'myP@5sw0rd' and role of 'Authenticated'
-       - 'admin' with password 'myP@5sw0rd' and roles of 'Authenticated', 'Admin'
-       These are the same as the test users in tests/org.apache.wiki.auth.Users.
-  -->
-  <target name="webtests" depends="tests-init">
-    <mkdir dir="${webtests.temp}" />
-    <mkdir dir="${webtests.build}" />
-  
-    <!-- Create the master jspwiki.properties template for all webtests -->
-    <copy file="target/test-classes/jspwiki.properties"
-        toFile="${webtests.build}/jspwiki.properties.tmpl" flatten="true" />
-    <propertyfile file="${webtests.build}/jspwiki.properties.tmpl">
-      <entry key="jspwiki.authorizer" value="org.apache.wiki.auth.authorize.WebContainerAuthorizer"
/>
-      <entry key="jspwiki.userdatabase" value="org.apache.wiki.auth.user.XMLUserDatabase"
/>
-      <entry key="jspwiki.groupdatabase" value="org.apache.wiki.auth.authorize.XMLGroupDatabase"
/>
-      <entry key="jspwiki.referenceStyle" value="relative" />
-      <entry key="jspwiki.userdatabase.hashPrefix" value="false" />
-      <entry key="jspwiki-x.securityconfig.enable" value="true" />
-      <entry key="jspwiki.login.throttling" value="false" />
-    </propertyfile>
-
-    <!-- Build the custom auth WAR -->
-    <webtest-setup context="test-custom"
-      webxml="${webtests.build}/webtest.web.xml"/>
-
-    <!-- Build the custom auth WAR (absolute URLs) -->
-    <webtest-setup context="test-custom-absolute"
-      webxml="${webtests.build}/webtest.web.xml">
-      <propertyfile-entries>
-        <entry key="jspwiki.referenceStyle" value="absolute" />
-        <entry key="jspwiki.baseURL" value="http://localhost:${webtests.port}/test-custom-absolute/"
/>
-      </propertyfile-entries>
-    </webtest-setup>
-
-    <!-- Build the container auth WAR -->
-    <webtest-setup context="test-container"
-      webxml="${webtests.build}/containerauth.web.xml" />
-
-    <!-- Build the custom auth WAR (JDBC database) -->
-    <webtest-setup context="test-custom-jdbc"
-      webxml="${webtests.build}/webtest.web.xml">
-      <propertyfile-entries>
-        <entry key="jspwiki.userdatabase" value="org.apache.wiki.auth.user.JDBCUserDatabase"
/>
-        <entry key="jspwiki.groupdatabase" value="org.apache.wiki.auth.authorize.JDBCGroupDatabase"
/>
-      </propertyfile-entries>
-    </webtest-setup>
-
-    <!-- Build the container auth WAR (JDBC database) and test it -->
-    <webtest-setup context="test-container-jdbc"
-      webxml="${webtests.build}/containerauth.web.xml">
-      <propertyfile-entries>
-        <entry key="jspwiki.userdatabase" value="org.apache.wiki.auth.user.JDBCUserDatabase"
/>
-        <entry key="jspwiki.groupdatabase" value="org.apache.wiki.auth.authorize.JDBCGroupDatabase"
/>
-      </propertyfile-entries>
-    </webtest-setup>
-
-    <!-- Run each test in succession -->
-    <mkdir dir="${webtests.reports}" />
-    <webtest-exec context="test-custom" />
-    <webtest-exec context="test-container" />
-    <webtest-exec context="test-custom-jdbc" />
-    <webtest-exec context="test-container-jdbc" />
-    <webtest-exec context="test-custom-absolute" />  
-  	
-    <!-- Shut down the embedded Jetty server by sending the shutdown command -->
-    <echo message="Shutting down Jetty (if it is up)."/>
-    <get src="http://localhost:${webtests.port}/GO_AWAY/" dest="${webtests.temp}/shutdown.log"
ignoreerrors="true" verbose="true" />
-
-    <echo>The web unit tests have finished. You can find the test reports in ${webtests.reports}.
-    
-If all of the tests ran successfully, the reports will all be "green."</echo>
-    
-  </target>
-
-  <macrodef name="webtest-setup">
-    <attribute name="context" />
-    <attribute name="webxml" />
-    <attribute name="context.dir" default="${webtests.build}/@{context}" />
-    <attribute name="context.path" default="${basedir}/${webtests.build}/@{context}" />
-    <element name="propertyfile-entries" implicit="no" optional="true" />
-    <sequential>
-
-      <echo message="==============================================================="
/>
-      <echo message=" Setting up web unit tests for '@{context}'" />
-      <echo message="- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"
/>
-      <echo message="" />
-      <echo message="Creating Selenium test scripts..."/>
-      <mkdir dir="@{context.dir}/selenium" />
-      <copy flatten="true" toDir="@{context.dir}/selenium">
-        <fileset dir="src/test/config/selenium/tests/all" />
-        <filterset>
-          <filter token="selenium.context" value="@{context}" />
-        </filterset>
-      </copy>
-
-      <echo message="Creating test page repositories..."/>
-      <!-- Create a wiki page directory and point jspwiki.properties to it -->
-      <mkdir dir="@{context.dir}/wikipages" />
-      <copy toDir="@{context.dir}/wikipages" flatten="true" >
-        <fileset dir="src/main/config/wikipages/en">
-          <include name="Main.*" />
-          <include name="LeftMenu*.*" />
-          <include name="About.*" />
-          <include name="RecentChanges.*" />
-          <include name="WikiEtiquette.*" />
-          <include name="UnusedPages.*" />
-          <include name="UndefinedPages.*" />
-          <include name="PageIndex.*" />
-        </fileset>
-      </copy>
-
-      <echo message="Creating test webapp..."/>
-      <mkdir dir="@{context.dir}/webapp/WEB-INF/classes" />
-      <mkdir dir="@{context.dir}/webapp/WEB-INF/lib" />
-
-      <!-- Copy the WEB-INF files -->
-      <copy toDir="@{context.dir}/webapp/WEB-INF">
-        <fileset dir="src/main/webapp/WEB-INF">
-          <include name="jspwiki.policy" />
-          <include name="*.tld" />
-        </fileset>
-        <fileset dir="src/test/resources" includes="userdatabase.xml groupdatabase.xml"
/>
-      </copy>
-      <copy toFile="@{context.dir}/webapp/WEB-INF/web.xml" file="@{webxml}" flatten="true"
/>
-      
-      <!-- Create the jspwiki.properties file -->
-      <mkdir dir="@{context.dir}/workdir" />
-      <copy toFile="@{context.dir}/webapp/WEB-INF/jspwiki.properties"
-        file="${webtests.build}/jspwiki.properties.tmpl" flatten="true" />
-        <propertyfile file="@{context.dir}/webapp/WEB-INF/jspwiki.properties">
-          <entry key="jspwiki.baseURL"                            value="http://localhost:${webtests.port}/@{context}/"
/>
-          <entry key="jspwiki.workDir"                            value="@{context.path}/workdir"
/>
-          <entry key="jspwiki.fileSystemProvider.pageDir"         value="@{context.path}/wikipages"
/>
-          <entry key="jspwiki.basicAttachmentProvider.storageDir" value="@{context.path}/wikipages"
/>
-          <entry key="jspwiki.xmlUserDatabaseFile"                value="@{context.path}/webapp/WEB-INF/userdatabase.xml"
/>
-          <entry key="jspwiki.xmlGroupDatabaseFile"               value="@{context.path}/webapp/WEB-INF/groupdatabase.xml"
/>
-          <entry key="log4j.appender.FileLog.File"                value="@{context.path}/jspwiki.log"
/>
-        <propertyfile-entries/>
-      </propertyfile>
-
-      <!-- Copy the libraries -->
-      <copy toDir="@{context.dir}/webapp/WEB-INF/lib">
-        <fileset dir="${libs.main}" includes="*.jar" excludes="servlet-api-*.jar jsp-api-*.jar"
/>
-        <fileset file="${jdbc.driver.jar}"/>
-      </copy>
-
-      <!-- Copy the JSPs -->
-      <copy toDir="@{context.dir}/webapp">
-        <fileset dir="src/main/webapp">
-            <include name="admin/**" />
-            <include name="error/**" />
-	    <include name="images/**"/>
-	    <include name="scripts/**"/>
-	    <include name="templates/**" />
-	    <include name="*.*" />
-        </fileset>
-      </copy>
-
-    </sequential>
-  </macrodef>
-  
-  <!-- ============================================================== -->
-  
-  <!-- Selenium execution test task -->
-
-  <!-- This macro executes the Selenium test plans located in 
-       tests/build/selenium/@context@/, based on templates stored
-       in tests/etc/selenium/tests. It expects your favorite servlet
-       container up & running on ${tomcat.protocol}://${tomcat.host}:${tomcat.port} 
-       For this reason, these properties must be set up in your 
-       build.properties file.
-  -->
-
-  <macrodef name="webtest-exec">
-    <attribute name="context"/>
-    <sequential>
-      <!-- If already running, shut down the embedded Jetty server by sending the shutdown
command -->
-      <echo message="Shutting down Jetty (if it is up)."/>
-      <get src="http://localhost:${webtests.port}/GO_AWAY/" dest="${webtests.temp}/shutdown.log"
ignoreerrors="true" verbose="true" />
-      <sleep seconds="3"/>
-
-      <!-- Start Jetty with our test context -->
-      <echo message="Starting Jetty."/>
-        <java classname="org.apache.wiki.web.StreamRedirector" fork="true" spawn="true">
-        <!--java classname="org.apache.wiki.web.TestContainer" fork="true" spawn="true"-->
-        <arg value="org.apache.wiki.web.TestContainer"/>
-        <arg value="/tmp/jetty-redirectedoutput.log"/>
-      	<!--jvmarg value="-Dlog4j.debug=yesplease"/-->  <!-- to enable log4j debugging-->
-      	<jvmarg value="-Dorg.eclipse.jetty.LEVEL=info"/>  <!-- to enable jetty debugging-->
-        <classpath>
-           <path refid="path.tests" />
-        </classpath>
-        <sysproperty key="java.io.tmpdir" value="${webtests.temp}" />
-        <!--
-        <jvmarg value="-Xdebug" />
-        <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
/>
-        -->
-        <arg line="@{context}=${webtests.build}/@{context}/webapp" />
-      </java>
-        
-      <!-- Start Selenium tests -->
-      <echo message="Running web unit tests for context '@{context}'."/>
-      <java jar="${selenium-rc.jar}" fork="true"
-        output="${webtests.build}/@{context}/selenium/selenium.log">
-        <!--
-        <arg line="-browserSessionReuse" />
-		<arg line="-log" />
-		<arg line="${webtests.reports}/@{context}.selenium.log" />
-        -->
-        <arg line="-htmlSuite" />
-        <arg line='"${webtests.browser}"' />
-        <arg line='"http://localhost:${webtests.port}"' />
-        <!-- pre-filtered TestSuite.htmlin tests/etc/selenium/tests/all -->
-        <arg line="${basedir}/${webtests.build}/@{context}/selenium/TestSuite.html" />
-        <arg line="${webtests.reports}/@{context}.html" />
-      </java>
-    </sequential>
-  </macrodef>
-  
   <!-- ============================================================== -->
 
   <!-- Targets for signing JAR files -->



Mime
View raw message