[jboss-user] [JBoss Seam] - Re: A suggested SeamTest improvement
do-not-reply at jboss.com
Fri Nov 16 04:30:33 EST 2007
I think most people will think their test is ok since it will pass (i.e. none of the assertions in renderRespose breaks). What most people (or was it just me?) will not realize is that the renderResponse isn't even called after a redirect - happily not knowing that they tested nothing.
I would very much like to see this tightened up in one way or another. Maybe something like: If the user has overridden the renderResponse on a call that issues a redirect SeamTest could warn or even break with some clarifying message (i.e. "The call redirected, override renderResponseAfterRedirect instead). Or something better. I am just elaborating on how to make testing more fool-proof.
I have myself been fooled by a redirect. When I recently implemented a major change to our system that I thought would break a lot of the integration test suite (it should), I was very surprised to see that most of it was still testing green. After even adding a "fail()" to the renderresponse() method and still testing green I got even more puzzled. But it led me to this and some other posts clarifying things.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105354#4105354
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105354
More information about the jboss-user