It is insanity to keep doing things the same way and expect them to improve. Any program is only as good as it is useful, so before applying complex tools, patterns or APIs to your production code, whether a software functions or not needs verifying. You need to configure your development environment to provide quick feedback on what is being developed. Automated JUnit tests help you verify your assumptions continuously, side effects are detected quickly, and it saves time. However, writing meaningful and maintainable JUnit test cases can be a complex task; it's all too easy to make mistakes that lead to serious maintenance problems when the code is in production. Learning the best practices for JUnit test design, design for testability, refactoring, test-driven development, a mocking framework, test automation and code quality monitoring before you start your project will help you avoid these problems and ensure that your project is a success.
This book will provide the skills you need to successfully build and maintain meaningful JUnit test cases. You will begin with how to use advanced JUnit 4 features, improve code coverage, automate JUnit tests, monitor code quality, write JUnit tests for the database and web tier refactor legacy code, mock external dependencies using Mockito and write testable code using Test-driven development. By sequentially working through the steps in each chapter, you will quickly master the advanced JUnit features, continuous integration, build scripting, code quality monitoring, mocking framework, working with legacy code and Test-driven development to create a clean, testable, and maintainable development environment.
Mastering unit testing using Mockito and JUnit will ensure your success with these concepts, tools, and frameworks.
|Product dimensions:||7.50(w) x 9.25(h) x 0.66(d)|
About the Author
Sujoy Acharya works as a software architect with Siemens Technology and Services Pvt Ltd. (STS). He grew up in a joint family and pursued his graduation in the field of Computer Science and Engineering. His hobbies are watching movies and sitcoms, playing outdoor sports, and reading books. Sujoy likes to research upcoming technologies. His major contributions are in the field of Java, J2EE, SOA, Ajax, GWT, and the Spring framework. He has authored the book Test-Driven Development with Mockito, Packt Publishing. He designs and develops healthcare software products. He has over 10 years of industrial experience and has architected and implemented large-scale enterprise solutions.