Java Software Testing tutorials: unit testing, open source, JUnit, Mockito, TestNG, Spring, JGiven, etc.
This presentation shows how to easily go from user stories to automated integration tests that themselves read like user stories. You can accomplish this by using custom domain-specific languages (DSL).
Learn how to perform functional testing on JSF applications with Arquillian and Selenium. In modern development environments, it’s a must to include testing of Web applications as a standard part of the development lifecycle. Such tests can also be used as acceptance criteria in enterprise projects. Although full automation is possible, it is considered to be very expensive. As a result, in projects where testing is included as part of the project plan, it is also often the first requirement cut when the project schedule begins to slip.
Easy Coverage is an open source framework that can dynamically generate Java unit tests to perform basic verifications. Easy Coverage is extensible and highly configurable. It can work as a standalone product or it can be used with JUnit. In his blog post, Romain Delamare explains how to dynamically generate Java unit tests with Easy Coverage.
It is rather rare to have access to the software testing techniques used by a large project to maintain the quality of its code base. In this blog post, Jan Wloka, a member of the team behind IBM’s Rational Team Concert, presents the different techniques and tools used to control software evolution and to improve the quality of their code base.
This extract from the book “Pragmatic Unit Testing in Java with JUnit” written by Andy Hunt and Dave Thomas provides an introduction to the usage of mock objects during Java unit tests. They define the usage of mocks in unit testing as the unit similar to the use of lighting doubles in the movies: A mock object is simply a debug replacement for a real-world object.
Unit tests are programmer’s best friend, but relying on them exclusively gives an illusion of overall system integrity. At some level, we need to verify how our components integrate and ensure unexpected behavior does not creep in when we shift the application into the target runtime. It all amounts to whether your application is providing the end user what he or she is really needs (tire swing) instead of what anyone thinks they need. How can we save our users from frustration, keep the fail whale at bay and communicate with stakeholders that the requirements are being met?
This article by Lasse Koskela, provides several tips on how to improve the speed of your Java unit tests. The strategy to improve the speed up test code is to find slow things and either make them run faster or not run them at all.