using circleci.test with ultra
Closed this issue · 6 comments
Hi
I would like to use ultra ontop of circleci.test. But the two don't seem to play nicely together.
I've opened an issue on ultra as i'm not sure were this sits.
Any ideas for getting this to work? The only thoughts I have so far are to write a reporter that utilises the ultra
code.
Any help would be greatly appreciated
Ultra redefines the same test reporting multimethod that circleci.test binds in order to receive test reports from clojure.test/is
, it makes the two fairly incompatible, as-is.
A custom test reporter that uses the same code as https://github.com/venantius/ultra/blob/master/src/ultra/test.clj#L19-L57 would work, but it can't call into those methods defined by ultra.test
as that would lead to infinite recursion.
Extracting the bodies of the clojure.test
methods redefined by ultra.test
and calling those from both the redefined methods and the custom test reporter would work though.
Hi @gordonsyme
Thanks for getting back to me, and thank you for the link exactly what I was looking for. I've created a POC that uses both circleci and ultra, it's a bit simple but yes does prove the point https://github.com/mt3593/circleci-ultra-reporter
Now is the question of where to house it, I gather you logically see reporters as outside of the core library? I'll ask the ultra guy how he feels about it. Otherwise i'll tidy-up what I have and release that.
I'm aiming to keep the dependencies for circleci.test
as small as possible since that makes it as broadly useful as possible without requiring people to add a bunch to their dependency tree. There's room in here for reporters that don't conflict with that goal.
Ultra depends on many libraries in comparison, adding it as a dependency here would be counter to our goals.
That said, we always intended for additional reporters to be written, and what you've done is exactly the right way to go about adding a reporter that needs extra dependencies.
Thanks for confirming and thanks for all your help, I'll close the issue now
waves Hi Gordon!
Howdy Jarvis!