Are you saying your web application is one big servlet?I am working on a web application that has very little public methods.
Would it be sufficient to test only certain invisible "markers" that tell your test code that you're looking at the correct page? These shouldn't change that often.- update all my tests every week (a LOT of work),
There was an interesting discussion in the JUnit Yahoo Group (I think it was this thread) about the visibility of methods. Some folks think that having only public methods is not that bad. One of the arguments was that a private method is a "smell" indicating that it should be moved into a new class (in which it would be public and could be tested easily). Also, you can use the PrivilegedAccessor class for invoking private methods. It's also available in the JUnit group.- make the methods that return XML public (seems bad, intuitively).
Don't go there (for obvious reasons).- add testcode to my business classes (which I will later probably forget to remove)
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Don't get me started about those stupid light bulbs. |