Skip to content
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

Upgrade to version 3 spec #23

Open
ErikSchierboom opened this issue Aug 18, 2021 · 2 comments
Open

Upgrade to version 3 spec #23

ErikSchierboom opened this issue Aug 18, 2021 · 2 comments
Labels
x:action/improve Improve existing functionality/content x:knowledge/advanced Comprehensive Exercism knowledge required x:module/test-runner Work on Test Runners x:size/large Large amount of work x:type/coding Write code that is not student-facing content (e.g. test-runners, generators, but not exercises)

Comments

@ErikSchierboom
Copy link
Member

ErikSchierboom commented Aug 18, 2021

If possible, this test runner should be updated to version 3 of the test runner interface specification. In version 3, one additional feature is enabled: the ability to link individual tests to tasks. This allows the website to show which tests belong to which tasks.

The way tests are linked to tasks is via an (optional) task_id field (see the specification), which is an integer that matches the number of the task as defined in the exercise's instructions.md file (note: the instructions start at index 1).

This is an example of a test in the results.json file:

{
  "name": "Expected oven time in minutes",
  "status": "pass",
  "task_id": 1,
  "test_code": "Assert.Equal(40, Lasagna.ExpectedMinutesInOven());"
}

You are completely free in how to implement this. Some options are:

  1. Add metadata to a test that the test runner can then discover while running the tests (e.g. an attribute or annotation)
  2. Define a test name/task id mapping (e.g. in the exercise's .meta/config.json file)
  3. Any other option you can think of...

Let me know if there are any questions.

@ErikSchierboom ErikSchierboom added x:action/improve Improve existing functionality/content x:knowledge/advanced Comprehensive Exercism knowledge required x:module/test-runner Work on Test Runners x:size/large Large amount of work x:type/coding Write code that is not student-facing content (e.g. test-runners, generators, but not exercises) labels Aug 18, 2021
@ClashTheBunny
Copy link

This is identical to #17. Should this have been "Upgrade to version 3 spec"?

@ErikSchierboom ErikSchierboom changed the title Upgrade to version 2 spec Upgrade to version 3 spec Sep 7, 2021
@ErikSchierboom
Copy link
Member Author

@ClashTheBunny Yes it should. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x:action/improve Improve existing functionality/content x:knowledge/advanced Comprehensive Exercism knowledge required x:module/test-runner Work on Test Runners x:size/large Large amount of work x:type/coding Write code that is not student-facing content (e.g. test-runners, generators, but not exercises)
Projects
None yet
Development

No branches or pull requests

2 participants