JUnit-Schema icon indicating copy to clipboard operation
JUnit-Schema copied to clipboard

Add optional field for memory usage

Open joukewitteveen opened this issue 3 years ago • 5 comments
trafficstars

The traditional computer science resources are time and memory. A field for running time already exists, this adds the remaining one.

joukewitteveen avatar Jul 05 '22 06:07 joukewitteveen

Thanks @joukewitteveen, is this field generated by Apache Ant, or is this a custom field?

tompahoward avatar Jul 27 '22 23:07 tompahoward

I don't believe it is generated by Apache Ant. As the new field is optional, the Ant output will still pass, of course. The change only affects other software that uses the schema from this repository as the de-facto junit specification and thus offers generators of junit reports a little extra possibility.

joukewitteveen avatar Jul 28 '22 10:07 joukewitteveen

Even though it’s an optional field, any tools that validate junit reports with the current schema will barf on that field. What do you think if we created an “extended” schema, which would the allow tools to produce reports in “standard” or “extended” format, depending on whether the tool receiving it supports “extended” format or not?

tompahoward avatar Jul 28 '22 12:07 tompahoward

Disclaimer: I have very limited experience with XML schema versioning and don't know the current best practices. I fail to see the issue fully: if your workflow hinges on a snapshot of the schema, you can't use the new field, but if it somehow retrieves the latest version of the schema, the change proposed in this PR would (gently) increase the set of reports that are accepted.

Since the schema is post-hoc anyway, I don't think the complexity of further complications/extensions is warranted.

joukewitteveen avatar Aug 20 '22 14:08 joukewitteveen

One of the problems with XML is that if your code is using the old schema and someone sends you a report containing the new field from the new schema your code will generate a validation on that report, even though you don't use or care about the new field. So if we just added the new field, then EVERY piece of software that uses the schema for receiving reports would need to upgrade in order to maintain compatibility.

Are there any systems producing or consuming reports with that new field?

tompahoward avatar Aug 22 '22 07:08 tompahoward