Mockito is used widely for application code Unit Testing. In this blog I will show the dependencies which are required to configure Mockito in Spring Web application.
In the existing Spring based application, following dependent jar files needs to be added.
In the existing Spring based application, following dependent jar files needs to be added.
- asm-1.0.2.jar
- hamcrest-all-1.3.jar
- json-path-1.2.0.jar
- json-smart-2.1.0.jar
- junit-4.11.jar
- mockito-core-1.9.5.jar
- objenesis-2.1.jar
after adding these jar file you are all set to start writing the Mockito based JUnit test cases.
Few of the useful plugin for Eclipse IDE that will help in analyzing code coverage can be installed. The plugin which I used for code coverage is "EclEmma".
This can be installed from Eclipse market place which gives report on percentage of code line which has been covered by Unit Testing.
In subsequent blogs i will show some sample Mockito Unit Test cases classes.
No comments:
Post a Comment