JaVa
   

Summary

This chapter discussed the use of unit tests in the development of distributed systems. The problems in distributed systems relate mainly to finding remote objects and properly handling connection errors, at least from the tester's perspective. We described RMI and EJB as they are currently the most popular Java distribution mechanisms. In the case of RMI, a universal test-first development is possible by use of mock objects. However, deployment problems are hard to cover in local unit tests, so they have to be dealt with in additional deployment tests.

The use of EJB forces us to test the actual beans inside the EJB container. This approach involves an intermediate deployment process, slowing down the test cycle considerably. This problem can be reduced by moving the business logic to a separate layer. In addition, the introduction of this technology should be delayed until it becomes an imminent requirement in each specific case.


JaVa
   
Comments