-
-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
x:action/improveImprove existing functionality/contentImprove existing functionality/contentx:knowledge/elementaryLittle Exercism knowledge requiredLittle Exercism knowledge requiredx:module/test-runnerWork on Test RunnersWork on Test Runnersx:size/mediumMedium amount of workMedium amount of workx:type/codingWrite code that is not student-facing content (e.g. test-runners, generators, but not exercises)Write code that is not student-facing content (e.g. test-runners, generators, but not exercises)
Description
According to the test runner interface there is a distinction to be made between the Message (error message in case the test failed) and Output (the output of the test including user output).
When parsing the output of go test --json we currently write all lines marked with "Action":"output" into the Output field. Instead we should additionally check the "Output" if it has the following pattern and write that in the Message field.
Sample of line to be written to the Message field:
{"Time":"2020-01-03T14:05:53.978508+01:00","Action":"output","Package":"github.com/exercism/go-test-runner/tests/5","Test":"TestSample/first_test","Output":" sample_test.go:30: Output should be output: first test, got output: third test\n"}Suggestion is to use a regex to search for the prefix ^\t+(.+?)_test\.go:/d+: (or similar) and use these line(s) to fill Message in the test runner output.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
x:action/improveImprove existing functionality/contentImprove existing functionality/contentx:knowledge/elementaryLittle Exercism knowledge requiredLittle Exercism knowledge requiredx:module/test-runnerWork on Test RunnersWork on Test Runnersx:size/mediumMedium amount of workMedium amount of workx:type/codingWrite code that is not student-facing content (e.g. test-runners, generators, but not exercises)Write code that is not student-facing content (e.g. test-runners, generators, but not exercises)