How to Integration Test Java Application ?

INTEGRATION TESTING



Integration testing (sometimes called integration and testing, abbreviated I&T) is the phase in software testing in which individual software modules are combined and tested as a group. It occurs after unit testing and before validation testing.

In Integration testing, individual modules are integrated and tested together for correctness.
Let each of the three screens in the above example be developed by three different team members. Now that they are finished with Unit testing, it is time to bring all the code together and check if they work well together. Integration testing is performed to ensure that data or control is transferred correctly from one screen to another.


APPROACHES


  • Big Bang is an approach to Integration Testing where all or most of the units are combined together and tested at one go. This approach is taken when the testing team receives the entire software in a bundle. So what is the difference between Big Bang Integration Testing and System Testing? Well, the former tests only the interactions between the units while the latter tests the entire system.
  • Top Down is an approach to Integration Testing where top level units are tested first and lower level units are tested step by step after that. This approach is taken when top down development approach is followed. Test Stubs are needed to simulate lower level units which may not be available during the initial phases.
  • Bottom Up is an approach to Integration Testing where bottom level units are tested first and upper level units step by step after that. This approach is taken when bottom up development approach is followed. Test Drivers are needed to simulate higher level units which may not be available during the initial phases.
  • Sandwich/Hybrid is an approach to Integration Testing which is a combination of Top Down and Bottom Up approaches.


Here are some sample integration test cases for the Employee Application example:
  • Check if the user logged in and session are the same in all the other new integrated screens
  • Check if the other modules are not updating/deleting/inserting any record in the database unrequired
  • Let there be an employee status field, which says ‘New’ on addition,’Updated’ on modification, and ‘Deleted’ on deletion. Though two or three screens can use the same status field, it is important to ensure the field is not being wrongly updated.
  • Check if the header, footer, screen size and appearance meet requirements after integration
  • Check that when clicking on Submit buttons, the control is transferred to the next screen
  • Check that when clicking on the Cancel button, the action performed is cancelled
  • In addition, the general integration test cases for J2EE application could be:
  • Check the flow of data, either Object, XML or Session from end to end. Check for correctness.
  • Check whether the session is managed correctly by each of the modules
  • If external applications (web services) are involved, check whether your application is able to make calls and retrieve data back from the application

In addition, the general integration test cases for J2EE application could be:



  • Check the flow of data, either Object, XML or Session from end to end. Check for correctness.
  • Check whether the session is managed correctly by each of the modules
  • If external applications (web services) are involved, check whether your application is able to make calls and retrieve data back from the application