JUnit-Foundation | JUnit Foundation is a lightweight collection | Unit Testing library

 by   sbabcoc Java Version: 17.0.2 License: Apache-2.0

kandi X-RAY | JUnit-Foundation Summary

kandi X-RAY | JUnit-Foundation Summary

JUnit-Foundation is a Java library typically used in Testing, Unit Testing applications. JUnit-Foundation has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub, Maven.

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

            kandi-support Support

              JUnit-Foundation has a low active ecosystem.
              It has 21 star(s) with 5 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 4 open issues and 25 have been closed. On average issues are closed in 16 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of JUnit-Foundation is 17.0.2

            kandi-Quality Quality

              JUnit-Foundation has 0 bugs and 0 code smells.

            kandi-Security Security

              JUnit-Foundation has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              JUnit-Foundation code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              JUnit-Foundation is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              JUnit-Foundation releases are available to install and integrate.
              Deployable package is available in Maven.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              It has 3684 lines of code, 317 functions and 80 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed JUnit-Foundation and discovered the below as its top functions. This is intended to give you an instant insight into JUnit-Foundation implemented functionality, and help decide if they suit your requirements.
            • 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
            Get all kandi verified functions for this library.

            JUnit-Foundation Key Features

            No Key Features are available at this moment for JUnit-Foundation.

            JUnit-Foundation Examples and Code Snippets

            No Code Snippets are available at this moment for JUnit-Foundation.

            Community Discussions

            QUESTION

            Received a failure event for test with unknown id '5.14'. Registered test ids: '[:my.project:test, 5.1]'
            Asked 2019-Jun-19 at 09:58

            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:58

            JUnit 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.

            Source https://stackoverflow.com/questions/56596098

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install JUnit-Foundation

            JUnit provides a run listener feature, but this operates most readily on a per-class basis. The method for attaching these run listeners also imposes structural and operational constraints on JUnit projects, and the configuration required to register for end-of-suite notifications necessitates hard-coding the composition of the suite. All of these factors make run listeners unattractive or ineffectual for final cleanup operations. JUnit Foundation enables you to declare shutdown listeners in a service loader configuration file. As shown previously under ServiceLoader Configuration Files, META-INF/services/com.nordstrom.automation.junit.JUnitWatcher is the configuration file where shutdown listeners are declared. By default, this file is absent. To add managed listeners, create this file and add the fully-qualified names of their classes, one line per item. When it loads, the JUnit Foundation Java agent uses the service loader to instantiate your shutdown listeners and attaches them to the active JVM.

            Support

            As indicated previously, JUnit Foundation will automatically attach standard JUnit RunListener providers that are declared in the associated ServiceLoader provider configuration file (i.e. - org.junit.runner.notification.RunListener). Run listeners that implement the JUnitWatcher marker interface can be declared in the common configuration file (i.e. - com.nordstrom.automation.junit.JUnitWatcher). Declared run listeners are attached to the RunNotifier supplied to the run() method of JUnit runners. This feature eliminates behavioral differences between the various test execution environments like Maven, Gradle, and native IDE test runners. JUnit Foundation uses this feature internally; notifications sent to RunWatcher service providers are published by an auto-attached RunListener. This notification-enhancing run listener, named RunAnnouncer, is registered via the aforementioned ServiceLoader provider configuration file.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
            Maven
            Gradle
            CLONE
          • HTTPS

            https://github.com/sbabcoc/JUnit-Foundation.git

          • CLI

            gh repo clone sbabcoc/JUnit-Foundation

          • sshUrl

            git@github.com:sbabcoc/JUnit-Foundation.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link