JUnit-Foundation | JUnit Foundation is a lightweight collection | Unit Testing library
kandi X-RAY | JUnit-Foundation Summary
kandi X-RAY | JUnit-Foundation Summary
JUnit Foundation is a lightweight collection of JUnit watchers, interfaces, and static utility classes that supplement and augment the functionality provided by the JUnit API. The facilities provided by JUnit Foundation include method invocation hooks, test method timeout management, automatic retry of failed tests, shutdown hook installation, and test artifact capture.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Intercept the run method
- Fires afterInvocation
- Returns a supported type of the child
- Fires the beforeInvocation event
- Intercept the runnable
- Determine if the specified failure should be retried
- Fires the run started event
- Runs a child method with a retry
- Intercept the given method block
- Attempts to compute the specified value associated with the specified key using the specified mapping function
- Returns the declared field of the specified object
- Region > applyTimeoutTimeout method
- Get the identity of the given class runner
- Intercepts a test method invocation
- Compute the permutation ID
- Apply the timeout interval to the given executor interval
- Intercept the executed method
- Returns true if the given object is equal to this one
- Get fully qualified name for hooked class
- Injects the specified proxy annotation
- Intercept the method invocation
- Calculate a hash code
- Get test class instance
JUnit-Foundation Key Features
JUnit-Foundation Examples and Code Snippets
Community Discussions
Trending Discussions on JUnit-Foundation
QUESTION
It seems that I've stumbled over an issue that is a bit hard to dissect. We've added a new JUnit test run listener to allow an extra test reporting service to be implemented. This was working fine in Oracle JDK 8 + Gradle 5.1 + JUnit-foundation 9.4.2.
However since updating to Java OpenJDK 11.0.3 + Gradle 5.1 or 5.4.1 + JUnit-foundation 9.4.2 or 9.4.3 our tests fail to report correctly. The tests still succeed, but Gradle reports errors (see below) and therefore fails the build.
I'm looking for hints to pinpoint what is going wrong.
When disabling the extra plugin my tests and reporting works fine using Java 11. However, the extra JUnit test run listener is still needed.
I've tried updating to newer versions of Gradle (5.4.1) and JUnit-foundation (9.4.3). But alas, no changes.
Adding JUnit-foundation using
...ANSWER
Answered 2019-Jun-19 at 09:58JUnit foundation is a workaround for the Gradle design decision (see https://github.com/gradle/gradle/issues/1330#issuecomment-303123535) to provide an alternative method for the JUnit specific RunListener. The alternative provided by Gradle is the org.gradle.api.tasks.testing.TestListener interface (and AbstractTestTask that implements it). This will require some work to convert to. They designed it this way to allow test listeners to work for JUnit 4, and 5 and TestNG, etc.
So my answer to my own question is: You shouldn't do things this way when you're using Gradle.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install JUnit-Foundation
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page