FEST: Fixtures for Easy Software Testing
1Mar/11Off

FEST-Assert 1.4: Fluent Interface for Assertions

We are proud to announce that FEST-Assert 1.4 is out!

FEST-Assert is an "assertThat" library that provides a fluent interface for writing assertions. Its main goal is to improve test code readability and make maintenance of tests easier.

Example:

int removed = employees.removeFired();
assertThat(removed).isZero();
 
List newEmployees = employees.hired(TODAY);
assertThat(newEmployees).hasSize(6)
                        .contains(frodo, sam);
 
String[] newHires = employees.newHiresNames();
assertThat(newHires).containsOnly("Gandalf", "Arwen", "Gimli"); 
 
assertThat(yoda).isInstanceOf(Jedi.class)
                .isEqualTo(foundJedi)
                .isNotEqualTo(foundSith);

One of the biggest changes in this release is the implementation of Ansgar's "Self Types." By using this brilliant technique we ended up with a smaller, cleaner code base that is easier to maintain.

Here are some numbers, comparing this release with the previous one:

Release Lines of code Tests Code coverage
1.3 3,132 3,707 98.7%
1.4 2,051 1,849 100%

Please note that 1.4 has more features than 1.3 and yet the code base is 35% smaller!

Release notes

Bug

  • [FEST-378] - Newly added assertThat(Iterable<?> actual) eagerly calls iterator() and can throw an NPE
  • [FEST-402] - onProperty is unable to access properties from Object class
  • [FEST-414] - Impossible to use Fest Assert 1.3 with Ivy
  • [FEST-415] - IteratorAssert should delay Iterator comsumption as much as possible
  • [FEST-416] - NPE in MapAssert due to FEST-329

Improvement

  • [FEST-105] - Add isEither, or isOneOf
  • [FEST-413] - Implement Ansgar's Self Types
  • [FEST-423] - User-friendly date and calendar formatting

New Feature

  • [FEST-111] - Add support for regular expression matching to StringAssert
  • [FEST-381] - collection onProperty() assert might give nicer exceptions
  • [FEST-400] - Add generic assertions isIn / isNotIn

You can download the latest release here (file fest-assert-1.4.zip.) FEST-Assert requires Java SE 5.0 or later.

Here are some useful links:

Feedback is always appreciated :)

Tagged as: Comments Off
5Oct/100

FEST at JavaOne 2010


This past JavaOne was fun for sure. Since there is not too much I can add that hasn't been covered by the media, I'm just going to talk about the session that Yvonne and I presented.

The title of the session was "Rich GUI Testing Made Easy." Here is the abstract:

Testing GUIs is essential to making applications safer and more robust. Even the simplest GUI can enclose some complexity. Any complexity needs to be tested: code without tests is a potential source of bugs. A well-tested application has a greater chance of success.

GUI development has been slow to include automated testing as a core practice, because writing tests for GUIs is hard. In this session, we'll explore several practices that can simplify testing of Swing and JavaFX GUIs.

The session went pretty well. My original thought is that there wouldn't be too many many people attending, since our session was scheduled in the morning after the big Oracle party. To make things worse, the room we got was so hard to find. At the end, the room was full! and we got pretty good feedback about the presentation :)

You can find our slides here:

Many thanks to Peter Pilgrim for the picture!

Filed under: News No Comments
3Sep/101

New Logo!

After being around for close to 4 years, FEST finally got a pretty cool logo!

The logo was created by Nathan Anderson. Thanks Nathan!

Filed under: News 1 Comment
26Aug/100

New website!

We have removed a lot of the duplicated documentation we had in our home page. All of the project's documentation can be found in one place: our wiki. We hope this change will make it less confusing to our users to figure out where to look for stuff.

We also replaced our old wiki with WordPress. The main benefits are easier content maintenance and the ability to post news (e.g. new releases) as blog entries with timestamps. Hopefully in the future we can enable blogging accounts for all team members!

Feedback is always appreciated!

Filed under: News No Comments