Workshop proposal: Standard for testing on the JVM

Christian Stein sormuras at gmail.com
Tue Jan 7 12:11:03 UTC 2020


Title: Standard for testing on the JVM
Length: Short
Bio/Blog: https://sormuras.github.io
Abstract:
> There is no standard for testing on the JVM: the only common
> building block we have is java.lang.AssertionError.

Copied from https://github.com/ota4j-team/op
<https://github.com/ota4j-team/opentest4j/>entest4j  -- which
expounds on the history, motivation, goal and benefits of such a
standard for testing on the JVM. Here's another quote:

> The primary goal of the project is to enable testing frameworks
> like JUnit, TestNG, Spock, etc. and third-party assertion libraries
> like Hamcrest, AssertJ, etc. to use a common set of exceptions
> that IDEs and build tools can support in a consistent manner
> across all testing scenarios -- for example, for consistent handling
> of failed assertions and failed assumptions as well as
> visualization of test execution in IDEs and reports.

I propose to supersede that project by integrating the few error
and exception classes into the core of the JDK for the benefit
of the greater Java community.

Perhaps by creating a package in module "java.base", e.g.
"java.lang.assertion" as the container of those errors and exceptions.

Or introduce a dedicated "java.test" module? Which, later, might
also host the platform for testing on the JVM. More on that idea
can be found here:
https://junit.org/junit5/docs/current/user-guide/#advanced-topics

Cheers,
Christian


More information about the workshop-discuss mailing list