Skip to content

[WIP]Test upgrade #261

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

Closed
wants to merge 2 commits into from
Closed

Conversation

guygastineau
Copy link
Contributor

This PR isn't actually intended for merging at least right now. I will try to work out a tool to automatically convert existing exercises to the new test system. This new test system allows better conformance with the test runner specification, and our test runner has a new PR for handling this new test output exercism/scheme-test-runner#32 . The new runner maintains legacy compatibility, so even if the "update everything at once" script doesn't pan out or if it only works for most exercises, we can still move forward without breaking everything in the test-runner. For now, hopefully this PR shows some movement on our current problems.

NB. I worked this test system out before I read about tasks and v3 of the test runner interface spec. Even though we have no concept exercises it might be worth while including an escape hatch for that data now rather than later. Although we start getting to a point where it seems like we should just define a new record type to hold all the test data. Well, maybe someone will have a discussion with me about it here...

test-util.ss modifies the original test running code.  It is isolated
from the spec descriptions (maybe it should be a real library
eventually?), and it provides enough information to satisfy the newer
requirements for test-runner reporting (for v3 of the runner spec).

This also has better usability for the local tests.  By default the
actual value returned by user defined functions is presented for
failing tests, so you can see what is happening without re-entering
everything in an repl.  It could be extended to be repl friendly as
well for users who want to stay in geiser for example.  All exception
should also be caught and converted to lists that are returned with
failures (except for test-error).  This should put an end to the
mysterious failing tests with unhelpful exception errors.  Now, so
long as the user code loads it will return all errors encountered
during tests as the actual value in the failure report.  Maybe we
should actually wrap (load solution) with an exception handler to try
making better reporting on failing user code?  This might be very
helpful for recovering in such cases for the test-runner repo.
@guygastineau
Copy link
Contributor Author

This is now obsolete in favor of #262

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant