Permalink
Browse files

Delete all our old webtest/ code from Piwik. The new way to test the …

…UI is our beloved Screenshot tests! https://github.com/piwik/piwik-ui-tests
  • Loading branch information...
1 parent 97cc649 commit 93b90cbfe39e40ae7f62118ab0fb6caa16480045 @mattab mattab committed Mar 4, 2014
@@ -1,47 +0,0 @@
-################################################
-# Test suite configuration file
-################################################
-
-### WebTests config
-wt.home=/usr/local/canoo
-wt.config.host=127.0.0.1
-wt.config.port=80
-wt.config.protocol=http
-wt.config.basepath=/piwik
-
-wt.config.failOnError=true
-wt.config.haltOnError=true
-wt.config.haltOnFailure=true
-wt.config.enableJS=true
-wt.config.throwExceptionOnScriptError=true
-wt.config.browser=Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12
-wt.config.verifyLinks=true
-wt.config.verifyImages=true
-wt.config.headless=false
-#wt.openResultFile.skip=true
-
-## General settings
-testcase.dir=./testcases
-
-# patterns for each level
-testcase.level0.pattern=*.xml
-testcase.level1.pattern=*.xml
-testcase.level2.pattern=*.xml
-testcase.level3.pattern=*.xml
-screens=manual_results
-
-## To turn on/off specific level of tests just uncomment/comment appropriate line below
-test.level0=true
-test.level1=true
-#test.level2=true
-#test.level3=true
-
-## db settings
-db.username=username
-db.password=password
-db.port=3306
-db.name=piwik
-db.host=127.0.0.1
-
-## Google API key
-google.apikey=
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="Piwik" default="Level3" basedir=".">
-
- <target name="setup">
- <mkdir dir="${screens}" />
- </target>
-
- <target name="Level0" if="test.level0" depends="setup">
- <echo>Starting smoke tests...</echo>
- <subant failonerror="${wt.config.failOnError}" inheritall="true">
- <fileset dir="${testcase.dir}/level0" includes="${testcase.level0.pattern}"/>
- </subant>
- <echo>##################################</echo>
- <echo># 0 level smoke tests - FINISHED!#</echo>
- <echo>##################################</echo>
- </target>
-
- <target name="Level1" if="test.level1" depends="Level0">
- <echo>Starting setup tests...</echo>
- <subant failonerror="${wt.config.failOnError}" inheritall="true">
- <fileset dir="${testcase.dir}/level1" includes="${testcase.level1.pattern}"/>
- </subant>
- <echo>#################################</echo>
- <echo># 1st level tests - FINISHED! #</echo>
- <echo>#################################</echo>
- </target>
-
- <target name="Level2" if="test.level2" depends="Level1">
- <echo>Starting setup tests...</echo>
- <subant failonerror="${wt.config.failOnError}" inheritall="true">
- <fileset dir="${testcase.dir}/level2" includes="${testcase.level2.pattern}"/>
- </subant>
- <echo>###################################</echo>
- <echo># 2nd level test - FINISHED! #</echo>
- <echo>###################################</echo>
- </target>
-
- <target name="Level3" if="test.level3" depends="Level2">
- <echo>Starting UI tests - 3rd level...</echo>
- <echo>+-----------------------------------------+</echo>
- <echo>| WARNING! 3rd Level tests are optional |</echo>
- <echo>| and could fail without BUILD FAILED! |</echo>
- <echo>+-----------------------------------------+</echo>
- <subant failonerror="${wt.config.failOnError}" inheritall="true">
- <fileset dir="${testcase.dir}/level3" includes="${testcase.level3.pattern}"/>
- </subant>
- <echo>3rd level smoke tests finished - check for potential errors!</echo>
- </target>
-
-</project>
@@ -1,229 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE project [
- <!ENTITY time SYSTEM "../modules/time.xml">
- <!ENTITY checkForErrors SYSTEM "../modules/errors.xml">
- <!ENTITY verifyLinksAndImages SYSTEM "../modules/common_pages.xml">
- <!ENTITY loadMacros SYSTEM "../modules/macros.xml">
- <!ENTITY raquo "&#187;">
- <!ENTITY rsaquo "&#8250;" >
-]>
-
-<project name="Smoke test level0 - deploy test" basedir="." default="webtest">
- &time;
- <target name="webtest">
- <webtest name="install index">
- <steps>
- <echo>Installation</echo>
-
- &loadMacros;
-
- <echo>Piwik install - dbsetup: db.name: ${db.name}</echo>
- <sql
- driver="com.mysql.jdbc.Driver"
- url="jdbc:mysql://${db.host}:${db.port}/"
- userid="${db.username}"
- password="${db.password}"
- >
- <classpath>
- <pathelement location="${basedir}/../lib/java/mysql-connector-java-5.1.7.jar" />
- </classpath>
- <transaction>
- DROP DATABASE IF EXISTS ${db.name};
- </transaction>
- <transaction>
- CREATE DATABASE IF NOT EXISTS ${db.name};
- </transaction>
- </sql>
-
- <invoke description="get index" url="/" />
-
- <!-- 1. welcome -->
-
- <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
- <verifyText description="check page text" text="Piwik" />
- <verifyText description="check page text" text="Welcome!" />
- <verifyText description="check page text" text="This process is split up into 9 easy steps and will take around 5 minutes" />
-
-<!--
- &checkForErrors;
--->
- &verifyLinksAndImages;
-
- <retryClickLink description="wait for piwik.php tracking test" label="Next &raquo;" maxcount="10" seconds="1" />
-
- <!-- 2. systemCheck -->
-
- <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
- <verifyText description="check page text" text="Piwik" />
- <verifyText description="check page text" text="System Check" />
- <verifyText description="check page text" text="Optional" />
-
- &checkForErrors;
- &verifyLinksAndImages;
-
- <not description="check if system check passed">
- <verifyXPath description="looking for error image" xpath="//img[@src='plugins/Zeitgeist/images/error.png']" />
- </not>
-
- <verifyXPath description="looking for ok image" xpath="//img[@src='plugins/Zeitgeist/images/ok.png']" />
-
- <clickLink description="click 'Next'" label="Next &raquo;" />
-
- <!-- 3. databaseSetup -->
-
- <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
- <verifyText description="check page text" text="Piwik" />
- <verifyText description="check page text" text="Database Setup" />
-
- &checkForErrors;
- &verifyLinksAndImages;
-
- <setInputField description="set database host (and port)" name="host" value="${db.host}:${db.port}" />
- <setInputField description="set database username" name="username" value="${db.username}" />
- <setInputField description="set database password" name="password" value="${db.password}" />
- <setInputField description="set database name" name="dbname" value="${db.name}" />
- <setInputField description="set database port" name="tables_prefix" value="canoo_" />
-
- <clickButton description="click 'Next »' button" label="Next »" />
-
- <!-- 4. databaseCheck -->
-<!--
- <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
- <verifyText description="check page text" text="Piwik" />
- <verifyText description="check page text" text="Database Check" />
-
- &checkForErrors;
- &verifyLinksAndImages;
-
- <clickLink description="click 'Next'" label="Next &raquo;" />
--->
-
- <!-- 5. tablesCreation -->
-
- <not description="check if no error">
- <verifyXPath description="looking for error image" xpath="//img[@src='plugins/Zeitgeist/images/error_medium.png']" />
- </not>
-
- <not description="check if no warning">
- <verifyXPath description="looking for warning image" xpath="//img[@src='plugins/Zeitgeist/images/warning_medium.png']" />
- </not>
-
- <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
- <verifyText description="check page text" text="Piwik" />
- <verifyText description="check page text" text="Tables created with success!" />
- <verifyXPath description="looking for success image" xpath="//img[@src='plugins/Zeitgeist/images/success_medium.png']" />
-
- &checkForErrors;
- &verifyLinksAndImages;
-
- <clickLink description="click 'Next'" label="Next &raquo;" />
-
- <!-- 6. generalSetup -->
-
- <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
- <verifyText description="check page text" text="Piwik" />
- <verifyText description="check page text" text="Super User" />
-
- &checkForErrors;
- &verifyLinksAndImages;
-
- <setInputField description="set Piwik login" name="login" value="piwik_login" />
- <setInputField description="set Piwik password" name="password" value="piwik_password" />
- <setInputField description="set repeated Piwik password" name="password_bis" value="piwik_password" />
- <setInputField description="set Piwik email" name="email" value="nobody@piwik.org" />
-
- <clickButton description="click 'Next »' button" label="Next »" />
-
- <!-- 7. firstWebsiteSetup -->
-
- <not description="check if no error">
- <verifyXPath description="looking for error image" xpath="//img[@src='plugins/Zeitgeist/images/error_medium.png']" />
- </not>
-
- <not description="check if no warning">
- <verifyXPath description="looking for warning image" xpath="//img[@src='plugins/Zeitgeist/images/warning_medium.png']" />
- </not>
-
- <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
- <verifyText description="check page text" text="Piwik" />
- <verifyText description="check page text" text="Setup a Website" />
-
- &checkForErrors;
- &verifyLinksAndImages;
-
- <setInputField description="set Piwik site name" name="siteName" value="Dummy Site Name" />
- <setInputField description="set Piwik URL" name="url" value="${wt.config.protocol}://${wt.config.host}:${wt.config.port}${wt.config.basepath}" />
- <setSelectField description="set Piwik timezone" name="timezone" value="UTC" />
-
- <clickButton description="click 'Next »' button" label="Next »" />
-
- <!-- 8. displayJavascriptCode -->
-
- <not description="check if no error">
- <verifyXPath description="looking for error image" xpath="//img[@src='plugins/Zeitgeist/images/error_medium.png']" />
- </not>
-
- <not description="check if no warning">
- <verifyXPath description="looking for warning image" xpath="//img[@src='plugins/Zeitgeist/images/warning_medium.png']" />
- </not>
-
- <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
- <verifyText description="check page text" text="Piwik" />
- <verifyText description="check page text" text="JavaScript Tracking code" />
-
- &checkForErrors;
- &verifyLinksAndImages;
-
- <clickLink description="click 'Next'" label="Next &raquo;" />
-
- <!-- 9. finished -->
-
- <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
- <verifyText description="check page text" text="Piwik" />
- <verifyText description="check page text" text="Congratulations" />
-
- &checkForErrors;
- &verifyLinksAndImages;
-
- <clickLink description="click 'Continue to Piwik'" label="Continue to Piwik &raquo;" />
-
- <!-- logging in -->
-
- <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Sign in" />
- <verifyText description="check page text" text="Piwik" />
- <verifyText description="check page text" text="Lost your password?" />
-
- &checkForErrors;
- &verifyLinksAndImages;
-
- <setInputField description="set Piwik login" htmlId="form_login" value="piwik_login" />
- <setInputField description="set Piwik password" htmlId="form_password" value="piwik_password" />
-
- <clickButton description="click 'Sign in' button" label="Sign in" />
-
- <!-- logged in -->
-
- <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Web Analytics Reports - Dummy Site Name" />
- <verifyText description="check page text" text="Piwik" />
- <verifyText description="check page text" text="Dashboard" />
- <verifyText description="check page text" text="Hello" />
-
- <!-- change language -->
-<!--
- <clickElement description="click 'Deutsch'" xpath="//select[@id='language']/option[@value='de']" />
-
- <verifyText description="check page text" text="Hallo" />
-
- <clickElement description="click 'Français'" xpath="//select[@id='language']/option[@value='fr']" />
-
- <verifyText description="check page text" text="Bonjour" />
-
- <clickElement description="click 'English'" xpath="//select[@id='language']/option[@value='en']" />
-
- <verifyText description="check page text" text="Hello" />
--->
- </steps>
- </webtest>
- </target>
-</project>
Oops, something went wrong.

0 comments on commit 93b90cb

Please sign in to comment.