Skip to content

Releases: sbabcoc/JUnit-Foundation

Consolidate parameter-based and rule-based timeout management

12 Mar 21:46
Compare
Choose a tag to compare

In this release, I refactored the implementation for parameter-based and rule-base timeout management. I refined the interactions between these two mechanisms to provide the most rational behavior. I added unit tests to verify functional coordination and updated the documentation to include details of the options and behaviors provided.

A significant enhancement provided by this release is the ability to disable timeout enforcement
locally and globally. In a test class, declaring a Timeout rule with an interval of zero (0) disables timeout enforcement for all of the tests in the class. Setting the value of the TIMEOUT_RULE configuration option to zero (0) disables timeout enforcement entirely. This is especially useful while debugging, when extended execution times would result in test-terminating timeouts.

Add support for rule-based timeout management

12 Mar 21:45
Compare
Choose a tag to compare

This release adds support for rule-based timeout management. This support is implemented to coordinate with and complement timeouts specified via the timeout element of the @Test annotation.

Upgrade to latest dependencies

18 Nov 21:29
Compare
Choose a tag to compare
junit-foundation-11.0.2

[maven-release-plugin] copy for tag junit-foundation-11.0.2

If thread runner lacks atomic test, use failure description

08 Aug 22:00
Compare
Choose a tag to compare

This release resolves a NullPointerException failure in RunAnnouncer.setTestFailure(Failure) that occurred whenever a failure was encountered in a @BeforeClass method. The issue was that the failure occurs in the context of the Suite runner, but the notification is generated from a BlockJUnit4ClassRunner. The solution was to use the Description to retrieve the AtomicTest.

Resolves #53

Finish the task of generic-izing support for child method classes

17 Jul 22:11
Compare
Choose a tag to compare

This is a follow-on to the previous release, to address issues identified while trying to apply that release to an actual use case (JUnit Cucumber support).

  • LifecycleHooks - Add the getFieldValue method to the public interface; remove setFieldValue method.
  • MethodWatcher - Add type parameter to this interface, and extend the TypeDiscloser interface. Change method signatures to replace arguments specific to FrameworkMethod with generic type and ReflectiveCallable object.
  • RunAnnouncer - Remove type parameter. Only post notifications to RunWatcher providers that support methods of the current type.
  • RunReflectiveCall - Set type of callable argument to its actual class (ReflectiveCallable). Remove object unwrapping specific to FrameworkMethod. Update invocation notifications to their revised signatures. Ensure that we don't die when logging debug messages.
  • RunWatcher - Extend the TypeDiscloser interface.
  • TypeDiscloser - New interface to require implementations of generic interfaces to publicize their supported type.

First attempt at generic-izing support for child method classes

17 Jul 20:32
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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.