sanyaade-speechtools / delphi-museum-project

Automatically exported from code.google.com/p/delphi-museum-project
0 stars 0 forks source link

Create a set of automated web application tests #118

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Create an initial set of automated tests for the PAHMA deployment of the
Delphi web application.  Some of these tests may also be sufficiently
general to apply to any other deployment, or can at least be readily
adapted for same.

These tests might be created using a web application testing framework,
such as Sahi or Selenium RC, via 'curl', or via similar tools.  They can be
run individually or in groups (suites), and can generate reports.  They are
intended to automate part or all of what is currently a manual process, of
checking "whether the application currently works properly."

These tests may be applicable to one or more of the following testing use
cases:

- Regression testing: verifying that specific web application features are
still fully functional in the aftermath of changes to its software.
- "Smoke testing": identifying whether any major site functionality may be
badly broken.
- Acceptance testing: verifying that a specific, required set of site
functionality is present.

Original issue reported on code.google.com by aronrobe...@gmail.com on 15 Apr 2009 at 2:32

GoogleCodeExporter commented 9 years ago
Experimented with Sahi (http://sahi.co.in/w/) for performing these tests. 
Encountered a number of issues in its 'record' mode, some dealing with 
keystroke or
mouse capture/focus in Firefox under Mac OS X, which resulted in only a small
fraction of steps performed actually being recorded.  Without that mode, this 
becomes
akin to other frameworks in which one writes declarative statements to perform 
tests.
 May still revisit this framework in the future, if we can't find anything better,
and perhaps also look at its closest competitors, Selenium RC and Watir. 

Experimented with jWebUnit (http://jwebunit.sourceforge.net/) for performing 
these
tests.  This wraps wraps jUnit and HtmlUnit, and coding is much like using 
jUnit; has
some interesting features, like validating image files.  Checked in a simple 
project
to the /collab/delphi-deployment/pahma/trunk/scripts/acceptance-tests directory 
in
the IST Subversion repository.

jWebUnit is only sketchily documented in its Javadocs. I haven't yet gotten any 
of
its 'match' tests to work, using regex or fixed strings, for instance, although 
I
haven't checked the project mailing lists yet.  It was also quite slow, at 
least on
my machine: ~10 seconds for the first simple test, ~14 seconds for two tests 
that
check three page elements.  When turning on trace level logging, the framework 
was
spending much of that time arduously ploughing its way through HTML page 
elements.

The next test framework I'm planning to look at is Canoo WebTest,
(http://webtest.canoo.com/).  From a quick scan of the website docs (only have 
looked
into it that far to date), this can be driven entirely from Ant, claims to be 
fast,
and reporting appears extremely easy to understand - a key strength.

An (admittedly biased) comparison of jWebUnit and Canoo WebTest on a mailing 
list for
the latter:

http://www.nabble.com/Canoo-vs-JWebunit-td6439751.html

Original comment by aronrobe...@gmail.com on 30 Apr 2009 at 11:50

GoogleCodeExporter commented 9 years ago
Decision made to pursue creating these tests with Canoo WebTest, run from 
within Ant
(rather than using Groovy, the other major alternative).  From reading on 
2009-05-06,
this automated web application test framework appears to have nearly all of the
capabilities we are anticipating needing, is well documented, and has active
discussions on its mailing list, with frequent participation from its 
developers.

The only initial concerns, not yet looked into, regard the depth of its 
JavaScript
support: whether it will be sufficient for testing functionality such as PAHMA
catalog card support.  Also, the current image verification extension is stated 
as
being experimental, verifies all images received in a response, and is noted to 
have
some JavaScript-related limitations:
http://webtest.canoo.com/webtest/manual/verifyImages.html

A couple of direct links:

Downloads
http://webtest.canoo.com/webtest/manual/Downloads.html

Manual:
http://webtest.canoo.com/webtest/manual/manualOverview.html

And a useful introductory screencast:
http://mguillem.wordpress.com/2007/08/31/1st-webtest-screencast-creating-a-first
-webtest-project/

Original comment by aronrobe...@gmail.com on 6 May 2009 at 8:28

GoogleCodeExporter commented 9 years ago

Original comment by michaelb...@gmail.com on 3 Jul 2009 at 7:23

GoogleCodeExporter commented 9 years ago

Original comment by michaelb...@gmail.com on 3 Jul 2009 at 7:41