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? > -- View this message in context: http://www.nabble.com/Testing-JSF-applications-tf2805952.html#a7840442 Sent from the MyFaces - Users mailing list archive at Nabble.com.

