JUnit
JUnit 4.4 now uses Theories, Assumptions and Hamcrest assertions...
Submitted by Antony Marcano on Sun, 22/07/2007 - 10:10. JUnitI was pleased to see JUnit 4.4incorporate hamcrest assertions.
Hamcrest assertions emerged from JMock and is a 'literate' or 'fluent' API for assertions.
assertThat(x, is(3));
assertThat(x, is(not(4)));
assertThat(responseString,
either(containsString("color")).or(containsString("colour")));
assertThat(myList, hasItem("3"));
-JUnit 4.4 Release Notes
Separating JMock's assertion framework into Hamcrest made things better for a lot of us who were importing JMock into our unit tests, even if all we wanted were the assertions capabilities... it also inspired new applications of it's capabilities, not least, simplifying iterators:JUnitPerf, try it!
Submitted by hclark on Thu, 27/07/2006 - 21:27. java | JUnit | performance testing | unit testingI just wanted to bring everyone's attention to JUnitPerf, a set of decorators for JUnit to provide a simple means to acquire timings, and do paced-threading. Essentially implementing bare-bones performance testing in the Junit framework.
Mike Clark is credited with this gem. No relation.
http://www.clarkware.com/cgi/blosxom/2003/
Mike Clark is credited with this gem. No relation.
http://www.clarkware.com/cgi/blosxom/2003/
Design with pointcuts to avoid pattern density
Submitted by webmaster@testdriven.com (Links) on Sat, 02/07/2005 - 14:23. JUnitIn "JUnit: A Cook's Tour," authors Erich Gamma and Kent Beck discuss the design of JUnit. They point out that TestCase, like key abstractions in many mature frameworks, has a high pattern density, making it easy to use but hard to change. In this installment of the AOP@Work series, Wes Isberg revisits the Cook's Tour and shows you how using AOP pointcuts rather than object-oriented designs can help you avoid some of the pattern density that makes mature designs hard to change.
Testing Series Part 2: Testing Java Classes with JUnit
Submitted by webmaster@testdriven.com (Links) on Tue, 28/06/2005 - 15:48. JUnitBy now you should know why testing is valuable. If you don't, please see the first article in this five part series. The first article is a concept piece explaining why testing helps in an enterprise server-side software environment. Most software applications today are written in tiers: the presentation tier, the logic tier (where business logic is kept), and the data tier. The logic tier is the meat of the application and comprises all of the rules and actions of the application. The business logic usually resides in JAR files containing libraries of Java class files. People often think of testing as trying out a product. With a car, it's easy: start the ignition and drive. With desktop software, it's also easy: start up the application, then click around and type to test the functions that interest you. How do you test a JAR file filled with Java classes?
GridUnit: run distributed JUnit test suites in a Grid
Submitted by webmaster@testdriven.com (Links) on Mon, 06/06/2005 - 20:43. JUnitThe GridUnit framework is an extension of the widely adopted JUnit testing framework able to run JUnit tests as independent tasks in a Grid, without any user intervention.
Execute EJB JUnit Tests in Your Deployed Apps: Extend the life of your JUnit tests
Submitted by webmaster@testdriven.com (Links) on Sat, 14/05/2005 - 15:04. JUnitBy building a simple JUnit test execution service that runs inside your application, you can support in container test execution via command-line, over HTTP, or even expose test execution as a Web service. Rather than running tests standalone using JUnit or IDE tools, you can execute them inside a deployed application.
Author: Lara D'Abreo
Published: DevX, May 13, 2005
Author: Lara D'Abreo
Published: DevX, May 13, 2005
Assertion Extensions for JUnit: perform unit testing with complex assertions
Submitted by webmaster@testdriven.com (Links) on Sat, 12/03/2005 - 14:19. JUnitJUnit lets you test software code units by making assertions that the intended requirements are met, but these assertions are limited to primitive operations. IBM Software Engineer Tony Morris fills the gap by introducing Assertion Extensions for JUnit, which provides a set of complex assertions that execute within the JUnit framework. Follow along as the author shows you how using this new package from alphaWorks can increase the reliability and robustness of your Java™ software.
JUnitScenario: simulate real life usage of applications
Submitted by webmaster@testdriven.com (Links) on Wed, 16/02/2005 - 16:52. JUnitJUnitScenario is tool to simulate real life usage of applications. It allows you to describe scenarios that are composed of unit tests calls and simulate several users following those scenarios.
