Git Product home page Git Product logo

opentest4j's Introduction

Open Test Alliance for the JVM

History

This project is the result of an initiative by the JUnit Lambda team.

Status Quo

There is no standard for testing on the JVM: the only common building block we have is java.lang.AssertionError.

AssertionError is great for signaling that a test has failed, but it doesn't go far enough. Each testing framework is therefore forced to fill the gap with custom subclasses of AssertionError or RuntimeException to provide a richer feature set to end users. The downside is that each framework has its own set of custom errors and exceptions, and this makes it a challenge for frameworks to interoperate.

For example, JUnit has long supported the notion of a failed assumption via its AssumptionViolatedException, but assertion frameworks like AssertJ cannot integrate that feature without a direct dependency on JUnit. Furthermore, the status quo makes the work of IDEs and build tools more difficult than it should be.

Proposal

The only real solution to this problem is to create a foundation that we can all build on!

Based on recent discussions with IDE and build tool developers from Eclipse, Gradle, and IntelliJ, the JUnit Lambda team is working on a proposal for an open source project to provide a minimal common foundation for testing libraries on the JVM. 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.

Draft Implementation

We have begun with a small set of errors and exceptions that we consider to be common for all testing and assertion frameworks. In fact, early drafts of these errors and exceptions are already used in the JUnit Lambda Project.

Please take a look at our current draft in this project and let us know what you think.

Feedback is welcome!

What types of errors and exceptions should the OTA support?

What types of properties should such errors and exceptions have?

What additional functionality (e.g., interfaces, utility methods, etc.) should the OTA provide?

Projects already contacted

We've already reached out to and asked for feedback from the maintainers of the following projects.

  • Test NG
  • Hamcrest
  • AssertJ
  • Spock
  • Google Truth
  • ScalaTest
  • Eclipse
  • IntelliJ
  • Gradle
  • Maven Surefire Plugin

Installation

Snapshot artifacts are deployed to Sonatype's snapshots repository.

Dependency Metadata

  • Group ID: org.opentest4j
  • Artifact ID: opentest4j
  • Version: 1.0.0-SNAPSHOT

See also: https://oss.sonatype.org/content/repositories/snapshots/org/opentest4j/opentest4j/

Continuous Integration Builds

Travis Build Status Jenkins Build Status


built on DEV@cloud

opentest4j's People

Contributors

marcphilipp avatar sbrannen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.