Closed iHiD closed 5 years ago
rational-numbers has nearly 95000 [individual tests]
@SaschaMann That's useful to know, thanks. Again, I'd need to see how Julia outputs this to understand what the expectations are here for what a student would see.
Many unit test libraries do randomize execution order or might have randomized examples (as in property based testing) it's common that those libraries print a seed for reproduction of the testrun.
The JSON should contain a field to hold the used seed. null
in case it's not used/not supported.
Does it work for everyone to just omit unused fields? I can see the benefit of a random_seed
field at the top level, but it would just be boilerplate for me.
Thats why I have proposed null
for "unused" or "not supported", this way you can just omit the field.
Also, while taking a shower I realised that Erlang and Elixir doe have some types that aren't represantable in JSON, as integers (unbound), atoms and tuples. Other languages have multireturn like Go, Python or Ruby.
How do we represent those in the "expected" and "actual" fields?
Or shall we just provide a string that represents the values in the languages syntax?
How shall we provide "expected exception, nothing happened" or the other way round? Shall we provide stacktraces on unexpected exceptions, crashes, panics (assuming we can easily access them in the formatter)?
For tests that are provided by the student, by either adding another file or by adding them inline in the module under test (seen this in erlang and rust), is there a way to mark them in the JSON output as "additional" or at least source file and line of definition (assuming its accessible for the test formatter)?
I think the only points remaining on here are:
optional
then post-processing them out before exiting.Have I missed anything or can I merge this?
Merging this. Thank you all.
For everyone to tear to pieces :)