Today I was working on the integration of qcheck and OUnit. I wanted to try and improve the output of the OUnit test runner (which is very complete, feature-wise) to add some colors, maybe a nicer verbose mode, something like that. Sadly it’s only on the forge and it’s a real repellent to me. Would it make sense to move it to ocaml-community? I’d like to hear from @gildor478 in particular… I think ounit would attract more contributions if it was on github.
It is already on github: https://github.com/gildor478/ounit
Good to know. Every bit of doc points to the forge ^^’
I wonder, are you reinventing Alcotest? It already has colors, nice value checking combinators and, as a killer-feature to me supports running tests which use concurrency monads without having to jump through hoops.
OUnit existed way before Alcotest did. If there is NIH here, it’s on Alcotest side…
This is true, but I believe it is due to the maintainer disappearing as happened with OASIS too, which then got mostly obsoleted by other more actively maintained projects.
I am just wondering whether it is not time to just move on.
If there’s still a desire to move it to
ocaml-community, that’s totally feasible.
Seems like ounit is still more downloaded, and I don’t see any reason besides colors to prefer alcotest. OUnit has a lot of (perhaps not well known) features, and in this particular case I stuck with it because it allows to run a family of tests by path.
Feel free to send PR to fix the doc or to list the places where the link is wrong so that I have an idea where to fix it.
You can open a bug request in github.com/gildor478/ounit
I haven’t disappeared… but I am not as active as I was before. But when OUnit or OASIS have really problematic bugs, I fixed them.
Alcotest can do that too.
$ ./test.exe list Testing irmin. MEM 0 Basic operations on contents. MEM 1 Basic operations on nodes. GIT 0 Basic operations on contents. GIT 1 Basic operations on nodes. $ ./test.exe test MEM 0 Testing irmin. [OK] MEM 0 Basic operations on contents. [SKIP] MEM 1 Basic operations on nodes. [SKIP] GIT 1 Basic operations on nodes. [SKIP] GIT 1 Basic operations on nodes. The full test results are available in `_build/_tests`. Test Successful in 0.005s. 1 test run. $ ./test.exe test MEM Testing irmin. [OK] MEM 0 Basic operations on contents. [OK] MEM 0 Basic operations on nodes. [SKIP] GIT 1 Basic operations on nodes. [SKIP] GIT 1 Basic operations on nodes. The full test results are available in `_build/_tests`. Test Successful in 0.010s. 2 tests run.
It’s not NIH – I used ounit quite a lot but it never exactly fitted my use-cases; it was simpler to just start a fresh project instead.
Are tests arbitrarily nested in alcotest? I was under the impression that there were only two levels.
Yes, there are only 2 levels by design. Who needs more?
Ok then, I underestimated a bit alcotest it seems . I need to give it another try.