-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Linking failed assertions to resources #67
Comments
I think we could address this by introducing a new |
I can't comment much over your proposal, cause this is more specific to tooling maintainers who would consume it. From naming/design perspective I'd say that for me it sounds like |
I'm wondering if "source" might be a better term than "location" for this use case, as in "the source of the (cause of the) exception" so to speak. I also wonder if the method should return a collection or single location/source. For example, |
One thing to keep in mind, that absolute URLs can be problematic, when the report displayed a browser. Also, do we define a standard to address specific content in a file, e.g., what github does with line numbers |
I think we should do what JUnit Platform already supports in
|
I went with "location" since "source" (cf. |
A follow up of discussions in junit-team/junit5#2504.
I have a set of dynamic tests which are based on a XML document. The XML document role is to define a hex-encoded byte sequence, fire a deserializer and compare generated object tree with expected XML structure.
So far I managed to use
testSourceUri
parameter in instantiated dynamic tests to hint IDE where to look for test definitions (?line=&column=
). I seek a solution for a second step - assertion errors.Currently I found no way to report a test failure which is result of an unmatched assertion or comparison coming from an external resource. Please note that I do not seek a way to compare XML elements, I am able to conduct that operation using existing tools. What I currently can not do is pointing a line in which failed assertion starts.
An example sequence of file looks like this:
https://github.com/apache/plc4x/blob/e93b442e77b3d5594a0bc1ecd6311c86c9395b4e/protocols/ads/src/test/resources/protocols/ads/AdsDiscoverySerializerTest.xml#L77L108
Any lines between 77 and 108 can lead to assertion error hence it would be extremely useful from development point of view to tell which one exactly is wrong.
Above situation is not specific to an Apache PLC4X where above feature would be consumed. I believe that use of various scenario files and "externalized" scenario definitions is widely used across industry. Yet it still miss a common way to point failures which are beyond written java code.
The text was updated successfully, but these errors were encountered: