Originally posted by poyyi sarma:
I would like to have end to end testing from client to sessionbean2(remote).
using easymock i was able to mock the remoteSession sessionBean2,but if i have to end-end testing
how should mock both client and external sesssion bean at the same time and test and also how can handle exception thrown to various levels.
any help in this regard greatly appreciated
Originally posted by Mattias Arthursson:
Typically you would not mock any components in end-to-end tests. Use mocks for you unit tests (i.e. each unit in isolation). You should be able to make your mocks throw the appropriate exceptions as well (using easymock, use mockControl.expectAndThrow() or mockControl.setThrowable()). End-to-end testing should be performed on the full, running system (in a test environment that is).