Maven has the concept of an attached test[1].  See the following
thread [2].  This can be useful when jUnit testing the business logic
then testing the session bean with Shale.

This will not help with Selenium based test, unless your test generates
the Selenium test scripts.

I am sure their are integrated framework in the market place, I have
not used any of them.

Paul Spencer

[1] http://maven.apache.org/guides/mini/guide-attached-tests.html
[2] http://www.mail-archive.com/[email protected]/msg46848.html

lightbulb432 wrote:
If I need to test both business logic and presentation logic, is there some
kind of framework that integrates both types of testing so that they are not
done independently (and therefore tests do not introduce redundant code).

An example of what I mean is a session bean method that returns the email
address of a given user. You would write a test to test this business logic
(i.e. correct email address returned for that user)

Now when you test the web page that uses this session bean method to display
the email address, you're essentially testing the exact same thing,
duplication test code, increasing the difficulty of maintenance.

Is there some kind of integrated framework out there for testing that solves
this problem? (e.g. Specify tests in a centralized place, such as an XML
file, then both the presentation and business logic use that test?)

Does any of this even make sense? :)

Thanks.



lightbulb432 wrote:
How would you go about testing a JSF application? Would you test both the
session beans and the HTML output (using HttpUnit and/or HtmlUnit) from
the JSF pages, or just one or the other?

I ask because it seems like the session beans and HTML output tests might
be testing for roughly the same things (because the session beans expose
functionality used to create the HTML), so wouldn't there be redundancy in
the tests? Or is that a good thing?

What are best practices in this regard?



Reply via email to