jakarta-watchdog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morgan Delagrange <mdela...@yahoo.com>
Subject [Proposal] Latka conversion in detail
Date Tue, 23 Jul 2002 20:50:21 GMT
Hi all,

I made a first pass at converting the JSP tests to a
format which, I think, is more organized:


The idea is that we use ENTITY declarations to specify
each package in the Watchdog suite.  Then you can
place any entities you want in a suite, which should
allow you to construct tests as large as all the
Servlet and JSP tests combined, or as small as a
single package.



I think that there would be a physical XML
file for running just the JSP tests, just the Servlet
tests, or both at the same time.  It may also be
possible to construct a command-line interface that
will allow you to select a single entity or group of
entities to execute, removing the need for XML files
that exercise each package.  I think JDOM allows you
to generate entities dynamically, but I'd need to

Part of this proposal involved changing the mappings
(servlet, filter, etc.) in the servlet-tests and
servlet-compat webapps to use fully qualified package
names as test paths instead of the current, cryptic
versions.  I made a programmatic pass at this, which
you can find here (JDOM messed up the spacing a bit):


These are working test suites.  The JSP tests seem to
run perfectly.  The Servlet tests currently produce 21
errors (and 327 successes :), most of which I
introduced when I remapped the Servlets.  Most of the
errors introduced are probably trivial; a few might
require minor changes to the test servlets.  

I think this new servlet mapping format is much more
clear.  As an example, here is a GTest element with
the old servlet mapping and the corresponding Latka
test with the proposed new servlet mapping:

    host="${host}" port="${port}" exactMatch="true"
    assertion="A HttpServletRequestWrapper object
should be returned when the request object is passed
into the constructor. Java Specification v2.3 Sec 14."
    testStrategy="Construct a request object wrapping
the given request."

  <request followRedirects="false" version="1.0"
      <!--TEST STRATEGY: Construct a request object
wrapping the given request.-->
          label="A HttpServletRequestWrapper object
should be returned when the request object is passed
into the constructor. Java Specification v2.3 Sec 14."

I think tying the servlet mapping to the test package
will make maintenance and development tasks easier.

If we decide to proceed down this path, we would need
to winnow away the remaining errors (shouldn't take
long).  Then we'd want to write a Latka driver for
Watchdog, which could plug the known directory
structure and variables of the Watchdog tests into
Latka automatically.  Then I believe we'd be close to
something releasable.

I haven't been spending any time on the non-4.0 tests,
and I would just as soon leave them be, unless there
were strong objections to the contrary.


- Morgan

Morgan Delagrange

Do You Yahoo!?
Yahoo! Health - Feel better, live better

To unsubscribe, e-mail:   <mailto:watchdog-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:watchdog-dev-help@jakarta.apache.org>

View raw message