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
Move from Prove to Lisp-Unit2 #2199
Comments
What an exhaustive article! I will try to digest it to have an informed opinion. |
More Shinmeraware, yay! On a related note, LASS can simplify the I'm more than fine with Parachute, especially if it's more interactive than Prove and FiveAM (used in |
Eitaro always says 'beta' quality, I believe it is just a way of limiting liability. I suggest we try |
The aforementioned review lists two blockers for rove:
- issues with multi-threading
- only works with infered package systems, which we don't use.
|
OK, well then it is clear! |
What more do you need to say to limit liability than a screaming "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"..."? 😛 I cast my vote for Parachute. |
Since I was offline most of last week, I seized the opportunity to review a few testing framework. I used https://sabracrolleton.github.io/testing-framework as a starting point, but I also noticed that the review was not always accurate, sometimes mentioning that a feature was missing while it's there (maybe due to some copy-pasting that went out of control). Frameworks I've reviewed:
And the winner is... Lisp-Unit2! Main criteria:
Minor criteria:
Review details: clunit2Only 1 fixture per suite. Fixture composition is reversed: In Nfiles, the GPG suite must be the parent of the default suite, which means that then we must test the GPG suite to test everything (testing the default suite would skip the GPG suite). What if there are multiple parents then? FiascoNo fixtures at all? FiveAMPretty good overall but
LiftDeal breakers:
Lisp-Unit 2Has mostly everything. Well documented, well designed. Tests are functions and thus "go to test definition" works! "Compile at point" does not work, but see below for a work-around. ParachuteWell documented, well designed. CLOS-extensible! "Fixtures" unfortunately only "fix" symbol values. "Compile at point" does not work, but see below for a work-around. ProveIt's impossible to load the system without running the test suite, which is Similarly, one cannot just compile a test (and thus catch compilation errors) It seems that it won't return any result object, it can only produce reports. Prove defaults to using colors... Which are broken even when ANSI color parsing Prove is archived and unmaintained, which means the many issues won't ever be fixed. Deal breakers:
Universal "run test at point"If the framework allows to programmatically run an individual test, then it's (defun ambrevar/sly-run-lisp-unit-test-at-point (&optional raw-prefix-arg)
"See `sly-compile-defun' for RAW-PREFIX-ARG."
(interactive "P")
(call-interactively 'sly-compile-defun)
(let ((name `(quote ,(intern (sly-qualify-cl-symbol-name (sly-parse-toplevel-form))))))
(sly-eval-async
`(cl:string-trim "
�"
(cl:with-output-to-string (s)
(cl:let ((lisp-unit2:*test-stream* s))
(lisp-unit2:run-tests :tests ,name :run-contexts 'lisp-unit2:with-summary-context))))
(lambda (results)
(switch-to-buffer-other-window (get-buffer-create "*Test Results*"))
(erase-buffer)
(insert results)))))
(define-key lisp-mode-map (kbd "C-c C-v") 'ambrevar/sly-run-lisp-unit-test-at-point) |
#2465 seems to complete this. |
Prove has some issues:
prove:*debug-on-error*
set toT
), which makes it very inconvenient to write tests.According to https://sabracrolleton.github.io/testing-framework
A benefit of Parachute is that it supports Prove syntax, so migration would be easy.
Thoughts?
The text was updated successfully, but these errors were encountered: