Simplium aids the developer to create selenium based unit test that can be executed in different browsers and enviroment. With enviroment means the same test can be run against the developers own machine as well as a test machine somewhere on the network or even the production machine.
A Simplium unit tests doesn't have any reference to which URL the test is executed against as well as no reference to which browser the test should be executed in. Instead the Simplium test cases are annotated with Simplium specific annotations which allow Simplium to take control of the test cases when executed.
Simplium looks for which enviroment it is executed in (development, test or production) and based on this information Simplium will execute the test cases against different servers, against a local selenium remote control or selenium grid and execute each test in the browsers that the enviroment has specificed.
ClassMock is a framework that helps the creation of unit tests for components that use reflection or annotations. In this kind of classes, the behavior is dependent of the class structure. This way, each test case usually works with a different class created specifically for the test. With ClassMock is possible to define and generate classes in runtime, allowing a better test readability and logic sharing between tests.
This library allows you to use JavaBeans-style property matching for arguments when using EasyMock. Property matching is based on commons-beanutils as documented in Standard JavaBeans.
This article demonstrates a brand new open source library for unit testing, called Unitils. Unitils helps you in writing simple and maintainable unit tests with JUnit or TestNG . It glues together some widely used test libraries like DbUnit and EasyMock and offers integration with Spring and Hibernate . Unitils encourages applying good practices and unit testing guidelines. The ideas behind the code are based on the authors' concrete experience on enterprise projects.
Unitils offers following features
* Equality assertion through reflection, with options like ignoring Java default/null values and ignoring order of collections
* Support for database testing involving test data management with DbUnit, automatic maintenance of unit test databases and automatic constraints disabling
* Hibernate integration features such as session management and testing the mapping with the database
* Integration with Spring, involving ApplicationContext management and injection of spring managed beans
* Integration with EasyMock and injection of mocks into other objects
FEST-Assert is a Java library that provides a fluent interface for writing assertions. Its main goal is to improve test code readability and make maintenance of tests easier.
FEST-Assert requires Java SE 5.0 or later and can be used with either JUnit or TestNG.
Unitils is an open source library aimed at making unit testing easy and maintainable. Unitils builds further on existing libraries like DBUnit and EasyMock and integrates with JUnit and TestNG.
Unitils provides general asserion utilities, support for database testing, support for testing with mock objects and offers integration with Spring and Hibernate. It has been designed to offer these services to unit tests in a very configurable and loosely coupled way. As a result, services can be added and extended very easily.
Currently Unitils offers following features:
* General testing utilities
o Equality assertion through reflection, with different options like ignoring Java default/null values and ignoring order of collections
* Database testing utilities
o Automatic maintenance and constraints disabling of unit test databases
+ Support for Oracle, Hsqldb, MySql, DB2, Postgresql and Derby
o Simplify unit test database connection setup
o Simplify insertion of test data with DBUnit
o Simplify Hibernate session management for unit testing
o Automatically test the mapping of Hibernate mapped objects with the database
o Manage transactions during unit testing
* Mock object utilities
o Simplify EasyMock mock object creation
o Simplify mock object injection
o EasyMock argument matching using reflection equality
* Spring integration
o ApplicationContext configuration and easy injection of spring managed beans into a unit test
o Support for using a Spring-configured Hibernate SessionFactory in unit tests.
The project started begin 2006 from an Ordina J-Technologies discussion group on unit testing. The result was a list of guidelines and Unitils emerged in an attempt to write code to support these guidelines.
Documentation
The key to agility is being able to modify code easily and safely. The problem is that many Java applications are too brittle to extend and enhance easily. Attempts to fix or extend - no matter how carefully done - can introduce more bugs and more complexity.
With a full suite of characterization tests generated by JUnit Factory you can bring your legacy code under control. Download our free plug-in for Eclipse to get started.
Interfaces and Abstract Classes are language constructs that appear over and over in many design patterns and even just in good design techniques. It is common for a single interface or abstract class to have many different descendants or implementations. A good example of this scenario is the Strategy Pattern which relies heavily on many implementations of the same interface.
It is desirable to have one test suite that tests functional compliance with the interface that could be applied to each of the implementing classes.
Popper extends JUnit to allow you to specify theories, general statements about your code's behavior that may be true over infinite sets of input values. For a detailed description of why you might want to do this, see our paper. If you just want to try it out and get started, here's the place.
For those of you who've got into it you'll know that test driven development is great. It gives you the confidence to change code safe in the knowledge that if something breaks you'll know about it. Except for those bits you don't know how to test. Until now XML has been one of them. Oh sure you can use "<stuff></stuff>".equals("<stuff></stuff>"); but is that really gonna work when some joker decides to output a <stuff/>? -- damned right it's not ;-)
Nice article on IBM deveWorks: Ready to step up to the plate and hit a home run with your developer testing activities? In this installment of Automation for the people, development automation expert Paul Duvall covers some of the various types of automated developer tests you can run with every source code change. Paul provides examples of Selenium, DbUnit, and JUnitPerf tests that can help you discover application problems early -- that is, if they're run often.
JUnitPerf is a collection of JUnit test decorators used to measure the performance and scalability of functionality contained within existing JUnit tests.
From Google's Summer of Code 06: Testar is a tool designed to reduce the time spent running Java unit tests. It runs on top of JUnit and automatically selects individual tests to run based on what tests previously succeeded and what changes you have made
EasyMock provides Mock Objects for interfaces in JUnit tests by generating them on the fly using Java's proxy mechanism. Due to EasyMock's unique style of recording expectations, most refactorings will not affect the Mock Objects. So EasyMock is a perfect