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

More independence from elm-test-rs with custom reports #39

Open
mpizenberg opened this issue Apr 7, 2022 · 2 comments
Open

More independence from elm-test-rs with custom reports #39

mpizenberg opened this issue Apr 7, 2022 · 2 comments
Labels
x:knowledge/intermediate Quite a bit of 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

@mpizenberg
Copy link
Member

Due to an issue with the name field in the exercism report of elm-test-rs, we needed to update both the mpizenberg/elm-test-runner elm package with the fix (mpizenberg/elm-test-runner#12) and then the elm-test-rs executable to use that new version of the reporter package.

Related to another issue, I came to the conclusion that it would be possible (I think) to enable custom reporters, configured directly with command line arguments of the elm-test-rs executable. I've detailed the approach a bit more in that issue: mpizenberg/elm-test-runner#11

I'm linking this here, because I think doing this will benefit exercism since essentially, we could be using it like follows:

elm-test-rs --report "custom" --report-package "exercism/[email protected]" --report-fn "ExercismReporter.implementation"

This would enable any update to the exercism reporter code, as long as it's still compatible with the version of mpizenberg/elm-test-runner used by elm-test-rs.

@mpizenberg mpizenberg added x:knowledge/intermediate Quite a bit of Exercism knowledge required x:module/test-runner Work on Test Runners x:type/coding Write code that is not student-facing content (e.g. test-runners, generators, but not exercises) x:size/large Large amount of work labels Apr 7, 2022
@jiegillet
Copy link
Contributor

Semi-related question:
Currently we have to merge elm-test-rs output to the Exercism extract-test-code output. Would it be possible to do all of those operations in the same place? Can extract-test-code be used via exercism/elm-reporter somehow?

@mpizenberg
Copy link
Member Author

mpizenberg commented Apr 9, 2022

Not currently, because the reporter of the test runner doesn't have access to the associated code.

Actually not only the reporter, there is no part of the test runner that can match exactly an instance of Test with corresponding code. This is because of the dynamic nature of creating tests value because any expression can be used to create test values in a test file. Only top level tests are detected by the test runner and passed to elm-exploration/test that extracts the full detailed list of test values from that Test.

@ErikSchierboom ErikSchierboom added x:size/large Large amount of work and removed x:size/large Large amount of work labels Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x:knowledge/intermediate Quite a bit of 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

3 participants