Summary

In this chapter, we discussed what testing is, and why it is so important. We also discussed unit testing, integration testing, and user acceptance test as phases of testing. There are many testing tools available in the market; we took an overview of these tools so that you can choose a tool wisely. One of the most important tools of testing is JUnit testing, which we used to carry out the unit testing of the DAO layer, which was the starting of testing phase 1. However, JUnit uses a real-time database. We discussed the difficulties in testing external parameters. We resolved the issue using mock objects. Mockito is one of the mock object creation tools that we explored to test the DAO layer. After the DAO layer, we tested the Web layer. The web layer has a dependency upon the web container, which requires the initialization of requests and response objects. We had an in-depth discussion about the Spring TestContext framework, whose MockMVC module facilitates creation of the Mock objects of web-related components, such as request and responses. We used the mock objects to test form validation as well. After unit testing, we carried out integration testing of the DAO and service layers, and then the web and service layers. The story doesn't end here; we carried out successful deployment and final checking of the product by carrying out system testing. All the components developed by us are working fine, and we proved it by successfully executing the system testing!!

In the next chapter, we will go one step ahead, and discuss the role of security in an application along with the ways provided by the Spring framework to implement security. Keep reading!!!!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.77.71