The JSFUnit doco explains how to package your app to run the tests. In fact it has some very helpful example/doco on how to do so with ant/maven or whatever your tool of choice is.
Right. In short, you typically have a seperate build of your WAR that is used for testing. There are other options though.