----- Original Message -----
From: "Martin Cooper" <[EMAIL PROTECTED]>

<snip/>


> I prefer this second approach, because then we're testing the real
behaviour
> of the tags in a real container. Using a mock approach makes me nervous
> because of the intricacies of tag lifecycles, and I wouldn't feel as
> confident that the tags would work in the real world just because they
> worked in a mock environment. I too can live with the cost of page
> compilation time, traded against a better assurance that the tags are
being
> properly tested.

Yes, I forgot to mention that this also tests the struts-*.tld files since
they are required for the jsp test page.  But that's a simple change to the
build script.

Also, with the way I've structured the jsp page, it allows me to use 1
TestXXXTAg.jsp page for each TestXXXTag.java, so once the page is compiled,
it runs all the tests for that tag quickly.

I'm not sure doing the precomile within the build would help on time, but
its an option as well.

> I do, however, agree with David that we need to test the tags in
isolation.
> My preferred solution to this would be to use JSTL tags for the
surrounding
> logic, instead of Struts tags. Unfortunately, this would preclude testing
> the tags in a JSP 1.1 environment. Personally, I'd be OK with that -
having
> the tests run only in a JSP 1.2 environment is still way better than
having
> no tests! However, if others are not comfortable with this, then I think
> we'd have to resort to using scriptlets in the test pages to isolate the
tag
> tests.

I don't think relying on JSP 1.1 is a good idea wrt backward compatibility.
Although I do like the idea.

>
> --
> Martin Cooper
>
>



--
James Mitchell



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to