PowerMock is a framework that extend other mock libraries such as EasyMock with more powerful capabilities. PowerMock uses a custom classloader and bytecode manipulation to enable mocking of static methods, constructors, final classes and methods, private methods, removal of static initializers and more.
...is an acceptance testing anti-framework. The name should remind you how important is to write sweet tests (e.g. readable & maintainable). Anti-framework because there is no API you have to learn.
Jester finds code that is not covered by tests. Jester makes some change to your code, runs your tests, and if the tests pass Jester displays a message saying what it changed. Jester includes a script for generating web pages that show the changes made that did not cause the tests to fail.
Mockito is a mocking framework that tastes really well. It lets you write beautiful tests with clean & simple API. Mockito doesn't give you hangover because the tests are very readable and they produce clean verification errors
JUnit and EasyMock are the predominant choices for testing tools in the Java space. This reference card will guide you through the creation of unit tests with JUnit and EasyMock. It contains detailed definitions for unit testing and mock objects as well as a description of the lifecycle of each. The APIs for both JUnit and EasyMock are covered thoroughly so you can utilize these tools to their fullest extent.
In this interview from QCon London 2008, Erich Gamma discusses the Jazz project, why Eclipse has been successful, the strict Eclipse release schedule, JUnit, Design Patterns, how to identify a design pattern, design patterns and the 'Don't Repeat Yourself' principle, the design pattern community, and whether dependency injection is a design pattern.
Pratik demonstrated JPA API usage and performance tuning using @FetchGroup and @FetchPlan annotations provided by Apache OpenJPA framework. He also talked about unit and integration testing of fetching logic and recommended to test the fetch groups code to prevent any last minute surprises when the application code is promoted to production environment.
I hope this gives you a more in depth view into JUnit and EasyMock. Unit testing is something that once you get used to it, makes you code better, provides you with a safety net for future refactoring and protects you from being burned by API changes
TestNG is a testing framework for unit test development. JMockit is a framework for mock objects that provides mock object functionality using the java.lang.instrument package of jdk 1.5. Together, these frameworks can provide the tools to create very rob
Unit tests give us the confidence to change applications, even legacy applications that we didn't write ourselves. To avoid the drudgery of writing a test case for every edge and boundary, we can let JUnit Factory generate a large set of tests for us.
Infinitest is a continuous JUnit test runner designed to facilitate Test Driven Development. Infinitest helps you learn TDD by providing feedback as you work, and helps you master TDD by reducing your feedback cycle from minutes to mere seconds
The key to writing good unit tests starts with a good design. Design should facilitate unit testing. A design thought out on solid design principles like creating clean interfaces, composing objects correctly, using dependencies properly help writing test
The newly released Spring 2.5 features annotation-driven dependency injection, auto-detection of Spring components on the classpath using annotations rather than XML for metadata, annotation support for lifecycle methods, a new web controller model for ma
JMockit consists of a single class with a small set of static methods, which allow arbitrary methods and constructors of any other class to be replaced by mock implementations at runtime.
Hopefully this entry serves as some search engine friendly documentation on how one might unit test Struts 2 actions configured using Spring
This article will look at configuring integration tests using Spring and DBUnit so that test data is inserted into the database before every test. This article also looks at a utility to export/import test data in the database using DBunit.
The upcoming release of HtmlUnit will contain a very large number of fixes and improvements (particularly for the JavaScript support of libraries like Prototype or GWT). An interesting new feature is the experimental AjaxManager that allows to easily cont
This tutorial guides you step-by-step through the fundamental concepts of JUnit 4, with emphasis on the new Java 5 annotations
Having used Agile programming methods for a number of years now. I have come across some best practices for unit testing that I would like to share with you.
I have mixed feelings about mocks. I can say I'm 97% classicist and 3% mockist. I tend to avoid them as much as possible for the following reasons:
