Monthly Archives: September 2014

@Fixture to enhance fixtures in JUnit tests

fixtureIn this post I’d like to briefly present extended approach to provide fixtures into JUnit tests. JUnit already provides a possibility to execute methods right before/after test method and before/after test class. This standard functionality does not fulfill more sophisticated requirements. Thanks to @Beofre/@After annotations, for each test there is always executed exactly the same method. In a case in which we’d like to have a dedicated fixture code for each method the existing approach is not so convenient. I’ve developed fixture handling addition to JUnit framework with a possibility to define different fixture for each test.

Continue reading