5 Replies Latest reply on Aug 25, 2006 1:07 AM by Tom Baeyens

    Web Console unit test adventures

    David Lloyd Master

      I've been working on getting the unit tests working for the web console, and I've run across a couple of snags.

      First, there is a bug in httpunit 1.6, still present in 1.6.2 (which is the newest version), which causes it to fail to parse valid XHTML properly. I've got a patch in with the maintainer and with any luck he'll put out a new version shortly. In the meantime, I've been using a patched 1.6.2 locally.

      Second, and perhaps more seriously, there's a bug in jwebunit 1.2 (also XHTML-related) that prevents the tests from passing. Basically it has to do with not being namespace-aware. It's a simple fix, so I thought I'd see if it was corrected in 1.3. Unfortunately, 1.3 is a fairly substantial rewrite involving a very large number of dependancies. Here's the full list:

      avalon-framework-4.1.3.jar - New to jBPM, but exists in the repository
      commons-codec-1.3.jar - New to jBPM, but exists in the repository
      commons-collections-3.2.jar - We're using 3.1, so we'd have to test this
      commons-httpclient-3.0.1.jar - We've got this one
      commons-io-1.2.jar - New to jBPM, not in repository
      commons-lang-2.1.jar - New to jBPM, but exists in the repository
      commons-logging-1.1.jar - We're using 1.0.4; it shouldn't hurt to upgrade but we'd still have to test
      htmlunit-1.9.jar - This is a new dependency; I'm not sure where it comes from or what the license is yet
      icu4j-2.6.1.jar - This is a new dependency; I'm not sure where it comes from or what the license is yet
      jaxen-1.1-beta-9.jar - We're using 1.1-beta-6 currently, repository does not have beta-9 yet
      jdom-1.0.jar - New dependency, not in repository
      js-1.6R2.jar - New dependency, not in repository; comes from Mozilla so license is probably OK (?)
      junit-3.8.2.jar - We're using 3.8.1, upgrade is probably fine
      log4j-1.2.12.jar - We're using 1.2.8, upgrade is probably fine
      logkit-1.0.1.jar - This is a new dependency; I'm not sure where it comes from or what the license is yet
      nekohtml-0.9.5.jar - Repository has 0.9.1, so we'd have to update that
      regexp-1.3.jar - This is Jakarta regexp. Exists in repository, new to jBPM
      servlet-api-2.4.jar - Got it already
      tagsoup-0.9.7.jar - This is a new dependency; I'm not sure where it comes from or what the license is yet
      xalan-2.6.0.jar - In repository
      xercesImpl-2.6.2.jar - We're using 2.7.1, but it should work fine; we're only using it for unit tests anyway
      xml-apis-1.0.b2.jar - I don't think this is needed
      xmlParserAPIs-2.6.2.jar - I don't think this is needed
      xom-1.0b3.jar - Not sure if this is needed, but if so, it's not in the repository

      Incidentally, applying the fix to 1.2 is pretty simple. The question becomes, do we want to continue to work from a modified old version, or should we go through the work of getting all these extra dependencies for the purpose of unit testing?