-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Launch Open Test Alliance Initiative #12
Comments
I'd add that the name OTA is also up for discussion and that, as soon as there is more than one supporting party, the project will move into its own GitHub organisation. Johannes
|
@jlink, I agree, and I'll update the issue accordingly. |
Very well done! Sam Brannen [email protected] schrieb am Di., 17. Nov. 2015 um
|
Well written. Thanks. Stefan Bechtold http://www.bechte.de, http://twitter.com/bechte
|
Great news. :) Is TestSkippedException intended a replacement/abstraction for AssumptionViolatedException? |
@PascalSchumacher, almost... but not quite.
Hope that clarifies the difference. Cheers, Sam |
Thanks for the clarification. Should have read the code and comments more carefully, but was to excited. :) |
Excitement is a good thing! Let's hope the community at large gets excited about pushing this initiative forward... |
Ping @cbeust |
Well, @cbeust told me he was already contacted. Maybe the list of contacted projects could help the community to not disturb the same persons many times :) |
@juherr Thanks for your feedback! I've updated the issue description to include the projects we've already contacted. |
Having spent a couple of weeks with TestSkippedException I tend to remove it from OTA. Since the alleged semantics are "Don't even start this test" it should never be thrown out of an already started test; how could we possibly prevent someone from doing that all the same? As a matter of fact, all useful skipping in JUnit5 so far - @disabled and @conditional - gets along w/o throwing the exception. |
Maybe some projects from https://github.com/atinfo/awesome-test-automation/blob/master/java-test-automation.md may be contacted too. |
I like the idea. We definitely need a separate project soon. I'm not against Open Test Alliance just an alternative suggestion Common-Test-Framework/Foundation. @jlink |
2015-11-19 17:34 GMT+01:00 Leonard Brünings [email protected]:
Those rules would be framework specific since we don't have a common means |
If the meaning if I agree that we should remove it. We could always add it back later if there is a future need. |
@jlink yes rules are Framework specific but the goal is to enable libraries to use a common set of constructs to express common situations and skipping a test would be one of them. @kcooney yes you can argue that the execution has begun even if the test-body wasn't executed yet. But as I said we need a different place to discuss these questions, we are already off-topic. |
Guys, feel free to open a dedicated issue for the I've just created an |
AssertionFailedErrorFor infrastructure that runs tests and collects output, it's important that the MultipleFailuresExceptionI'm not convinced this class is necessary. Since Java 7, |
MultipleFailuresException
|
@mkeller We are still Java 6 compatible spockframework/spock#530 and I guess many other test frameworks still are, since they are used by other frameworks that are also still Java 6 compatible. If we enforce Java 7 here then Spock would support would be delayed to the next major version. |
I wonder why you want to provide the implementation for AssertionFailedError, isn't interface enough? Agree on String instead of object, IDEs/build tools would most probably serialize them anyway and present default toString to the user if custom toString was not specified. |
MultipleFailuresException: Exceptions usually get serialized via |
Here's my feedback as an AssertJ developer and a (future) JUnit-lambda user, I haven't created issues for each points as they are related, let me know if you want me to do so and for which ones. Also, I'm not sure all my points are relevant for OTA some might be for JUnit itself, I just thought they might be worth mentioning (just ignore them if they are not relevant). 1 - Support for
|
Hi Joel. Your point #6 really requires a change to the exception to allow for As for the other points: Couldn't the all be completely handled in an cheers, Johannes 2015-11-21 6:55 GMT+01:00 Joel Costigliola [email protected]:
|
Johannes Link wrote to the Maven group. I provided my feedback to him and he asked if I could add it to the ticket. This is my feedback: I took a look at JUnit 5 API. My only criticism is the @context annotation. I don't think developers should be encouraged to write inner classes for the sake of grouping tests. I believe this has already been sufficiently covered with the use of the new @tag and/or by method naming conventions (like testWithChild1, testWithChild2, etc.). Furthermore, JEE has already has an established @context annotation in many of the EE specs which are associated with dependency injection. I think it's a bit jaring to see JUnit's @context be so different. My advice is to either drop @context (I don't like it's current meaning) or re-purpose it to be part of dependency injection -- possibly completely replacing the @nAmed injection and giving one common object to retrieve whatever you need to know about the test execution context/metadata. |
Hi @pbenedict, Thanks for providing feedback! However, it appears that you misunderstood our intentions. This issue is about an open test alliance for defining common building blocks for all testing frameworks on the JVM. This issue has absolutely nothing to do with the proposed JUnit 5 API. If you would like to comment on the programming or extension model for the JUnit Lambda prototype, please do so in a separate issue. As an aside, the previous Cheers, Sam |
I was thinking: Why not trying to involve the JCP and launch OTA under a JSR? |
I don't have any experience with JCP, but it sounds like a year(s)-long Johannes 2015-11-23 10:38 GMT+01:00 Julien Herr [email protected]:
|
+1 for the interface suggestion by @akozlova |
The problem with just defining interfaces is that you cannot catch an interface. You can only catch a subclass of You could of course catch Furthermore, if the OTA only defined interfaces that would leave it up to the implementer to decide whether the actual exception is a checked exception, Of course, if I'm overlooking something, please enlighten me. ;) Cheers, Sam |
I think we should leave conceptual and implementation details out of this thread, it should be about whether we think that OTA does have merrit and if we should start it as a project. Then and only then should we begin to talk about such details. |
Hi everybody, The OTA finally has its own home: https://github.com/ota4j-team/opentest4j Feel free to continue the discussions there. In conjunction with issue #30, we will be making changes to the current draft based on feedback several of you have provided here. Once issue #30 is resolved, we will discontinue discussions regarding the OTA in this GitHub repository unless such discussions pertain only to JUnit. |
Speaking for google/truth, we're quite happy to adopt this as a de-facto standard once we can get a stable release artifact. I'm going to work up a provisional branch to integrate it. |
That's absolutely great news that google/truth will adopt the OTA! |
Thanks for all of your feedback and enthusiasm! Since #30 is now closed... Please continue discussions in the official https://github.com/ota4j-team/opentest4j repository. |
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 ofAssertionError
orRuntimeException
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 already begun with a small set of errors and exceptions that we consider to be common for all testing and assertion frameworks. In fact, we are already using these exceptions in the JUnit Lambda Prototype.
Please take a look at our current draft in the open-test-alliance project and let us know what you think.
Project Name and Repository
The name Open Test Alliance is simply a working title for the project. As such, the name is up for discussion, and recommendations are welcome. We will of course need a name that maps to an available Internet domain name so that the code can live in an appropriate Java package.
The draft implementation is currently a part of the JUnit Lambda repository; however, as soon as additional parties join the collaboration, we will collectively work to find a new home for the project.
Feedback is welcome!
What types of errors and exceptions should such a project support?
What types of properties should such errors and exceptions have?
What should the project be named?
Projects already contacted
We've already reached out to and asked for feedback from the maintainers of the following projects.
The text was updated successfully, but these errors were encountered: