exercism / rust-test-runner

GNU Affero General Public License v3.0
3 stars 15 forks source link

Add `version` key to `results.json` #22

Closed ErikSchierboom closed 3 years ago

ErikSchierboom commented 3 years ago

The results.json files produced by the test runner don't include the version key, which means that the website will interpret it as being version 1. Looking at the produced results.json files, it looks like this version of the test runner is somewhere between version 1 and version 2, in that it does nicely list the individual tests and their status, but doesn't include the test_code. That last bit is especially useful for Concept Exercises when being run in the editor, as the test file is not displayed.

The test runner should be modified to output the version key (see the docs). Theoretically, the version should be 1 due to missing the test_code field, but I would nonetheless recommend outputting version 2 as that will allow the individual test results to be displayed.

You can find more information here: https://github.com/exercism/docs/blob/main/building/tooling/test-runners/interface.md

See https://github.com/exercism/v3-beta/issues/124 for the relevant bug report and what the current output looks like without specifying the version key.