Skip to content

Releases: sbabcoc/JUnit-Foundation

First attempt at generic-izing support for child method classes

17 Jul 20:32

Choose a tag to compare

This is a first stab at replacing the hardcoded support for the native JUnit method class (FrameworkMethod) with generic support for whatever method class happens to be running. As I discovered when applying this release to an actual use case (support for JUnit Cucumber), I didn't go far enough. Here's what changed in this release:

  • AtomicTest - Replace hardcoded support for FrameworkMethod with generic type parameter.
  • LifecycleHooks - Add type parameter to AtomicTest references. Replace custom reflection-based method invocation with Apache Commons MethodUtils call.
  • RunAnnouncer - Add type parameter to this class, and to AtomicTest and RunWatcher references.
  • RunChild - Expand scope of AtomicTest creation to ensure that clients are able to acquire test objects related to non-native runners.
  • RunWatcher - Add type parameter to this interface and to AtomicTest references.

Add debug logging

24 Apr 22:16

Choose a tag to compare

In conjunction with test lifecycle notifications, JUnit Foundation now emits debug log messages.

Enable global timeout support on Java 8

19 Apr 23:22

Choose a tag to compare

The hierarchy for the Method class differs between Java 7 and Java 8. This revision tweaks the implementation of global timeout support to work properly with both versions of the Java runtime.

Fix Java 7 support; fix global timeout support

19 Apr 23:17

Choose a tag to compare

My initial effort at implementing Java 7 support missed the mark. This release uses the tool chain plug-in to ensure that the Java 7 JDK is used for compilation. This changed revealed that I had more Java 8 code and dependencies to replace with Java 7 equivalents. In the process, I discovered that my global timeout implementation probably shouldn't have ever worked, as I was applying the timeout at the wrong level.

Fix handling of artifact path

19 Apr 23:08

Choose a tag to compare

There was a disparity in the implementation of the artifact path feature between this project and TestNG Foundation. This release resolve the disparity, using the default artifact path of the base class as the root folder and specific artifact types appending their resource folder names to that. This change required converting ArtifactType from an interface to an abstract base class.

Enable inclusion in Java 7 projects

19 Apr 22:59

Choose a tag to compare

This release enabled Java 7 projects to use JUnit Foundation. In addition to removing all Java 8 implementation from this project's sources, this involved ensuring that the correct JDK is used for compilation and selecting Java 7 compatible releases of all dependencies.

  • Switched from Java 8 Optional to Google Guava Optional
  • Switched from interfaces with static and default methods to abstract classes
  • Add implementation for computeIfAbsent()
  • Replace lambdas with anonymous classes and Google Guava Function objects

Fix issue with handling of exceptions thrown by test rules

08 Apr 02:15

Choose a tag to compare

If an attached test rule threw an exception, handling of the failure resulted in a NullPointerException. This was caused by an inability to associate the failure to its corresponding "atomic" test. This release resolves the issue by mapping each BlockJUnit4ClassRunner with its associated "atomic" test much earlier in the process. I added the ability to map Description objects to "atomic" tests as well, which is why this is a feature release.

Add support for Kotlin test method names

20 Mar 22:14

Choose a tag to compare

In Kotlin, test method names can include spaces. I guess underscores and camel-casing are just too difficult for some folks to parse. In this release, I revised the pattern I use to extract test method names to handle this syntactic sugar aberration.

Add support for expected exceptions

04 Mar 05:47

Choose a tag to compare

  • Create AtomicTest object prior to execution of first "particle" method, storing it in a map keyed with the associated runner.
  • Add methods:
    • LifecycleHooks.getAtomicTestOf(Object)
    • RunAnnouncer.newAtomicTest(Description)
    • RunAnnouncer.getAtomicTestOf(Object)
    • RunAnnouncer.setTestFailure(Failure)
  • Update RunAnnouncer listener methods to create and use a single AtomicTest object for the entire run of each "atomic" test.

Create comprehensive watcher finder method

15 Jan 23:43

Choose a tag to compare

  • Add comprehensive LifecycleHooks.getAttachedWatcher() method to enable tests to harvest values collected by attached JUnit watchers. The HookInstallationTest class uses this method to harvest method names seen by the UnitTestWatcher class during test execution.
  • Add LifecycleHooks.getAttachedListener() method to enable tests to harvest values collected by attached JUnit run listeners.
  • These methods invoke identically-named package-private methods of internal implementation classes.